Floating point minimum values are positive?
John Colvin
john.loughran.colvin at gmail.com
Mon Jul 22 14:05:40 PDT 2013
On Monday, 22 July 2013 at 21:02:30 UTC, Joseph Rushton Wakeling
wrote:
> 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 ... ?
Pretty certain bearophile's been campaigning for the removal of
these. Or am I confusing it with something else?
More information about the Digitalmars-d-learn
mailing list