# HG changeset patch # User Aidan Kehoe # Date 1431089902 -3600 # Node ID 5afddd952c46c611280952be4eb8311a0abc25ad # Parent 2dc8711af537f1664d31f0d07eb04844b705614d Return ratios in canonical form too, #'string-to-number src/ChangeLog addition: 2015-05-08 Aidan Kehoe * data.c (Fstring_to_number): Canonicalise ratios in this function, as we do bignums. diff -r 2dc8711af537 -r 5afddd952c46 src/ChangeLog --- a/src/ChangeLog Fri May 08 12:47:13 2015 +0100 +++ b/src/ChangeLog Fri May 08 13:58:22 2015 +0100 @@ -1,3 +1,8 @@ +2015-05-08 Aidan Kehoe + + * data.c (Fstring_to_number): + Canonicalise ratios in this function, as we do bignums. + 2015-05-08 Aidan Kehoe * chartab.h (get_char_table): diff -r 2dc8711af537 -r 5afddd952c46 src/data.c --- a/src/data.c Fri May 08 12:47:13 2015 +0100 +++ b/src/data.c Fri May 08 13:58:22 2015 +0100 @@ -1361,7 +1361,7 @@ ratio_set_string (scratch_ratio, (const char *) p, b); *end = save; ratio_canonicalize (scratch_ratio); - return make_ratio_rt (scratch_ratio); + return Fcanonicalize_number (make_ratio_rt (scratch_ratio)); } #endif /* HAVE_RATIO */