This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: libm-test.inc: Computing ulps near FP_ZERO.
- From: Rich Felker <dalias at aerifal dot cx>
- To: Carlos O'Donell <carlos at redhat dot com>
- Cc: Brooks Moses <brooks_moses at mentor dot com>, GNU C Library <libc-alpha at sourceware dot org>, "Joseph S. Myers" <joseph at codesourcery dot com>, Andreas Jaeger <aj at suse dot com>, Thomas Schwinge <thomas at codesourcery dot com>, David Miller <davem at davemloft dot net>
- Date: Tue, 9 Apr 2013 12:01:41 -0400
- Subject: Re: libm-test.inc: Computing ulps near FP_ZERO.
- References: <5160A4D7 dot 9080802 at codesourcery dot com> <516183BD dot 6060700 at redhat dot com> <5161AADF dot 2040403 at codesourcery dot com> <5161FA1A dot 5060100 at redhat dot com> <51620F35 dot 5080101 at codesourcery dot com> <51634CA1 dot 4050006 at redhat dot com> <51636912 dot 10702 at codesourcery dot com> <5163710F dot 9080500 at mentor dot com> <20130409020954 dot GT20323 at brightrain dot aerifal dot cx> <51643640 dot 5090900 at redhat dot com>
On Tue, Apr 09, 2013 at 11:39:44AM -0400, Carlos O'Donell wrote:
> On 04/08/2013 10:09 PM, Rich Felker wrote:
> > I'm a bit confused about this whole discussion. If the test is
> > cos(M_PI_2) then according to Wolfram Alpha,
> > cos(1.5707963267948965579989817342720925807952880859375), where that
> > argument is the exact value of M_PI_2, evaluates to approximately:
> >
> > 6.123233995736765886130329661375001... Ã 10^-17
>
> Could you do me a favour and compute:
>
> cpow (0.75 + 1.25 i, 0.75 + 1.25 i)?
Wolfram Alpha says:
0.11750629391447355542027983221042048264448457971691710227141... +
0.34655274770833867648302535206041800107792019145641861264503... i
(http://www.wolframalpha.com/input/?i=%280.75%2B1.25i%29%5E%280.75%2B1.25i%29)
> Could you also compute:
>
> cosf(M_PI_2)?
M_PI_2 converted to float is: 0x1.921fb6p+0, or as an exact decimal
value, 1.57079637050628662109375
Wolfram Alpha gives:
-4.371139000186241438857289400265215231661253217515547583... Ã 10^-8
(http://www.wolframalpha.com/input/?i=cos%281.57079637050628662109375%29)
Rich