From: Chad Perrin Date: 2012-01-28T04:46:07+09:00 Subject: Re: Microrant on Ruy's Math Skills On Sat, Jan 28, 2012 at 04:32:14AM +0900, Tony Arcieri wrote: > I think the real path forward here would be to propose that BigDecimal is > loaded by default in Ruby 2.0, and to propose some type of literal > representation for them, such as 1.1D that was suggested before. > > The thing that stops people from using BigDecimal right now is the > inconvenience of doing BigDecimal("1.1"), and the output of BigDecimal#to_s > and #inspect is difficult to interpret. Use BigDecimal#to_s('F') to get something that looks like "1.1" (instead of BigDecimal#to_s with no arguments, which gives you something that looks like "0.11E1"). Of course, that "to_s('F')" is a pain in the fourth point of contact to type with any regularity. -- Chad Perrin [ original content licensed OWL: http://owl.apotheon.org ]