Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.0-beta-5
-
Fix Version/s: 1.0-beta-5
-
Component/s: None
-
Labels:None
-
Number of attachments :
Description
1> println( Math.sin(7/3) )
2> go
No such method: sin for class: java.lang.Math with arguments: [2.3333333333]
1> println( Math.sin(2.3333333333) )
2> go
0.7230858817613498
Issue Links
- depends upon
-
GROOVY-256
Numeric literals: default BigDecimal for decimals, support suffixes
-
- is duplicated by
-
GROOVY-359
Problems with numeric types (for example, 2.0D)
-
- relates to
-
GROOVY-275
Allows assignment of a value to a numeric type which is too large for it to hold
-
Workaround:
println( Math.sin( (7/3).doubleValue() ) )