Re: [pure-lang-users] math.pure
Status: Beta
Brought to you by:
agraef
From: Eddie R. <er...@bm...> - 2008-08-22 12:45:11
|
On Fri, 2008-08-22 at 00:50 +0200, Albert Graef wrote: > 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. ;-) LOL. I agree completely! The only other thing I might add, It's the administrator's way of making us pay for summers and holidays ;-) > 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. What a moron :-O I'm totally embarrassed? Oh shame shame. If I reached up right now, I would be too short to touch bottom. > 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. Still mortified over that last one but mzscheme gives the following: For x < 0, > (expt -4.0 -inf.0) 0.0 > (expt -4.0 +inf.0) +inf.0 For complex x, > (expt 1+2i -inf.0) +nan.0+nan.0i > (expt 1+2i +inf.0) +nan.0+nan.0i e.r. |