You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (JIRA)" <ji...@apache.org> on 2017/02/01 23:19:08 UTC

[jira] [Closed] (GROOVY-7997) calling method having a Bigdecimal parameter with a long produces incorrect bigdecimal

     [ https://issues.apache.org/jira/browse/GROOVY-7997?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul King closed GROOVY-7997.
-----------------------------

> calling method having a Bigdecimal parameter with a long produces incorrect bigdecimal
> --------------------------------------------------------------------------------------
>
>                 Key: GROOVY-7997
>                 URL: https://issues.apache.org/jira/browse/GROOVY-7997
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-jdk, groovy-runtime
>    Affects Versions: 2.4.6
>         Environment: linux
>            Reporter: Detlef Brendle
>            Assignee: Andres Almiray
>             Fix For: 2.4.8
>
>
> Assume the following example:
> {code}
> def x = Random.newInstance().nextLong()
> def asBigDecimal(BigDecimal bd){
>     println "bigdecimal value is $bd"
> }
> println "long value is $x"
> asBigDecimal(x)
> {code}
> This will produce two different print outs.
> My expecation is that the printed numbers are equal.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)