This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [patch,complex] Replace hard-coded constants
On Nov 28 14:01, Ralf Corsepius wrote:
> On 11/27/2010 05:35 PM, Marco Atzeri wrote:
> >--- Sab 27/11/10, Corinna Vinschen ha scritto:
> >>Are there any mathematicians here who would like to provide
> >>their
> >>point of view to this problem?
> [...]
>
> >>Marco, since you added these functions, do you have a
> >>decided opinion?
> >
> >at first glance ÂHUGE_VAL, ÂHUGE_VALF, should be better,
> >bit I need to better check this problem.
>
> Provided what opengroup says about HUGE_VAL wrt. "tan" and when
> looking at this issue and implementation from a technical POV, I
> don't see much reasons for not using HUGE_VAL.
>
> It at least resolves the compilation/portability issues I am facing,
> without changing the general working principle of the code.
>
> Whether this is mathematically correct and technically 100% correct,
> are different questions, which currently are not entirely clear to
> me.
>
> Please find enclosed a version of the patch, now using HUGE_VAL
> instead of MAXNUM.
>
> Ralf
> * libm/complex/catan.c, libm/complex/catanf.c,
> libm/complex/ctan.c, libm/complex/ctanf.c:
> Use HUGE_VAL instead of MAXNUM.
Thanks, I applied the patch for now. It's certainly better that using
the artificial MAXVAL values, and it doesn't hinder any mathematical
better solution in the future.
Corinna
--
Corinna Vinschen
Cygwin Project Co-Leader
Red Hat