From c942417791e74428fce1ed2a722c679fca5f131e Mon Sep 17 00:00:00 2001 From: naruse Date: Thu, 25 Feb 2010 02:26:22 +0000 Subject: * rational.c (nurat_expt): use Float#** when Rational ** Float. This fixes Rational(3,1)**3.0=>26.99999999999999 on FreeBSD. * complex.c (rb_fexpt): removed. Note that this function is not static but is private. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26760 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- rational.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'rational.c') diff --git a/rational.c b/rational.c index 43917bc8da..65d3cf4a35 100644 --- a/rational.c +++ b/rational.c @@ -901,8 +901,6 @@ nurat_fdiv(VALUE self, VALUE other) return f_to_f(f_div(self, other)); } -extern VALUE rb_fexpt(VALUE x, VALUE y); - /* * call-seq: * rat ** numeric -> numeric_result @@ -959,7 +957,7 @@ nurat_expt(VALUE self, VALUE other) /* fall through */ case T_FLOAT: case T_RATIONAL: - return rb_fexpt(f_to_f(self), other); + return f_expt(f_to_f(self), other); default: return rb_num_coerce_bin(self, other, id_expt); } -- cgit v1.2.3