Floating point minimum values are positive?

Joseph Rushton Wakeling joseph.wakeling at webdrake.net
Mon Jul 22 14:02:28 PDT 2013


Always amusing to run into those little quirks of parts of the 
language you've never worked with before ...

I just realized that while e.g. int.min gives a negative value, 
the floating point equivalent, e.g. double.min, gives a very 
small positive value -- I guess the smallest possible positive 
value.

I guess this is intentional, so I thought I'd ask why -- it's a 
little unintuitive after the integral type behaviour.

Also, how can I get the truly least value of a floating point 
number? I guess with e.g. -double.max ... ?


More information about the Digitalmars-d-learn mailing list