On Thu, 10 Oct 2024 16:12:57 GMT, Raffaello Giulietti <rgiulie...@openjdk.org> wrote:
>> fabioromano1 has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Store log5(2) in BigDecimal > > src/java.base/share/classes/java/math/BigDecimal.java line 5270: > >> 5268: intVal = intVal.shiftRight(powsOf2); // remove powers of 2 >> 5269: // maxPowsOf5 == ceil(log5(intVal)) roughly >> 5270: long maxPowsOf5 = (long) Math.ceil(intVal.bitLength() * >> LOG_5_OF_2); > > Please document the meaning of this variable in form of inequalities w.r.t. > `intVal`. > Also, shouldn't it be named `maxExpOf5` or similar? It's an exponent, after > all. The name `maxPowsOf5` has been chosen for consistence with `powsOf2`. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21323#discussion_r1795995929