mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
rearrangement.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15818 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
3aede677ba
commit
fa59ec2f68
2 changed files with 12 additions and 5 deletions
|
@ -1,3 +1,7 @@
|
|||
Fri Mar 21 08:29:33 2008 Tadayoshi Funaba <tadf@dotrb.org>
|
||||
|
||||
* rational.c (nurat_to_f): rearrangement.
|
||||
|
||||
Fri Mar 21 06:44:59 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* rational.c (nurat_to_f): C99.
|
||||
|
|
|
@ -1107,6 +1107,8 @@ nurat_to_f(VALUE self)
|
|||
long nl, dl, ml, ne, de;
|
||||
int e;
|
||||
double f;
|
||||
|
||||
{
|
||||
get_dat1(self);
|
||||
|
||||
if (f_zero_p(dat->num))
|
||||
|
@ -1114,6 +1116,7 @@ nurat_to_f(VALUE self)
|
|||
|
||||
num = dat->num;
|
||||
den = dat->den;
|
||||
}
|
||||
|
||||
if (f_negative_p(num)) {
|
||||
num = f_negate(num);
|
||||
|
|
Loading…
Reference in a new issue