Re: [pure-lang-users] complex 0
Status: Beta
Brought to you by:
agraef
From: Eddie R. <er...@bm...> - 2008-09-11 12:42:00
|
I know I'm the one that brought this up, but how about we revisit the issue later when we have time to think about this. IIRC you needed to finish Pd for you classes. Later, we can compare Pure results to GSL's results. I think consistency with GSL should be a must. I'll note math things that look funny and we can hash them later. I'll just report other types of errors for now. e.r. On Thu, 2008-09-11 at 12:34 +0200, Albert Graef wrote: > I'm beginning to wonder whether it's really worth the hassle to follow > the ISOC99 recommendations concerning the treatment of infinities and > NaNs for complex * and /. The algorithms in Annex G do look like a kind > of kludge to me, and they employ C99 functions for extracting and > scaling the exponents of floating point numbers which might not be > available on some systems (such as Windows), at least not directly. > Hence special support in the runtime would be needed to implement these > in a portable way across all platforms. > > That seems like an awful lot of kludges to just make those nan+:nan's go > away, considering that Pure also offers the polar representation where > you'll get the correct infinite results for division by zero and similar > cases, as long as the phase angles are finite. > > So actually John's suggestion seems to be the most reasonable: just > promote real operands of * and / to complex, then the results will at > least be consistent. Or does anyone here really need the ISOC > recommended behaviour? > > Albert > |