Vincent Lefevre <[EMAIL PROTECTED]> writes: > On 2005-05-31 15:33:48 +0200, Andreas Schwab wrote: >> Vincent Lefevre <[EMAIL PROTECTED]> writes: >> > On 2005-05-31 14:27:01 +0200, Andreas Schwab wrote: >> >> Vincent Lefevre <[EMAIL PROTECTED]> writes: >> >> > But as I said on my page, this isn't much a problem since users >> >> > who really need *extended* precision can still set the rounding >> >> > precision to extended precision; this isn't portable, but extended >> >> > precision isn't portable anyway. >> >> >> >> What about LDBL_* from <float.h>? >> > >> > What do you mean here? >> >> They give you access to long double in a portable manner, > > No, this is not portable,
Sure they are, since they are required since C89. > since if extended precision is necessary to get correct results for some > application, the same application run on PowerPC, where there is no > extended precision, would give incorrect results. You can use <float.h> to find that out. That's what portability is about. >> but if you change the rounding mode then the constants are no longer >> accurate. > > The implementation could provide another way to get the necessary > information; perhaps nextafterl()... But you still have to take care of (1.0 + LDBL_EPSILON) != 1.0, or the other required identities in <float.h>. Andreas. -- Andreas Schwab, SuSE Labs, [EMAIL PROTECTED] SuSE Linux Products GmbH, Maxfeldstraße 5, 90409 Nürnberg, Germany Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."