Java Mailing List Archive

http://www.gg3721.com/

Home » user.groovy »

[groovy-user] Change in BicDecimal coercion?

Ronny Løvtangen

2010-02-08

Replies: Find Java Web Hosting

Author LoginPost Reply
Is this change in behavior from Groovy 1.6.5 to 1.6.6 and later intended, or not?

Double d = Math.sin(3)
BigDecimal b1 = d.toBigDecimal()
BigDecimal b2 = d as BigDecimal
BigDecimal b3 = d
println d
println b1
println b2
println b3



Result, Groovy 1.6.5:

0.1411200080598672
0.1411200080598672
0.1411200080598672
0.1411200080598672


Result, Groovy 1.6.6 and 1.7.0:

0.1411200080598672
0.1411200080598672
0.1411200080598672
0.1411200080598672135234750157906091772019863128662109375


Ronny
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 gg3721.com - Jax Systems, LLC, U.S.A.