Re: [pure-lang-users] Yet another quirk with MinGW
Status: Beta
Brought to you by:
agraef
From: Eddie R. <er...@bm...> - 2008-08-20 14:26:23
|
On Wed, 2008-08-20 at 11:20 +0200, Albert Graef wrote: > If anyone has noticed bugs which haven't been fixed yet, please report > them *now*, as I'm about to release Pure 0.5 in the course of the next > few hours. I started playing around with the following script: ------------------------------------------------------ using math; // Handle the unary stuff first let f = [sqrt, sin, cos, tan, ln, log, exp, atan, asin, acos, sinh, cosh, tanh, asinh, acosh, atanh, abs, re, im, arg, conj, rect, polar, cis, ceil, floor, round, frac, complexp, realp, rationalp, numberp, exactp, inexactp, infp, nanp]; let x = [1, -1, 0, 0.0, 1.2, -1.2, 1%3, -1%4, 1+:2, -1+:2, 1+:-2, -1.2 +:4.3, 1.2+:-4.3, 1%2+:1, 1%2+:3%4, 3<:1, -3<:1, 3.0<:-3, 3.1<:2.5, (2%3)<:2, (1%2)<:(3%4), -inf, nan]; // Handle binary stuf; let X = [(i,j); i=x; j=x]; let f2 = [(+), (-), (*), (/), (^), atan2, pow]; let unary = map (\f -> (map (\x -> f x) x)) f; let binary = map (\f -> (map (\(x,y) -> f x y) X)) f2; -------------------------------------------------------- But I have to go to a meeting. Looking through the stuff: > unary; (1) Is sqrt supposed to be defined for nan and inf? ln, sin, cos, etc, are. (2) ceil, floor, round, and frac for complex numbers are undefined and IMHO should stay that way. (3) Shouldn't polar (x<:y) => x<:y ? (4) Shouldn't rect (x+:y) => x+:y ? > binary; (1) pow and atan2 for complex numbers is undefined for a lot of combinations. I'll try to weed through this after work. Got to go. e.r. |