hi,
can you plese tell me what the range of double is - for example like "8 bytes Real numbers with an approximate range of 4.19E-307 to 1.67E+308"
thanx
Range of double numbers?
Re: Range of double numbers?
the highest storable double is: ± 1.7976931348623157e308
the lowes positive double is: 2.2250738585072013e-308
the lowes positive double is: 2.2250738585072013e-308
PB 6.01 ― Win 10, 21H2 ― Ryzen 9 3900X, 32 GB ― NVIDIA GeForce RTX 3080 ― Vivaldi 6.0 ― www.unionbytes.de
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Lizard - Script language for symbolic calculations and more ― Typeface - Sprite-based font include/module
Re: Range of double numbers?
it seems the maximum for Double might be slightly understated in the PB docs?
In C:
In PB, using the docs suggested max yields a slightly lower figure:
But if i change that from "157e+" to "158e+" the output then matches that of the C output:
In C:
Code: Select all
printf("%f", DBL_MAX);
179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000.000000
^
Code: Select all
dbl.d = 1.7976931348623157e+308 : Debug StrD(dbl)
179769313486231550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
^
Code: Select all
dbl.d = 1.7976931348623158e+308 : Debug StrD(dbl)
179769313486231570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
^