From: Josh Cheek Date: 2012-01-23T19:45:07+09:00 Subject: Re: Microrant on Ruy's Math Skills --0016e6d5637a8f9a6b04b72fb80d Content-Type: text/plain; charset=ISO-8859-1 On Mon, Jan 23, 2012 at 4:40 AM, Robert Klemme wrote: > On Mon, Jan 23, 2012 at 11:35 AM, Peter Vandenabeele > wrote: > > On Mon, Jan 23, 2012 at 11:33 AM, Peter Vandenabeele < > peter@vandenabeele.com > > >> Feature request: > >> > >> Based on this discussion, it would actually be useful to me if I could > >> shorten this: > >> > >> amount = BigDecimal.new("15.5") > >> > >> to > >> > >> amount = 15.5B > > Bad idea IMHO because this requires a parser change and also makes all > programs implicitly require "bigdecimal" which is usually not needed. > > > Maybe > > > > 15.5D > > > > is better naming (maps to "Decimal" and the %d of format string). > > Or > > amount = 15.4.to_bd > amount = 15.4.to_decimal > amount = 15.4.to_dec > amount = BD(15.4) > > But this forces it to go through a float which is where the inaccuracies come in. --0016e6d5637a8f9a6b04b72fb80d--