groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Sun <realblue...@hotmail.com>
Subject Re: [GEP] Refine parsing negative numbers
Date Thu, 22 Feb 2018 09:53:25 GMT
Hi Paul,

     Thanks for your finding these discussion.

     As Jochen said: Ruby and Python calculate `-2**4` and return `-16`,
Groovy returns the same value currently.

     But Scala/Excel  returns `16`...

     Maybe Ruby/Python/Groovy behaves properly for most people...
     

blackdrag wrote
> I just checked Ruby and Python and there -2**4 will return -16, same for
> -2^4 in
> Lua. So now I am wondering if that is the right thing for unary minus
> 
> 
> bye blackdrag


Cheers,
Daniel.Sun



--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Mime
View raw message