AW:Re: bigdecimal

It sais,that to_d is deprecated. Better use to_s("F")

A Berger <aberger7890@gmail.com> schrieb:

···

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

In that case why not just use .to_f?

···

Sent from my iPhone

On Feb 27, 2016, at 12:58 PM, Ralf Müller <ralf.mueller@mpimet.mpg.de> wrote:

It sais,that to_d is deprecated. Better use to_s("F")

A Berger <aberger7890@gmail.com> schrieb:

Hello Hassan
perhaps you could tell me which paragraph in Class: BigDecimal (Ruby 2.3.0) contains the information what to do if 3.1.to_d isnt working? (no such method... after requiring)

Thx Berg

Unsubscribe: <mailto:ruby-talk-request@ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk&gt;

Hello
x.to_s("F"), y.to_f, (x+y).to_s("F")
x:
1.33333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333E1

y: 1/3 0.333333333333333 # rational

x+y:
1.66666333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333333E1

why is the result x+y less than x + y ?