Go to the first, previous, next, last section, table of contents.

Floating Point Functions

In addition to basic floating point arithmetic (addition, subtraction, multiplication, and division) and floating point comparisons, a number of exponential and transcendental functions are built in to IC:

float sin(float angle)
Returns sine of angle. Angle is specified in radians; result is in radians.
float cos(float angle)
Returns cosine of angle. Angle is specified in radians; result is in radians.
float tan(float angle)
Returns tangent of angle. Angle is specified in radians; result is in radians.
float atan(float angle)
Returns arc tangent of angle. Angle is specified in radians; result is in radians.
float sqrt(float num)
Returns square root of num.
float log10(float num)
Returns logarithm of num to the base 10.
float log(float num)
Returns natural logarithm of num.
float exp10(float num)
Returns 10 to the num power.
float exp(float num)
Returns $e$ to the num power.
(float) a ^ (float) b
Returns a to the b power.

Go to the first, previous, next, last section, table of contents.