Fix getShortString(), tune evaluation heuristics.
Bug: 21474616 Rewrite getShortString() to also look at the least significant digit information when available, and try to mimic the display formatting code wherever appropriate. As a result, when the user hits "=", followed by "+" transitions are now more frequently smooth. Revise the evaluation heuristics so the we are more aggressive with the initial evaluation precision, and try harder to discover the leading digit in a near-zero number. Some of this is necessary to keep getShortString() happy. This version should also now guarantee that we are never worse than double precision floating pointing in displaying very small nonzero numbers. If we display a number as zero, the old calculator would have, too. (And now you can scroll to see whether it really is.) Up the BoundedRational bit limit to improve the chances of identifying exact results. In general, the incremental computation cost for operating on larger BigIntegers appears relatively low, so it makes sense to trade longer computations for fewer calls. Change-Id: I33066845b832753c109fcaf27f883b48e7e119d2
Loading
Please register or sign in to comment