Generic Extensions.Log 1Plus X<T> Method
Returns the logarithm of 1 plus the argument.
Definition
Namespace: Extreme.Mathematics.Generic
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
The logarithm of 1 plus value.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public static T Log1PlusX<T>(
this IRealOperations<T> ops,
T value
)
Parameters
- ops IRealOperations<T>
- A IRealOperations<T> instance that performs basic arithmetic operations.
- value T
- A real number greater than -1.
Type Parameters
- T
Return Value
TThe logarithm of 1 plus value.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type IRealOperations<T>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).Remarks
For small values of value, the logarithm of 1 + value is close to zero. When the logarithm is evaluated directly, this can cause significant round-off error. This function resolves this problem by using a direct approvalueimations for value close to 1.
Exceptions
Argument | value is less than or equal to -1. |