|
From: Danny S. <dan...@cl...> - 2005-01-29 01:19:07
|
Greg Chicares wrote: > On 2005-01-27 03:29 AM, Danny Smith wrote: >> BTW, do we need long double versions of the M_* defines to ensure enough >> precision? > > Gosh, you're right--that's a real problem. > > We want DECIMAL_DIG digits in a long double context. That means > 21 digits according to C99 5.2.4.2.2/13: > <snip> > >> Will you update your patch on the Sourceforge patch tracker? > > I will. First, though, let's try to solve the M_LN2 problem. > I'd hate to hardcode a constant value in expm1() now, when what > we really want is to use that macro, but with a value that's > not overstated. > If we really want exact 64-bit representation we could use float hex format, but IIRC 2.95 had a bug with hex format (S Moshier published a patch to fix the gcc bug, and I think I put it into some of the later 2.95.3-x distros).. The hex float numbers could be generated using a union of shorts and long double. I could use the Cephes ldtoa code to get decimal values as well, and check against published values In any event, I think we should keep the OPENX defines and add new ones, like _M_EL, M_LOG2EL, etc. Danny |