From: Brian Candler Date: 2009-12-27T17:10:26+09:00 Subject: Re: Trig value errors If the objective is for sin() to be equally inaccurate/imprecise around 0.0 as it is around 1.0, then try this: module Math def sin2(x) 1.0 - (1.0 - sin(x)) end module_function :sin2 end >> include Math => Object >> od = 2*PI/360 => 0.0174532925199433 >> sin(od/1e8) => 1.74532925199433e-10 >> sin2(od/1e8) => 1.74532943653105e-10 >> sin(od/1e16) => 1.74532925199433e-18 >> sin2(od/1e16) => 0.0 >> -- Posted via http://www.ruby-forum.com/.