This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Change definition of complex::norm
- To: bkoz at redhat dot com (Benjamin Kosnik)
- Subject: Re: Change definition of complex::norm
- From: Brad Lucier <lucier at math dot purdue dot edu>
- Date: Wed, 31 Oct 2001 22:56:18 -0500 (EST)
- Cc: lucier at math dot purdue dot edu (Brad Lucier), gcc at gcc dot gnu dot org, hjstein at bloomberg dot com, nbecker at fred dot net, gdr at codesourcery dot com
> > 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