Closed edhom closed 2 years ago
@fkleon Did you have a chance to look at this already?:)
Oops, somehow slipped through the cracks. Thanks for the detailed description, I'd be happy to include this fix.
Given that you already have a test case, could you add it to the actual unit test suite?
As a final note, this is a pretty specific case and there are of course limits, for example if second
is not a division directly, but a more complex expression which may simplify further.
@fkleon Sorry for the late follow up. Thanks a lot! I added it to the Composite Function evaluation
test. Hope this is fine:)
And yes, I know this is very specific, but at least for our use case this seems to be sufficient, since this is how you typically express n-roots.
No problem, thanks for your contribution and circling back to add the test. Have released this as 2.3.1 to pub!
The following equations are equal:
However, evaluating those for a negative
x
wont raise the same result. This is due to the IEEE standard for floating point arithmetic, which definesNaN
for the case of a negative base and a non-integer exponent. Since this package is not about floating point arithmetic, but rather about mathematical equations, I would like to propose a fix for at least that case.The following test succeeds with the proposed change.