1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 22:31:12 +02:00

*** empty log message ***

This commit is contained in:
Marius Vollmer 2003-11-19 05:13:53 +00:00
parent c60e130c97
commit fb16d26e23
2 changed files with 8 additions and 1 deletions

5
NEWS
View file

@ -485,9 +485,12 @@ When you want the old behavior, use 'round' explicitely:
This function finds a simple fraction that is close to a given real
number. For example (and compare with inexact->exact above):
(rationalize 1.234 0.0005)
(rationalize (inexact->exact 1.234) 1/2000)
=> 58/47
Note that, as required by R5RS, rationalize returns only then an exact
result when both its arguments are exact.
** 'odd?' and 'even?' work also for inexact integers.
Previously, (odd? 1.0) would signal an error since only exact integers

View file

@ -1,5 +1,9 @@
2003-11-19 Marius Vollmer <mvo@zagadka.de>
* numbers.c (scm_make_ratio): Rewritten to have a simpler
structure. Previously, not all cases with a negative denominator
were covered.
* numbers.c (mem2decimal_from_point): use scm_divide instead of
scm_divide2real when forming the fractional part. This allows
"#e1.2" to yield 6/5.