Real constants and functions: Difference between revisions
Content added Content deleted
Line 1,107: | Line 1,107: | ||
=={{header|EasyLang}}== |
=={{header|EasyLang}}== |
||
EasyLang does not have ''e'', exponential, or a ceiling function. |
|||
<syntaxhighlight lang="easylang"> |
<syntaxhighlight lang="easylang"> |
||
# e is not available |
|||
x = 1.5 |
|||
⚫ | |||
# calculate e |
|||
⚫ | |||
e = pow 3 (1 / logn 3) |
|||
numfmt 4 0 |
|||
⚫ | |||
⚫ | |||
# square root |
# square root |
||
print sqrt |
print sqrt 2 |
||
# |
# logarithm base 10 |
||
print |
print log10 1000 |
||
# exponential |
# exponential is not available |
||
print pow e x |
|||
# absolute value |
# absolute value |
||
print abs |
print abs -20 |
||
# floor |
# floor |
||
print floor |
print floor 1.5 |
||
# ceiling |
# ceiling is not available |
||
if x > floor x |
|||
print floor x + 1 |
|||
else |
|||
print x |
|||
end |
|||
# power |
# power |
||
print pow 2 |
print pow 2 10 |
||
</syntaxhighlight> |
</syntaxhighlight> |
||