cancel
Showing results for 
Search instead for 
Did you mean: 

Largest float value KDB can handle

ekallivrousis
New Contributor III

Whats the largest decimal value KDB can handle. Im looking to deal with numbers that have over 17 decimal places

1 REPLY 1

davidcrossey
Moderator Moderator
Moderator

Hi ekallivrousis,

The largest decimal value would be the float type as per Data types

q)(2 xexp 1023)*1+1-2 xexp -52
1.7976931348623157e+308

See here for more Double-precision floating-point format 

Also note that the q console can only display float values to 17 significant figures, e.g.

q)\P
7i
q)1.123456789
1.123457
q)\P 0 /this is eqiuvalent to \P 17
q)\P
0i
q)0.11111111111111112
0.11111111111111112
q)1.11111111111111112
1.1111111111111112

 Further reading here:

Hope this helps, and thanks for sharing your query on the Community portal!

Kind regards,

David