You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I looked at this a little bit (it was easier than doing the hard work of fixing a major performance bug), and I am at a loss at why this result and not say the one that it.
yields the rational number with smallest denominator that lies within dx of x.
And 1 fits this. That the expression -12/1 is not simplified to -12 is another matter.
So other than running MMA, how can we know whether that this should be -11 insteads of -12?
In terms of what Mathics does, is it take integer digits of the continued fraction for the the two bounds it puts on -11.5 +/- 1 and stops at the first digit that it encounters where the upper and lower bounds differ. Then in the code the computation is: min(-13, -11) + 1.
It is easy to see how to adjust this to get -11, but to do this reliably we'd have to know what principle or rule to follow.
Docker web version:
Rationalize[-11.5,1]
returns-12/1
MMA returns-11
.The text was updated successfully, but these errors were encountered: