Real constants and functions: Difference between revisions

Content added Content deleted
No edit summary
(Added Axe)
Line 148: Line 148:
}
}
# outputs 2.71828, 3.14159, 3.4, -4, -3</lang>
# outputs 2.71828, 3.14159, 3.4, -4, -3</lang>

=={{header|Axe}}==
In general, Axe does not support many operations on real numbers. However, there are a few special cases that it does support.

To take the square root of an integer X:
<lang axe>√(X)</lang>

To take the square root of an 8.8 fixed-point number Y:
<lang axe>√(Y)ʳ</lang>

To take the base-2 logarithm of an integer X:
<lang axe>ln(X)</lang>

To take 2 raised to an integer X: (Note that the base is not Euler's number)
<lang axe>e^(X)</lang>

To take the absolute value of a signed integer X:
<lang axe>abs(X)</lang>


=={{header|BASIC}}==
=={{header|BASIC}}==