Re: Floating point performance issue

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

 



* On Tue Dec 20 12:48:53 +0100 2011, Dario Saccavino wrote:
 
> 2011/12/20 Vincent Lefevre <vincent+gcc@xxxxxxxxxx>:
> > On 2011-12-20 10:34:35 +0000, Jonathan Wakely wrote:
> >> On 20 December 2011 10:20, Ico wrote:
> >> >
> >> > I have been reducing the program to see what the smallest code is
> >> > that still shows this behaviour. Latest version is below.
> >> >

> The problem doesn't manifest when the hardware mode flush-to-zero
> (FTZ) is enabled. This flag causes the hardware to round all denormal
> values produced by an operation to zero.
> 
> In the second program, if 0.5 < f < 1 the values of a and b eventually
> become the smallest representable denormal value and never change
> afterwards, resulting in a large number of operations involving
> denormal numbers.
> When f <= 0.5, in the default rounding mode, when a is the smallest
> representable number the result of (a * f) is zero. Therefore denormal
> numbers are produced only a small number of times.

Clear, thank you for the thorough explanation. I was so naive to assume
I knew 'enough' of floating point operations for daily use, but it seems
that I have some reading to do.

Ico
-- 
:wq
^X^Cy^K^X^C^C^C^C


[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