diff --git a/NEWS b/NEWS index 4c697aac1..eda213135 100644 --- a/NEWS +++ b/NEWS @@ -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 diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 27f23965e..7c73c47e1 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,5 +1,9 @@ 2003-11-19 Marius Vollmer + * 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.