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
# pi
# calculate e
print pi
e = pow 3 (1 / logn 3)
numfmt 4 0
# e
print e
# square root
# square root
print sqrt x
print sqrt 2
# natural logarithm
# logarithm base 10
print logn x
print log10 1000
# exponential
# exponential is not available
print pow e x
# absolute value
# absolute value
print abs x
print abs -20
# floor
# floor
print floor x
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 x
print pow 2 10
</syntaxhighlight>
</syntaxhighlight>