Re: problem with 'double'

From: George Neuner (gneuner2/_at_comcast.net)
Date: 07/10/04


Date: Sat, 10 Jul 2004 07:19:05 -0400

On Fri, 09 Jul 2004 12:38:15 -0400, Tom McGlynn
<tam@lheapop.gsfc.nasa.gov> wrote:

>I wonder if this continual misunderstanding of floating point suggests that the
>default floating point representation for data should be decimal rather
>than binary.
>
>This isn't going to happen any time soon, but in a world where only a tiny
>fraction of applications really need to worry about the efficiency of
>floating point computations, maybe it would be better to have a
>a default numeric model in the computer that is closer to what we use outside
>of it.

For many purposes, a fraction based implementation akin to Lisp's
rational numbers would be a reasonable choice. Using 64-bit integers
for numerator and denominator gives plenty of range and precision and
covers most typical program uses of reals.

George

-- 
for email reply remove "/" from address


Relevant Pages

  • Re: How to represent a fraction in HEX?
    ... > I wish to take a fraction in DEC say .4 and convert it to a HEX value. ... The examples you give are *not* fractions but floating point numbers, ... point number (up to the precision of the machine), ... Just take the binary representation of the ...
    (comp.lang.cpp)
  • Re: Floating point questions
    ... Packed decimal is definitely of IBM origin, but was fully supported on VAXn ... IIRC to convert from integer to floating, ... IBM floating point has a binary fraction and a base 16 exponent. ... typically include language support for decimal-scaled packed decimal ...
    (comp.os.vms)
  • Re: decimal round off issue
    ... representation of floating point numbers. ... floating point CANNOT represent the base ten number "2.25"? ... I'm not sure that rounding happens the same way on all systems when there is ... a repeting binary fraction. ...
    (comp.lang.perl.misc)
  • Re: BASH question
    ... |> Fractional parts is not the same as floating point. ... fraction point if a base other than 10). ... a fixed point value will always have the same precision but a limit ... digits of storage for the number we could represent all values from 0.00 to ...
    (Fedora)
  • Re: converting floating point to fixed point
    ... H aka N wrote: ... I need to convert floating point inputs to fixed point (11 ... bits for integer and 10 bits for the fraction) representation in a ...
    (comp.lang.vhdl)