Re: [pure-lang-users] complex 0
Status: Beta
Brought to you by:
agraef
|
From: Albert G. <Dr....@t-...> - 2008-09-09 11:13:04
|
John Cowan wrote: > Division with slash effectively promotes its arguments to floats, so > 0.0 should be promoted to 0.0+:0.0. Good point! In fact gcc seems to do that, too (I get nan+:nan for /0.0 just as well as for /(0.0+I*0.0). However, that's *not* what ISO/IEC9899, Annex G [1] says (see G.5.1, especially Example 2). It requires an inf+I*inf result in the /0.0 case, if I read it right. That has the "informative" sticker (i.e., "recommended" but not "normative"), so implementations may differ. AFAICT, my implementation in math.pure conforms with Annex G (at least the multiplicative operators, still have to check the others). So I guess I'll just leave it at that for now. [1] I'm referring to the 2005 draft, couldn't find anything newer. Here's the URL: http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf Albert -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |