Register

mathematical functions

Discuss issues related to the fx-9860G Software Development Kit
Junior Member
User avatar
Posts: 6
Joined: Thu Jun 21, 2012 6:42 pm
Calculators: Casio fx-9860GII

mathematical functions

Postby GForce » Sat Oct 20, 2012 4:08 pm

Hi, is it possible to use functions like sine?
So for example if I wanted the Ycoord of my object to depend on Y = d + a sin bX, with a, b and d controllable parameters and X the variable, to create a regular jump, how would I do that?

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Re: mathematical functions

Postby SimonLothar » Sat Oct 20, 2012 7:17 pm

With the standard development systems the function

double sin(double d)

should be available.

See Math.h.
I'll be back!

Junior Member
User avatar
Posts: 6
Joined: Thu Jun 21, 2012 6:42 pm
Calculators: Casio fx-9860GII

Re: mathematical functions

Postby GForce » Sun Oct 21, 2012 8:00 pm

Hey thanks, but what I don't understand is, how I need to type this in the SDK.
I know you leave it empty with void, what do you do with double?

Senior Member
User avatar
Posts: 605
Joined: Sat Sep 15, 2012 6:59 am
Location: Krautland ****
Calculators: Casio fx-7400GII, Casio fx-7400GII (SH4), Casio fx-9750GII, Casio fx-9750GII (SH4), Casio fx-9860G, Casio fx-9860G SD, Casio fx-9860G Slim, Casio fx-9860GII SD, Casio fx-9860GII SD Power Graphic 2, Casio Classpad 330 plus, Casio fx-CG20, Casio fx-CG50, Casio Classpad fx-CP400

Re: mathematical functions

Postby SimonLothar » Mon Oct 22, 2012 9:53 am

GForce wrote:Hey thanks, but what I don't understand is, how I need to type this in the SDK.
I know you leave it empty with void, what do you do with double?


This is the description I took from the Hitachi SHC-manual, included in the old SDK:

double sin(double d)
Description: Computes the sine of a floating-point radian value.
Header file: <math.h>
Return values: Sine of d
Parameters: d Radian value for which sine is to be computed

Example:
Code: Select all
#include <math.h>
  double d, ret;
  ret=sin(d);
I'll be back!

Junior Member
User avatar
Posts: 6
Joined: Thu Jun 21, 2012 6:42 pm
Calculators: Casio fx-9860GII

Re: mathematical functions

Postby GForce » Mon Oct 22, 2012 5:20 pm

Ooh thanks, got it! I forgot to do #include "math.h" :P

Return to Casio fx-9860 SDK

Who is online

Users browsing this forum: No registered users and 25 guests