# "FIXP" Some useful fixed point math functions¶

Fingerprint ID: 0x46495850

This fingerprint, from RC/Funge-98, implements fixed-point arithmetics. It provides the following commands:

A : a b(a AND b)
Performs bitwise AND.
B : (10000×n)(10000×arccos(n))
Calculates arccosine of n, in degrees. Reflects for invalid argument.
C : (10000×n)(10000×cos(n))
Calculates cosine of n, in degrees.
D : nx
Pushes a random number between 0 and n-1, or between n and -1 if n is negative.
I : (10000×n)(10000×sin(n))
Calculates sine of n, in degrees.
J : (10000×n)(10000×arcsin(n))
Calculates arcsine of n, in degrees. Reflects for invalid argument.
N : n-n
Pushes the negate of n.
O : a b(a OR b)
Performs bitwise OR.
P : n(π×n)
Pushes n multiplied by pi.
Q : nsqrt(n)
Pushes the square root of n. Reflects if n is negative.
R : a ba^b
Pushes the b-th power of a. Reflects if a and b are zero.
S : nsign(n)
Pushes +1 if n is positive, -1 if negative, or 0 if zero.
T : (10000×n)(10000×tan(n))
Calculates tangent of n, in degrees.
U : (10000×n)(10000×arctan(n))
Calculates arctangent of n, in degrees. Reflects for invalid argument.
V : nabs(n)
Pushes the absolute value of n.
X : a b(a XOR b)
Performs bitwise XOR.

All commands discards the fraction of result value, except that result value scaled by 10000 is rounded to nearest integer.

#### Previous topic

"FILE" File I/O functions

#### Next topic

"FPRT" Formatted print