vvexpm1(_:_:_:)
Calculates eˣ-1 for each element in an array of double-precision values.
Declaration
func vvexpm1(_: UnsafeMutablePointer<Double>, _: UnsafePointer<Double>, _: UnsafePointer<Int32>)Discussion
Parameters:
- parameter 1
The output array, y.
- parameter 2
The input array, x.
- parameter 3
The number of elements in the arrays.
If x is nearly zero, the common expression exp(x)-1.0 will suffer from catastrophic cancellation and the result will have little or no precision. This function provides an alternative means to do this calculation without the risk of significant loss of precision. This function provides high accuracy when x is around zero.