From: Josh Cheek Date: 2012-01-29T14:39:37+09:00 Subject: Re: Microrant on Ruy's Math Skills --0016e6d77d9924011004b7a42291 Content-Type: text/plain; charset=ISO-8859-1 On Sat, Jan 28, 2012 at 11:24 PM, Tony Arcieri wrote: > On Sat, Jan 28, 2012 at 10:43 AM, Peter Vandenabeele < > peter@vandenabeele.com > > wrote: > > > That means to remain truely backwards compatible, we would need something > > like: > > > > 1.1 #=> Float (machine dependent) > > 1.1BD #=> BigDecimal ("unlimited" size) > > 1.1D #=> Decimal (e.g. picking the standardized IEEE 754 2008 Decimal128 > > fomat) > > > > I don't think it'd be very Ruby like to have a separate literal syntax > depending on the size of the number. Some precedent: > > >> 1000000000000000.class > => Fixnum > >> 10000000000000000000000000000000000000000000000000.class > => Bignum > > -- > Tony Arcieri > Yeah, but Fixnum and Bignum have different behaviour. I am pretty sure they are substitutable for eachother in every way, they just handle different domains for performance reasons (transparent to the user, without any reasonable exceptions). Float and BigDecimal, however, do have different behaviour and hence do have the need to specify which you want. --0016e6d77d9924011004b7a42291--