Re: double with precision
- From: Eric Sosman <esosman@xxxxxxxxxxxxxxxxxxx>
- Date: Wed, 27 Jun 2007 21:51:15 -0400
post.
top-
don't
Please
Roy Gourgi wrote:
Thanks Eric,
Just out of curiosity why can't the number 1.74 be represented exactly with a double?
Because a double is represented as an integer multiplied
by an integral power (positive or negative) of two. Try to
represent one and seventy-four hundredths that way, and you'll
see the problem. (It's very much like trying to represent
eleven seventeenths in ordinary decimal notation.)
--
Eric Sosman
esosman@xxxxxxxxxxxxxxxxxxx
.
- References:
- double with precision
- From: Roy Gourgi
- Re: double with precision
- From: Roy Gourgi
- double with precision
- Prev by Date: Re: XML JDOM problems
- Next by Date: Re: Sort Method Conversion
- Previous by thread: Re: double with precision
- Next by thread: Re: double with precision
- Index(es):