jdh8 / metallic

C runtime library (libc) for WebAssembly
MIT License
35 stars 2 forks source link

Is 10 ** -342 minimum possible value for double range in scientific_ method? #4

Closed MaxGraey closed 5 years ago

MaxGraey commented 5 years ago

It seems this should be -324 here

jdh8 commented 5 years ago

It is because maximum significand is 264 − 1, so we need -342 to go small enough. significand is interpreted as a plain integer here.

Smallest representable positive double ≈ 5e-324 (264 − 1) 10-342 ≈ 2e-323

MaxGraey commented 5 years ago

Got it! thanks