Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > sci.physics > #511309

Re: What Floating-Point Precisions Would Physicists Prefer?

From Fabian Russell <root@localhost.localdomain>
Newsgroups sci.physics
Subject Re: What Floating-Point Precisions Would Physicists Prefer?
Date 2015-08-05 05:14 +0000
Organization NewsGuy - Unlimited Usenet $23.95
Message-ID <pan.2015.08.05.05.14.04@localhost.localdomain> (permalink)
References <05569dcb-68b3-4154-8bab-f13fd12a379a@googlegroups.com>

Show all headers | View raw


On Tue, 04 Aug 2015 20:41:18 -0700, Quadibloc wrote:

> 
> So, from this historical data, I rationalized my way to the notion that a 
> computer which used a 12-bit data element as its basic unit, and which provided 
> floats that occupied 3, 4, or 5 of them - 36, 48, or 72 bits - would satisfy 
> the needs of scientists better than a computer providing 32 and 64 bit floats.
> 

Machine floating point was in a state of unreliable chaos before the 1985 IEEE
standard was established, and the important aspect of this standard was not bit
size but correct rounding for all arithmetic operations.

In short, it's not precision that's critical but rather the choice of
algorithm.  A case in point being the log1p function that is part of
the standard C math library.  For values of x near 0, computing log(1+x)
directly can cause extreme error in spite of precision, whereas the 
log1p function is written to allow even single precision floats to give
highly accurate results.

The same applies to all computations.  The choice or construction of the
algorithm is most important.

But since most hardware is built for it, double binary precision at 64-bits
is most often recommended (using the correct algorithm).  Although 128-bit
or quad binary precision is available on some hardware there has been no
great need to move to this level for most computing.  The only reason
for using single precision FP (32-bit) over double would be to take advantage
of the increased parallelism available in the SSEx instruction sets,
but this may soon be moot as the newer AVX instructions incorporate
256-bit and 512-bit registers for use with double FP values.

However, I stress the "binary" aspect of current FP hardware.  Binary FP
may be suitable for scientific purposes but a *decimal* floating point
format would be better for financial calculations.  Software decimal FP
libraries are currently available and in the future decimal FP hardware
will likely be developed. 


> 
> Are there sources of informatiion on how much precision is needed for various 
> types of scientific computation?
> 

http://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html

Also, Kahan:

http://www.cs.berkeley.edu/~wkahan/

But there is plenty more available through general searches.  Pay particular
attention of the idea of catastrophic cancellation. 

Back to sci.physics | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

What Floating-Point Precisions Would Physicists Prefer? Quadibloc <jsavard@ecn.ab.ca> - 2015-08-04 20:41 -0700
  Re: What Floating-Point Precisions Would Physicists Prefer? Fabian Russell <root@localhost.localdomain> - 2015-08-05 05:14 +0000
    Re: What Floating-Point Precisions Would Physicists Prefer? Quadibloc <jsavard@ecn.ab.ca> - 2015-08-05 04:38 -0700
      Re: What Floating-Point Precisions Would Physicists Prefer? Fabian Russell <root@localhost.localdomain> - 2015-08-05 14:22 +0000
        nano-M-sets noTthaTguY <abu.kuanysh05@gmail.com> - 2015-08-05 13:14 -0700
          Re: nano-M-sets Fabian Russell <root@localhost.localdomain> - 2015-08-05 21:23 +0000
            Re: nano-M-sets Poutnik <poutnik4nntp@gmail.com> - 2015-08-06 08:16 +0200
              Re: nano-M-sets Fabian Russell <root@localhost.localdomain> - 2015-08-06 17:34 +0000
                Re: nano-M-sets Quadibloc <jsavard@ecn.ab.ca> - 2015-08-06 11:23 -0700
                Re: nano-M-sets Fabian Russell <root@localhost.localdomain> - 2015-08-06 18:39 +0000
                Re: nano-M-sets Poutnik <poutnik4nntp@gmail.com> - 2015-08-06 21:07 +0200
                Re: nano-M-sets Fabian Russell <root@localhost.localdomain> - 2015-08-06 19:14 +0000
                Re: nano-M-sets Poutnik <poutnik4nntp@gmail.com> - 2015-08-07 07:41 +0200
                Re: nano-M-sets Quadibloc <jsavard@ecn.ab.ca> - 2015-08-06 14:17 -0700
                Re: nano-M-sets Fabian Russell <root@localhost.localdomain> - 2015-08-06 21:36 +0000
                Re: nano-M-sets Poutnik <poutnik4nntp@gmail.com> - 2015-08-07 08:08 +0200
                Re: nano-M-sets Poutnik <poutnik4nntp@gmail.com> - 2015-08-06 21:05 +0200
        Re: What Floating-Point Precisions Would Physicists Prefer? Quadibloc <jsavard@ecn.ab.ca> - 2015-08-06 11:18 -0700
          Re: What Floating-Point Precisions Would Physicists Prefer? Fabian Russell <root@localhost.localdomain> - 2015-08-06 19:03 +0000
            Re: What Floating-Point Precisions Would Physicists Prefer? Quadibloc <jsavard@ecn.ab.ca> - 2015-08-06 14:11 -0700
              Re: What Floating-Point Precisions Would Physicists Prefer? Fabian Russell <root@localhost.localdomain> - 2015-08-06 21:51 +0000
                Re: What Floating-Point Precisions Would Physicists Prefer? Quadibloc <jsavard@ecn.ab.ca> - 2015-08-06 15:18 -0700
                Re: What Floating-Point Precisions Would Physicists Prefer? Fabian Russell <root@localhost.localdomain> - 2015-08-07 01:11 +0000
                Re: What Floating-Point Precisions Would Physicists Prefer? noTthaTguY <abu.kuanysh05@gmail.com> - 2015-08-07 10:25 -0700
                Re: What Floating-Point Precisions Would Physicists Prefer? Quadibloc <jsavard@ecn.ab.ca> - 2015-08-07 11:41 -0700
                Re: What Floating-Point Precisions Would Physicists Prefer? "hanson" <hanson@quick.net> - 2015-08-07 16:21 -0700
  Re: What Floating-Point Precisions Would Physicists Prefer? Timo <timo@physics.uq.edu.au> - 2015-08-05 04:47 -0700
    Re: What Floating-Point Precisions Would Physicists Prefer? Poutnik <Poutnik4NNTP@gmail.com> - 2015-08-05 14:36 +0200

csiph-web