This commit is contained in:
@@ -45,6 +45,13 @@ with exact component checks for selected representable cases. Near underflow,
|
||||
extended precision necessarily decreases; overflow produces infinity. Performance
|
||||
of the allocating exponent-boundary path is not covered by the basic benchmarks.
|
||||
|
||||
Named value constants include `Zero`, `NegativeZero`, `One`, `NegativeOne`, `NaN`,
|
||||
`PositiveInfinity`, `NegativeInfinity`, and `Epsilon`. `Epsilon` is the smallest
|
||||
positive representable value, `2^-1074` (the same as `double.Epsilon`), **not** a
|
||||
relative-error tolerance or machine epsilon. These constants have a positive-zero
|
||||
low component; `NegativeZero` preserves the high sign bit while comparing and
|
||||
hashing equal to `Zero`.
|
||||
|
||||
## Predefined mathematical constants
|
||||
|
||||
All constants below are static `DoubleDouble` properties. Each stores the nearest
|
||||
@@ -52,6 +59,10 @@ binary64 high component followed by the nearest binary64 residual, rather than
|
||||
calculating a ratio, root, or logarithm on access. Names use PascalCase, including
|
||||
`Pi`, `E`, and `Ln2`.
|
||||
|
||||
`DoubleDouble` implements `IFloatingPointConstants<DoubleDouble>` for generic
|
||||
access to `E`, `Pi`, and `Tau`; this does not imply support for the full
|
||||
`IFloatingPointIeee754<DoubleDouble>` interface.
|
||||
|
||||
| Group | Properties and values |
|
||||
|---|---|
|
||||
| Circle and common angles | `Pi` (π), `Tau` (2π), `PiOver2`, `PiOver3`, `PiOver4`, `PiOver6` |
|
||||
@@ -280,9 +291,9 @@ bool success = DoubleDouble.TryParse("1.25e-2".AsSpan(), CultureInfo.InvariantCu
|
||||
## Deferred scope
|
||||
|
||||
Natural `DDMath.Log`, `Exp`, and all three `Pow` overloads are implemented.
|
||||
Logarithms in other bases, generic-math interfaces beyond `ISignedNumber`,
|
||||
additional text formats/general round-trip formatting, and non-arithmetic performance
|
||||
benchmarks remain deferred.
|
||||
Logarithms in other bases, generic-math interfaces beyond `ISignedNumber` and
|
||||
`IFloatingPointConstants`, additional text formats/general round-trip formatting,
|
||||
and non-arithmetic performance benchmarks remain deferred.
|
||||
Replacing allocating arithmetic boundary fallbacks is also deferred; the current
|
||||
`BigInteger` paths remain in place. That optimization does not require removing
|
||||
`BigInteger` from conversions, parsing, formatting, or independent test oracles.
|
||||
|
||||
Reference in New Issue
Block a user