On Wed, 2 Oct 2024 18:16:06 GMT, Raffaello Giulietti <rgiulie...@openjdk.org> wrote:
> Without experimenting a bit, it's hard to tell. Anyway, I believe the current > implementation of `stripZerosToMatchScale()` is O(n^2) rather than > exponential, because each single division by 10 is linear. > > But let's focus on `sqrt()` in this PR and leave `stripZerosToMatchScale()` > for another time. Yes, it is linear, but in the length of the magnitude, while it is exponential in the length of the precision... (`1_000_000` of divisions for a precision of 7 digits) ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21301#discussion_r1785059976