diff --git a/ChangeLog b/ChangeLog index cbe6692b6b..7bfe22a532 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Mar 21 08:29:33 2008 Tadayoshi Funaba + + * rational.c (nurat_to_f): rearrangement. + Fri Mar 21 06:44:59 2008 Nobuyoshi Nakada * rational.c (nurat_to_f): C99. diff --git a/rational.c b/rational.c index ccf214c32a..4deb54d6e2 100644 --- a/rational.c +++ b/rational.c @@ -1107,13 +1107,16 @@ nurat_to_f(VALUE self) long nl, dl, ml, ne, de; int e; double f; - get_dat1(self); - if (f_zero_p(dat->num)) - return rb_float_new(0.0); + { + get_dat1(self); - num = dat->num; - den = dat->den; + if (f_zero_p(dat->num)) + return rb_float_new(0.0); + + num = dat->num; + den = dat->den; + } if (f_negative_p(num)) { num = f_negate(num);