On 24 December 2010 14:47, Marnen Laibow-Koser <[email protected]> wrote: > Frederick Cheung wrote in post #970500: >> On Dec 24, 2:39pm, Frederick Cheung <[email protected]> >> wrote: >>> On Dec 24, 2:21pm, Marnen Laibow-Koser <[email protected]> wrote: >> >>> Which still doesn't allow you to store all numbers with arbitrary >>> precision (in fact putting my mathematical hat on, most numbers can't >>> be stored like this). You'll have to deal with numerical error >>> eventually >> >> Talking slight bollocks. I meant that you can't store with infinite >> precision, ie you'll always be liable for some error. > > Of course. You know a better way? Should we just store everything as > Rational?
For things that _are_ decimal numbers (such as money) use Fixed or BigDecimal and for things that are not decimal then use Float and determine the errors if it is important. Colin -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

