This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Change definition of complex::norm


> > norm_2 uses the definition in std_complex.h (with the fixed abs, i.e.,
> > abs_1). norm_1 uses the simpler, faster, algorithm for norm proposed
> > by nbecker.  Here, the simpler algorithm gives an anwer that loses
> > all precision.  On the other hand, I can't judge how important it
> > is that a simpler, faster, algorithm gives 0.0 as the answer instead
> > of 4.940656e-324.
> 
> Good question. I doubt there is any precision in this number, but who 
> knows. Physicists? Gaby? 

The input values were chosen so that the "correct" answer was in the low
denormal range.  In this range, relative precision makes little sense,
but the computed answer is close to the best answer in absolute precision.

Brad


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]