04.03.2013 Views

Basic Micro Studio Syntax Manual

Basic Micro Studio Syntax Manual

Basic Micro Studio Syntax Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

FASIN<br />

FACOS<br />

FATAN<br />

FLN<br />

Structure - Math<br />

The FASIN operator calculates the fl oating point arc sine of a value. FASIN returns the angle in<br />

radians given the ratio of the length of the side opposite the angle and the length of the hypotenuse in<br />

a right triangle.<br />

mysin fcon 1.0<br />

myangle var fl oat<br />

myangle = FASIN mysin ;myfl oat equals PI/2<br />

serout s_out,i9600,[“myangle = “,real myangle,13]<br />

The FACOS operator calculates the fl oating point arc cosine of a value. FACOS returns the angle in<br />

radians given the ratio of the length of the side adjacent the angle and the length of the hypotenuse in<br />

a right triangle.<br />

mycos fcon 0.0<br />

myangle var fl oat<br />

myangle = FACOS mycos ;myfl oat equals 0<br />

serout s_out,i9600,[“myangle = “,real myangle,13]<br />

The FATAN operator calculates the fl oating point arc tangent of a value. FATAN returns the angle in<br />

radians given the ratio of the length of the side opposite the angle and the length of the side adjacent<br />

to the angle in a right triangle.<br />

mytan fcon 1.0<br />

myangle var fl oat<br />

myangle = FATAN mytan ; myfl oat equals PI/4<br />

serout s_out,i9600,[“myangle = “,real myangle,13]<br />

The FLN operator calculates the fl oating point natural log of a value. The natural log is used to<br />

calculate the time it takes for compound growth to reach the specifi ed amount. For example FLN<br />

20.08 will equal approximately 3. This means it takes 3 growth cycles (the amount of time it takes to<br />

grow 100%) to reach 20.08 times the original amount.<br />

result var fl oat<br />

result = FLN 2.0 ;result now equals 0.69315<br />

serout s_out,i9600,[“result = “,real result,13]<br />

65

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!