pjfanning opened a new pull request, #1284:
URL: https://github.com/apache/poi/pull/1284

   Same shape as the `safeDoubleToInt` leaks fixed in #1278: a runtime 
exception escaping `WorkbookEvaluator` instead of becoming an error value.
   
   - `BESSELJ(1E5,1)`, `BESSELJ(1E308,1)`: commons-math's `BesselJ.value` 
throws `MathIllegalArgumentException` ("cannot be computed for x = …") for |x| 
beyond roughly 1E4, and it propagated out of `evaluate`. Excel does return a 
value for these; POI can't compute it with commons-math, so `#NUM!` is the 
honest answer rather than an exception.
   - `BESSELJ(1,1E10)`: the order was taken with `Double.intValue()`, which 
saturates to `Integer.MAX_VALUE`, and commons-math then allocates an `order+1` 
array → `NegativeArraySizeException`. Orders at or beyond `Integer.MAX_VALUE` 
are now `#NUM!` up front.
   - A NaN/infinite result is also mapped to `#NUM!` via 
`NumericFunction.checkValue`.
   
   Tests in `TestBesselJ.testNumError`. 3 tests, 0 failures locally.
   
   🤖 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]

Reply via email to