Re: [PATCH] Complex numbers with inexact zero imaginary part, etc

2011-02-02 Thread Andy Wingo
On Wed 02 Feb 2011 22:36, Mark H Weaver writes: > http://people.csail.mit.edu/jaffer/III/RAWI Fascinating link, thanks. I'm OK with the way things are. BTW: did you see the failures on darwin? http://hydra.nixos.org/build/882506/nixlog/1 Seems there were errors in: FAIL: numbers.tes

Re: [PATCH] Complex numbers with inexact zero imaginary part, etc

2011-02-02 Thread Mark H Weaver
Andy Wingo writes: >> (scm_difference): (- 0 0.0) now returns -0.0. Previously it returned >> 0.0. Also make sure that (- 0 0.0+0.0i) will return -0.0-0.0i. > > Is this right? I can convince myself both ways. I'm not 100% confident, but I'm pretty sure it's the right thing. As far as I ca

Re: [PATCH] Complex numbers with inexact zero imaginary part, etc

2011-02-02 Thread Andy Wingo
On Wed 02 Feb 2011 12:25, Mark H Weaver writes: > Here's another batch of numerics fixes and changes. Applied, thanks! > There are two more patches coming soon: one to improve expt, and one to > add many test cases to numbers.test. Hopefully these can make it into > the imminent prerelease. T

Re: [PATCH] Complex numbers with inexact zero imaginary part, etc

2011-02-02 Thread Andy Wingo
Hi, I just sent a mail I didn't mean to send, I said: On Wed 02 Feb 2011 12:25, Mark H Weaver writes: > * libguile/numbers.c (scm_abs): (abs -0.0) now returns 0.0. > Previously it returned -0.0. I questioned this, but I think it's pretty fine, obviously; I meant to ask about: > (scm_differe

Re: [PATCH] Complex numbers with inexact zero imaginary part, etc

2011-02-02 Thread Andy Wingo
On Wed 02 Feb 2011 12:25, Mark H Weaver writes: > * libguile/numbers.c (scm_abs): (abs -0.0) now returns 0.0. Previously > it returned -0.0. I applied this, but is it right? I can convince myself both ways. Andy -- http://wingolog.org/

[PATCH] Complex numbers with inexact zero imaginary part, etc

2011-02-02 Thread Mark H Weaver
Here's another batch of numerics fixes and changes. Most notably, the final patch allows Guile to represent non-real complex numbers with inexact zero imaginary part. The first two patches fix bugs and improve handling of signed zeroes. Note that the patches are meant to be applied after my earl