From: Brian Candler Date: 2008-12-20T20:29:13+09:00 Subject: Re: about Float I get the correct answer using bc too: $ bc scale=100 x=77617 y=33096 t1=(333.75-x*x)*y*y*y*y*y*y t2=x*x*(11*x*x*y*y - 121*y*y*y*y - 2) t3=5.5*y*y*y*y*y*y*y*y t4=x/(2*y) t1+t2+t3+t4 -.827396059946821368141165095479816291999033115784384819917814841672\ 7096930142615421803239062122310854 However, using BigDecimal, the answer is remarkably different: require "bigdecimal" puts f(BigDecimal.new("77167.0"),BigDecimal.new("33096.0")) # => 9.15359360631475e+34 That's a sign plus 35 orders of magnitude different :-) -- Posted via http://www.ruby-forum.com/.