Real constants and functions: Difference between revisions

Real constants and functions en Yabasic
(Real constants and functions en BASIC256)
(Real constants and functions en Yabasic)
Line 3,057:
4.0000000000000000
</pre>
 
=={{header|Yabasic}}==
<lang yabasic>print "e = ", euler
print "pi = ", pi
x = 12.345
y = 1.23
print "sqrt = ", sqrt(2) // square root
print "ln = ", log(euler) // natural logarithm base e
print "log = ", log(x, y) // arbitrary base y logarithm
print "exp = ", exp(euler) // exponential
print "abs = ", abs(-1) // absolute value
print "floor = ", floor(-euler) // floor
print "ceil = ", ceil(-euler) // ceiling
print "power = ", x ^ y, " ", x ** y // power
end</lang>
{{out}}
<pre>e = 2.71828
pi = 3.14159
sqrt = 1.41421
ln = 1
log = 12.1405
exp = 15.1543
abs = 1
floor = -3
ceil = -2
power = 22.0056 22.0056</pre>
 
=={{header|zkl}}==
2,123

edits