Re: [pure-lang-users] math.pure
Status: Beta
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2008-08-21 22:49:28
|
Eddie Rucker wrote: > I've been in faculty meetings all day today Oh dear, that sucks. This silly ritual called "meetings" must have been invented long ago by non-creative people to terrorize the rest of us, or to pretend that they are actually doing something. ;-) > ^ was bombing out somewhere for valid numbers. Yeah, part of that surely is the same issue as with sqrt et al (missing nanp check). That should be fixed now (r560). > _^nan = nan; > nan^_ = nan; > inf^inf=inf; > x^inf=inf if x!===nan; > inf^x=inf if x!==nan You surely mean inf^x=inf unless x<0 in which case inf^x=0.0. These should all work now, also the -inf cases, except that C pow() insists on setting 1.0^x = 1.0 no matter what x is. Also, x^0.0 will always be 1.0. I guess that's POSIX behavior, so it should be ok. Not sure about the complex cases x^(+/-inf) where x<0, but I think that these will always return nan+:nan right now. I'm open to suggestions there. For finite, non-integral y, (-inf)^y gives inf+:inf or 0+:0, depending on whether y>0 or y<0, which looks good to me. > After, faculty meetings I hope to be able to look for the error with ^. Please do. Your help with this is really appreciated! Cheers, 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 |