Squirrel: How to print without e^?

93 Views Asked by At
local MAX = 0.059513641346164345134111361369;
print( MAX );

Output: 0.661467

local MAX = 0.000000000000000000000000000001;
print( MAX );

Output: 1e-030

I want to display the entire 30 digits after the decimal point.

1

There are 1 best solutions below

0
On BEST ANSWER

You can use squirrel's format() function, it behaves like printf in C

local MAX = 0.059513641346164345134111361369;
print(format("%.30f", MAX));

local MAX = 0.000000000000000000000000000001;
print(format("%.30f", MAX));

You must specify how many digits to print after the comma (in this case 30)