felipecrv opened a new pull request, #44904:
URL: https://github.com/apache/arrow/pull/44904

   `Expm1(exponent)` is a more accurate way of computing `Exp(exponent) - 1.0` 
for small values of exponent.
   
   ### Rationale for this change
   
   `expm1(x)` is specifically designed to compute `exp(x)−1` more accurately, 
particularly for small x. It uses numerical techniques and approximations that 
minimize the loss of precision.
   
   When x is very small (close to 0), `exp(x)` is approximately `1+x`. 
Subtracting 1 from `exp(x)` (i.e., `(exp(x)−1)` can result in significant 
cancellation of significant digits due to floating-point arithmetic, leading to 
a loss of precision).
   
   For example:
   
   When `x = 10^−8`, `exp(x)` is close to `1 + 10^−8`, so subtracting 1 leaves 
only the small `10^−8`, which may lose accuracy due to floating-point 
limitations.
   
   ### Are these changes tested?
   
   Yes.
   
   ### Are there any user-facing changes?
   
   Yes and documentation was updated to list the new function.


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