net8 compatibility
.NET Test / .NET tests (push) Successful in 3m15s

This commit is contained in:
2026-09-23 23:23:27 +04:00
parent 75925ab184
commit 8bae6141ff
9 changed files with 302 additions and 4 deletions
+10 -1
View File
@@ -5,6 +5,8 @@ representations: a high/low pair of `double` values. The goal is to retain more
precision than a single `double` while using a fixed-size representation,
rather than arbitrary-precision arithmetic.
The library targets **.NET 8 and .NET 10**.
> **Work in progress.** The public API is incomplete and may change. Numerical
> contracts are covered by regression tests, not an exhaustive accuracy
> certification. The library is not ready for production use.
@@ -346,6 +348,10 @@ or retains the low destination-width bits, respectively. Decimal nonchecked outp
clamps out-of-range values and maps NaN to zero. These policies are distinct from
the existing casts and `IConvertible` conversions above.
Nonfinite integer output follows the destination type's binary64 conversion policy,
which can differ across runtimes and architectures. For example, saturating NaN to
`int` yields `int.MinValue` on .NET 8 Linux x64 and zero on .NET 10 Linux x64.
Conversions, parsing, and formatting use allocating `BigInteger` intermediates
where needed to preserve precision; no additional dependency is required.
@@ -408,7 +414,10 @@ Replacing allocating arithmetic boundary fallbacks is also deferred; the current
## Build and test
Requires the .NET 10 SDK in the `10.0.1xx` feature band, as selected by `global.json`.
Run from the repository root:
Install the .NET 8 runtime as well to run both test targets. The library and tests
multi-target `net8.0` and `net10.0`; benchmarks remain on `net10.0`. The build SDK
requirement does not prevent .NET 8 applications from consuming the library.
Run from the repository root; the test command runs both frameworks:
```sh
dotnet restore Just.PreciseMath.slnx --locked-mode