RosettaCodeData/Task/Literals-Floating-point/Lingo/literals-floating-point.lingo
2023-07-01 13:44:08 -04:00

23 lines
311 B
Text

put 0.23
-- 0.2300
-- activate higher printing precision
the floatPrecision = 8
put -.23
-- -0.23000000
put 9.00719925474099e15
-- 9.00719925474099e15
-- result is NOT a float
put 2/3
-- 0
-- casting integer to float
put float(2)/3
-- 0.66666667
-- casting string to float
put float("0.23")
-- 0.23000000