comparison src/data.c @ 5903:5afddd952c46

Return ratios in canonical form too, #'string-to-number src/ChangeLog addition: 2015-05-08 Aidan Kehoe <kehoea@parhasard.net> * data.c (Fstring_to_number): Canonicalise ratios in this function, as we do bignums.
author Aidan Kehoe <kehoea@parhasard.net>
date Fri, 08 May 2015 13:58:22 +0100
parents c96000075e49
children 85fd1ab80057
comparison
equal deleted inserted replaced
5902:2dc8711af537 5903:5afddd952c46
1359 save = *end; 1359 save = *end;
1360 *end = '\0'; 1360 *end = '\0';
1361 ratio_set_string (scratch_ratio, (const char *) p, b); 1361 ratio_set_string (scratch_ratio, (const char *) p, b);
1362 *end = save; 1362 *end = save;
1363 ratio_canonicalize (scratch_ratio); 1363 ratio_canonicalize (scratch_ratio);
1364 return make_ratio_rt (scratch_ratio); 1364 return Fcanonicalize_number (make_ratio_rt (scratch_ratio));
1365 } 1365 }
1366 #endif /* HAVE_RATIO */ 1366 #endif /* HAVE_RATIO */
1367 1367
1368 #ifdef HAVE_BIGNUM 1368 #ifdef HAVE_BIGNUM
1369 { 1369 {