Real constants and functions: Difference between revisions
Content added Content deleted
(Real constants and functions en Yabasic) |
(Real constants and functions en Asymptote) |
||
Line 291: | Line 291: | ||
ceil 23.536: 24 |
ceil 23.536: 24 |
||
2 ^ 8: 256</pre> |
2 ^ 8: 256</pre> |
||
=={{header|Asymptote}}== |
|||
<lang Asymptote>real e = exp(1); // e not available |
|||
write("e = ", e); |
|||
write("pi = ", pi); |
|||
real x = 12.345; |
|||
real y = 1.23; |
|||
write("sqrt = ", sqrt(2)); // square root |
|||
write("ln = ", log(e)); // natural logarithm base e |
|||
write("log = ", log10(x)); // base 10 logarithm |
|||
write("log1p = ", log1p(x)); // log (1+x) |
|||
write("exp = ", exp(e)); // exponential |
|||
write("abs = ", abs(-1)); // absolute value |
|||
write("fabs = ", fabs(-1)); // absolute value |
|||
write("floor = ", floor(-e)); // floor |
|||
write("ceil = ", ceil(-e)); // ceiling |
|||
write("power = ", x ^ y); // power |
|||
write("power = ", x ** y); // power</lang> |
|||
{{out}} |
|||
<pre>e = 2.71828182845905 |
|||
pi = 3.14159265358979 |
|||
sqrt = 1.4142135623731 |
|||
ln = 1 |
|||
log = 1.09149109426795 |
|||
log1p = 2.59114178285649 |
|||
exp = 15.1542622414793 |
|||
abs = 1 |
|||
fabs = 1 |
|||
floor = -3 |
|||
ceil = -2 |
|||
power = 22.0056421323763 |
|||
power = 22.0056421323763</pre> |
|||
=={{header|AutoHotkey}}== |
=={{header|AutoHotkey}}== |