Files
Just.PreciseMath/README.md
T
2026-09-13 16:52:34 +04:00

2.6 KiB

Just.PreciseMath

WIP — repository scaffolding only; no library implementation or tests yet.

A .NET 10 library being developed for extended-precision floating-point arithmetic using double-double representations (a high/low pair of double values), with common mathematical functions. This is fixed extended precision, not arbitrary precision; accuracy guarantees and the public API are not settled.

Planned scope

  • Double-double arithmetic, constants, comparisons, conversions, and formatting.
  • Common functions including Abs, Sqrt, Pow, Exp, and Log.
  • Correctness tests against higher-precision references and performance benchmarks.

The consolidated legacy review is the starting point. Priorities are normalization and special-value contracts (NaN, infinities, signed zero), corrected constants and scalar subtraction, consistent comparisons, precision-preserving conversions/formatting, and range-safe arithmetic and transcendental functions, including cancellation and subnormal cases. The files in review-legacy/ contain known defects: they are reference material only, are not compiled, and should not be used in production.

Layout

  • 0-source/Just.PreciseMath/ — library and package metadata.
  • 1-tests/Just.PreciseMath.Tests/ — xUnit v3, Shouldly, and MTP-native Coverlet.
  • 2-benchmarks/Just.PreciseMath.Benchmarks/ — BenchmarkDotNet scaffold.
  • review-legacy/ — original implementation and numerical reviews.

Development

Use the .NET 10 SDK selected by global.json (10.0.1xx, latest installed patch). Shared settings enable nullable analysis, .NET 10 recommended analyzers, build-time code-style checks, and warnings as errors. .editorconfig retains advisory style preferences alongside explicitly enforced warning/error rules.

dotnet restore Just.PreciseMath.slnx
dotnet build Just.PreciseMath.slnx -c Release --no-restore
dotnet test --solution Just.PreciseMath.slnx -c Release --no-build
dotnet format Just.PreciseMath.slnx --verify-no-changes --no-restore

The empty test project currently reports no tests (MTP exit code 8); this is not a passing test suite. Once tests exist, add --coverlet to the test command for coverage. The benchmark project deliberately builds as a library without source files; add an entry point and benchmark cases, then change OutputType to Exe and run it in Release without a debugger. No performance results exist yet.

Package metadata uses the development version 0.1.0-dev. Licensed under the MIT License, included in the package. Do not publish this scaffold as a usable numerical library.