eclipse-ocl / org.eclipse.ocl

Eclipse Public License 2.0
0 stars 0 forks source link

[evaluator] NumberUtil.isDouble() is unsatisafctory #499

Closed eclipse-ocl-bot closed 1 hour ago

eclipse-ocl-bot commented 1 hour ago

| --- | --- | | Bugzilla Link | 299477 | | Status | CLOSED FIXED | | Importance | P3 normal | | Reported | Jan 13, 2010 06:23 EDT | | Modified | May 29, 2012 13:23 EDT | | Version | 3.0.0 | | Blocks | 156363 | | Reporter | Ed Willink |

Description

NumberUtil.isDouble() is used to determine whether a BigDecimal can be demoted to a Double.

It does this by testing whether BigDecimal.doubleValue() returns a non-infinity value.

It therefore takes no account of whether the BigDecimal represents an explictly or implicitly high precision number.

A BigDecimal is only a Double if the loss of precision in the conversion is compatible with the precision specification of the BigDecimal.

eclipse-ocl-bot commented 1 hour ago

By Ed Willink on Feb 01, 2011 02:43

This functionality is not used by the new evaluator where BigDecimal is used throughout.

eclipse-ocl-bot commented 1 hour ago

By Ed Willink on May 27, 2011 06:41

Resolved for Indigo is 3.1.0 not 3.2.0.

eclipse-ocl-bot commented 1 hour ago

By Ed Willink on May 29, 2012 13:23

Closing all bugs resolved in Indigo.