JackieTien97 opened a new pull request, #351:
URL: https://github.com/apache/commons-math/pull/351

   Finite samples can produce `NaN` in Akima interpolation because the weighted 
slope products overflow before division. For example, with `x = {0, 2, 4, 6, 
8}` and `y = {0, 1e200, 0, 1e200, 0}`, evaluating the interpolant at `3` 
returns `NaN` instead of approximately `5e199`.
   
   Normalize the two derivative weights by their maximum before forming the 
convex combination of slopes. This avoids the intermediate large products and 
also preserves small-magnitude slopes that previously underflowed. The change 
applies to both the original and modified Akima algorithms.
   
   Add regressions for the large finite-value example and scale invariance at 
`1e200`, `-1e200`, and `1e-200`, plus a release-note entry.
   
   Validation:
   - The four new regression tests fail on the unmodified base revision.
   - Full `mvn clean verify` passes: 3,827 tests reported, 33 skipped, no 
failures or errors.
   


-- 
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]

Reply via email to