Re: Floating point problems (accuracy).

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 18 Jan 2005, Richard Henderson wrote:

On Tue, Jan 18, 2005 at 03:38:33PM -0600, Chris Lattner wrote:
Note that this is severely slow down your code if it is FP intensive, but
it will produce correct results.

Modulo double rounding of course.

Care to elaborate?

  double X = ..
  float F1 = (float)(float)D;
  float F2 = (float)(double)(float)D;
  float F3 = (float)D;

Aren't F1, F2, and F3 identical?

-Chris

--
http://nondot.org/sabre/
http://llvm.cs.uiuc.edu/

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux