2
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.

Nakilon
  • 34,866
  • 14
  • 107
  • 142
user3160468
  • 75
  • 1
  • 6

1 Answers1

2

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)

Pedru
  • 1,430
  • 1
  • 14
  • 32