1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* rational.c (nurat_to_f): C99.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15817 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2008-03-20 21:45:01 +00:00
parent f778691dfa
commit 3aede677ba
2 changed files with 5 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Fri Mar 21 06:44:59 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
* rational.c (nurat_to_f): C99.
Fri Mar 21 01:40:27 2008 Yusuke Endoh <mame@tsg.ne.jp>
* complex.c (nucomp_sub, nucomp_expt): call corresponding functions.

View file

@ -1102,12 +1102,12 @@ i_ilog2(VALUE x)
static VALUE
nurat_to_f(VALUE self)
{
get_dat1(self);
VALUE num, den;
int minus = 0;
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);