18 lines
658 B
Text
18 lines
658 B
Text
100 cls
|
|
110 print "e = ";exp(1)' e not available
|
|
120 print "PI = ";4*arctan(1)' pi not available
|
|
130 x = 12.345
|
|
140 y = 1.23
|
|
150 print "sqrt = ";sqr(x)' square root
|
|
160 print "ln = ";log(x)' natural logarithm base e
|
|
170 print "log10 = ";log(x)/log(10)' base 10 logarithm
|
|
180 print "log = ";log(x)/log(y)' arbitrary base logarithm
|
|
190 print "exp = ";exp(x)' exponential
|
|
200 print "abs = ";abs(-x)' absolute value
|
|
210 print "floor = ";floor(x)' floor
|
|
220 print "ceil = "; : ceil(x)' ceil easily implemented as function
|
|
230 print "power = ";x^y ' power
|
|
240 end
|
|
250 sub ceil(x)
|
|
260 if x < 0 then print int(x) else print int(x)+1
|
|
270 end sub
|