This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
sparc, ia64: Compute cos(M_PI_2l) for your 128-bit long double please.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>, Mike Frysinger <vapier at gentoo dot org>, David Miller <davem at davemloft dot net>
- Cc: Rich Felker <dalias at aerifal dot cx>, 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>
- Date: Wed, 10 Apr 2013 16:47:26 -0400
- Subject: sparc, ia64: Compute cos(M_PI_2l) for your 128-bit long double please.
- 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> <20130409160141 dot GX20323 at brightrain dot aerifal dot cx> <51645137 dot 3030905 at redhat dot com> <m2fvyz1f0a dot fsf at igel dot home> <5164D25B dot 9090406 at redhat dot com> <m2fvyyjp82 dot fsf at igel dot home>
On 04/10/2013 12:59 PM, Andreas Schwab wrote:
>> Compare the result to that above.
>
> cos(1.570796326794896619231321691639740613531845480547870673025773690344164545962257761857472360134124756)
> =
> 1.08285667392191396822374616986058097436571808467374565450525369335663686512102570113103548107282589776676871790606...
> Ã 10^-32
Andreas,
Thanks, adding it to the patch under the assumption that
this was IBM long double.
What about m68k?
Also does it make sense to distinguish the types by mantissa digits?
#ifdef TEST_FLOAT
/* 32-bit float. */
TEST_f_f (cos, M_PI_2l, -4.371139000186241438857289400265215e-8L);
#endif
#if defined TEST_DOUBLE
/* 64-bit double. */
TEST_f_f (cos, M_PI_2l, 6.123233995736765886130329661375001e-17L);
#endif
#if defined TEST_LDOUBLE && LDBL_MANT_DIG == 64
/* 96-bit long double. */
TEST_f_f (cos, M_PI_2l, -2.50827880633416601177866354016537e-20L);
#endif
#if defined TEST_LDOUBLE && LDBL_MANT_DIG == 106
/* 128-bit IBM long double. */
TEST_f_f (cos, M_PI_2l, 1.082856673921913968223746169860580e-32L);
#endif
#if defined TEST_LDOUBLE && LDBL_MANT_DIG == 113
/* 128-bit long double. */
TEST_f_f (cos, M_PI_2l, ???);
#endif
Yes - 32-bit float (flt-32) (*)
Yes - 64-bit double (dbl-64) (*)
? - 96-bit long double (ldbl-96)
* Yes - 80-bit extended precision (x86, x86-64, x32)
* ? - ? (m68k, ia64)
Yes - 128-bit IBM long double (ldbl-128ibm) (power)
Not yet - 128-bit long double (ldbl-128) (mips64, alpha, aarch64, s390, s390x, sparc32, sparc64)
It looks like tile* has no long double type?
Dave,
Could you check the answer for cos(M_PI_2l) on sparc for 128-bit long double?
It should only take a minute.
For steps on how to compute this see:
http://sourceware.org/ml/libc-alpha/2013-04/msg00286.html
For background see:
http://sourceware.org/ml/libc-alpha/2013-04/msg00273.html
Mike,
Likewise for ia64?
Cheers,
Carlos.