This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] problems in hypotf math function
- From: Richard Sandiford <richard at codesourcery dot com>
- To: Bob Wilson <bwilson at tensilica dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Mon, 01 Aug 2005 22:30:00 +0100
- Subject: Re: [PATCH] problems in hypotf math function
- References: <42EE8F3B.5060406@tensilica.com>
Bob Wilson <bwilson@tensilica.com> writes:
> The attached patch combines my fix for denormal values and Richard
> Sandiford's change from newlib. Presumably he had a good reason for
> changing the scaling factor to 2^68.
According to my notes, the reason was that:
Scaling by 2**-60 isn't enough if both arguments are near the
extreme end of the range, such as in hypotf (2**125, 2**125).
We'd end up multiplying two numbers O(2**65), which overflows.
Richard