pjfanning opened a new pull request, #1423: URL: https://github.com/apache/poi/pull/1423
[Bug 69892](https://bz.apache.org/bugzilla/show_bug.cgi?id=69892): since 5.2.1, `SQRT(666)*SQRT(666)` evaluated to `666.000000000001`, because multiplication rounded its operands to 15 significant digits. The reporter says Excel gives 666. Trunk already fixes this: since #1275, `*` and `/` multiply the doubles (IEEE 754), as Excel does. This PR only adds a test so it stays fixed. | Formula | 5.5.1 | trunk | |---|---|---| | `SQRT(666)*SQRT(666)` | 666.000000000001 | 666.0 | | `B1*B1` (B1 = `SQRT(666)`) | 666.000000000001 | 666.0 | | `SQRT(2)*SQRT(2)` | 2.000000000000014 | 2.0000000000000004 (the IEEE product; in Excel `SQRT(2)*SQRT(2)-2` is 4.44E-16) | | `1/3*3` | 0.999999999999999 | 1.0 | `TestFormulaBugs` passes. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
