mailing list of musl libc
 help / color / mirror / code / Atom feed
* question float.h & powerpc
@ 2013-11-15 18:25 James Gregurich
  2013-11-15 19:42 ` Rich Felker
  0 siblings, 1 reply; 8+ messages in thread
From: James Gregurich @ 2013-11-15 18:25 UTC (permalink / raw)
  To: musl

[-- Attachment #1: Type: text/plain, Size: 1650 bytes --]

Hi.

I’m puzzled by the long double settings for powerpc.

bits/float.h has


#define FLT_ROUNDS 1
#define FLT_EVAL_METHOD 0

#define LDBL_TRUE_MIN 4.9406564584124654e-324
#define LDBL_MIN 2.2250738585072014e-308
#define LDBL_MAX 1.7976931348623157e+308
#define LDBL_EPSILON 2.2204460492503131e-16

#define LDBL_MANT_DIG 53
#define LDBL_MIN_EXP (-1021)
#define LDBL_MAX_EXP 1024

#define LDBL_DIG 15
#define LDBL_MIN_10_EXP (-307)
#define LDBL_MAX_10_EXP 308

#define DECIMAL_DIG 17




the clang source code shows

// PPC-LINUX:#define __LDBL_DENORM_MIN__ 4.94065645841246544176568792868221e-324L
// PPC-LINUX:#define __LDBL_DIG__ 31
// PPC-LINUX:#define __LDBL_EPSILON__ 4.94065645841246544176568792868221e-324L
// PPC-LINUX:#define __LDBL_HAS_DENORM__ 1
// PPC-LINUX:#define __LDBL_HAS_INFINITY__ 1
// PPC-LINUX:#define __LDBL_HAS_QUIET_NAN__ 1
// PPC-LINUX:#define __LDBL_MANT_DIG__ 106
// PPC-LINUX:#define __LDBL_MAX_10_EXP__ 308
// PPC-LINUX:#define __LDBL_MAX_EXP__ 1024
// PPC-LINUX:#define __LDBL_MAX__ 1.79769313486231580793728971405301e+308L
// PPC-LINUX:#define __LDBL_MIN_10_EXP__ (-291)
// PPC-LINUX:#define __LDBL_MIN_EXP__ (-968)
// PPC-LINUX:#define __LDBL_MIN__ 2.00416836000897277799610805135016e-292L


I believe that LDBL_MANT_DIG of 53 is for an 8 byte long double, but powerpc uses 16 byte long doubles and has a LDBL_MANT_DIG value of 106.  Why is there a discrepancy? I note that the i386 value is correct at 64. What do I need to do to reconcile this difference to allow the library’s configure script to complete the long double test correctly?

-James

 









[-- Attachment #2: Type: text/html, Size: 5700 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-11-16 20:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-15 18:25 question float.h & powerpc James Gregurich
2013-11-15 19:42 ` Rich Felker
2013-11-15 19:47   ` James Gregurich
2013-11-15 22:30     ` James Gregurich
2013-11-15 23:42       ` Szabolcs Nagy
2013-11-16  8:56         ` James Gregurich
2013-11-16 12:37           ` Szabolcs Nagy
2013-11-16 20:18             ` James Gregurich

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).