On 2005-05-31 16:07:53 +0200, Andreas Schwab wrote: > 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.
The "long double" type is required, but it is not required to be extended precision. > > 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. No, this is not sufficient. > >> 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>. Once you change the rounding precision, this is no longer required, since you are already working with an extension. -- Vincent Lefèvre <[EMAIL PROTECTED]> - Web: <http://www.vinc17.org/> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/> Work: CR INRIA - computer arithmetic / SPACES project at LORIA