Re: double with precision



On Wed, 27 Jun 2007 18:25:16 -0400, "Roy Gourgi" <royng@xxxxxxxxxxxx>
wrote, quoted or indirectly quoted someone who said :

Just out of curiosity why can't the number 1.74 be represented exactly with
a double?

because 1/100 is a repeater when expressed in binary just as 1/3 is a
repeater when expressed in decimal.

see http://mindprod.com/jgloss/floatingpoint.html
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
.



Relevant Pages

  • Re: Issue With ArrayList
    ... Roedy Green Canadian Mind Products ... Rapidly agin'. ...
    (comp.lang.java.programmer)
  • Re: Java serialization over network
    ... Roedy Green Canadian Mind Products ... "Danish studies of 10,000 birds killed revealed that almost all died in ...
    (comp.lang.java.programmer)
  • Re: Clearing the cmd window
    ... Roedy Green Canadian Mind Products ... "The most significant trend in the US industry has been the decline in the amount ...
    (comp.lang.java.help)
  • Re: [Popupmenu]What is the use of Label and Name
    ... Roedy Green Canadian Mind Products ... "Out of 135 criminals, including robbers and rapists, 118 admitted that when they were children they burned, hanged and stabbed domestic animals." ...
    (comp.lang.java.help)
  • Re: truncating text
    ... You have two tools to fine tune the size. ... Roedy Green Canadian Mind Products ...
    (comp.lang.java.help)