Closed fengyizhu closed 1 year ago
@fengyizhu What does this graph show, and is there a test suite you can share to replicate?
@andi-huber What was the BigInteger
extraction done there? I understand isIntegerOnly()
check simply does a Java type check, but why not apply isInteger()
or try reuse the if(decimal.scale()<=0)
part instead of trying the exception first?
@keilw Please See #388
Indeed, producing stacktraces just to do a check is costly. I merged https://github.com/unitsofmeasurement/indriya/pull/388
see also https://stackoverflow.com/questions/1078953/check-if-bigdecimal-is-an-integer-in-java
@andi-huber @keilw Is there a plan and time to release a revised version?
The scope is here: https://github.com/unitsofmeasurement/indriya/milestone/10 but there's not a concrete time.
tech.units.indriya.function.DefaultNumberSystem#narrow
why not just return BigDecimal?