You're making a logic insinuation here that anything C# does is good
enough for Java. That is not a self-evident statement and you haven't
bothered to logically defend it. Therefore your entire reasoning is
faulty; the 'implementation detail' that is IEEE-754 is extremely
leaky, and anyone programming with doubles and floats that isn't aware
of the various caveats of IEEE-754 numbers is going to make grave
errors. Thus I'm fairly sure your analysis that MIN_VALUE isn't
necessary is in fact hogwash. You do need it.

Is it a good name? Not really, its not always evident what it does,
and in general a constant name should be clear without needing to read
documentation. Also, Integer.MIN_VALUE means something entirely
different, making it worse.

So, necessary? Yeah. Badly named? Yeah. Seems simple enough.


On Oct 18, 4:08 pm, Casper Bang <[email protected]> wrote:
> > There is a need for smallest Double.MIN_VALUE being positive because there
> > is are gaps in the range of values that can be expressed by a Double.
>
> Internal irrelevant stuff the user shouldn't be bothered with. It's
> the same kind of implementation leak seen elsewhere in Java, i.e.
> BigDecimal's broken equals method where 3.1 isn't equal to 3.10.
>
> > It makes perfect sense to have Double.MIN_VALUE so one can determine the
> > boundaries of what numbers can be represented by a Double at <a> and <b> in
> > the above nasty range.
>
> The C# implementations have no trouble offering just MaxValue,
> MinValue, PositiveInfinity and NegativeInfinity. If you need arbitrary
> base-10 precision, there are datatypes for that (BigDecimal and
> decimal).
>
> > Also calling the constant FRACTION or some derivative would be wrong as that
> > is not the official term -http://en.wikipedia.org/wiki/Floating_point.
>
> Whether you want to refer to it as significand, mantissa, coefficient
> or donut is irrelevant - I am sure you can see that "value" is
> somewhat treturous. I.e. Double.valueOf(...) does NOT exclude the
> exponent part.

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to