guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Serious bug inn GUILE rational handling


From: Bill Schottstaedt
Subject: Re: Serious bug inn GUILE rational handling
Date: Sun, 24 Dec 2006 03:32:41 -0800

> I have removed support for the reduced bit, and put the reduction in
> make_fraction.

I think it was intended that equal? would use scm_i_fraction_equalp
which reduces both arguments before checking equality.  So the
simplest fix would be to mask off the reduced bit in the cell type
in the check for cell type equality in scm_equalp.  I would hesitate
to remove support for this bit because it will mean you get gcd
on every integer divide!  The current system already slows Guile
down by about 10%.   On the race condition, my vage recollection
is that the "is this safe?" question was mine, and I hoped at that
time that someone who knew about such things would check it
out -- I believe (it's been a long time since I looked at this stuff)
that if that line is not safe, there are a lot more like it scattered
around Guile, so it's scarcely reason to jettison the entire thing.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]