Skip to content

Releases: ikelaiah/mathlib-fp

numlib 1.9.4

Choose a tag to compare

@ikelaiah ikelaiah released this 10 Aug 10:38
970b819

Numerical trust closure

1.9.4 publishes a release-owned numerical evidence catalogue for all 28 stable
capability families. The release adds validation tooling that rejects missing,
duplicated, or ill-formed records; distinguishes exact checks from numerical
budgets; and verifies that each cited test and reference source is present.

Three high-risk families also have compile-and-test mutation checks. Each
sampled fault must be detected by the existing FPCUnit suite in an isolated
source overlay.

See the numerical evidence report and the
machine-readable catalogue
for the individual
claims, domains, budgets, and provenance.

Compatibility

The public API remains frozen at the 1.9 baseline. Unsupported families remain
unsupported; this release documents and validates stable behaviour rather than
promoting experimental functionality.

Qualification

The release qualification runs the normal build, test, package, documentation,
and numerical-evidence gates without network access. The completed
qualification report records the exact candidate commit and command outcomes.

mathlib-fp 1.9.3

Choose a tag to compare

@ikelaiah ikelaiah released this 03 Aug 22:20
260c021

Release date: 2026-08-04

Version 1.9.3 completes the proposed 2.0 API decision without changing the
frozen 1.9 public surface or numerical behavior.

What changed

  • Every exact public declaration is classified as a recommended common path,
    advanced stable path, compatibility surface, experimental surface, or
    generic implementation support.
  • A concise all-domain common-path map points to 13
    complete output-checked programs while the generated declaration reference
    remains exhaustive.
  • Complete conventions resolve naming, indexing,
    shape, units, ownership, mutation, aliasing, exceptions, defaults,
    tolerances, outcomes, RNG state, cancellation, progress, and thread safety
    across every domain.
  • Every compatibility declaration has a typed replacement and semantic note or
    an explicit retain decision. No compatibility entry is deprecated merely
    because 2.0 is planned.
  • All 21 plain compiler aliases have an exact review covering behavior,
    defaults, ownership, exception identity, and numerical results. Pressure and
    velocity facade/error aliases receive prospective canonical paths for 1.9.7
    migration and package-boundary testing; 1.9.3 does not deprecate them.
  • The exact proposed diff records no source,
    behavior, warning, or packaging change. Documentary priorities are listed
    separately.

Common and advanced paths

The recommended route remains double-real and allocating. Named scalar
variants, advanced containers, diagnostics, factors, destinations, views,
callbacks, and reusable workspaces remain stable and fully documented one step
deeper. Generic base declarations exposed for Free Pascal specialization are
still in the exact reference but are not recommended application API.

Compatibility

IMatrix, TMatrixKit, and TMatrixKitSparse remain source-compatible;
typed replacements require explicit copying conversions. FinanceLib.Bonds
and FinanceLib.NPV are explicitly retained because they provide exact focused
aliases without different numerical semantics.

For new pressure and velocity code, the documented common path is
TFluidDynamicsKit with EFluidDynamicsError. TPressureKit,
EPressureError, TVelocityKit, and EVelocityError remain exact supported
aliases. Their possible deprecation is a 1.9.7 decision after tested migration
and packaging evidence, not a 1.9.3 change.

There are no declaration removals, new defaults, storage changes, warnings, or
package changes in 1.9.3.

Install

Download the tagged source as
tar.gz
or zip,
extract it, and compile the README program with src/ on the unit search path.
No configure step or generated source is required.

Separately planned capability

Ergonomic 2-D and 3-D vector rotation is useful but belongs to a focused
1.10.0 design. That review must settle 3-D representation, orientation, angular
units, normalization, non-finite behavior, and names before implementation.
Version 1.9.3 adds no rotation declaration.

Validation

The release gate reconstructs all declaration classifications from the
reviewed manifest, verifies all domain/unit and convention decisions, proves
one review for every exact compiler alias, checks all compatibility mappings
and exact diff categories, compiles/runs the 13 common programs, and rejects
generic implementation declarations in common examples. See the
qualification report.

The library remains native Free Pascal source with standard RTL/FCL units only.
No DLL, package download, service, account, licence key, or network connection
is required to build or run the stable library.

Capability maturity and known numerical limitations are unchanged; see the
capability inventory. The zero experimental declaration
count is an API classification result, not a claim that every long-term
capability is already implemented.

mathlib-fp 1.9.2

Choose a tag to compare

@ikelaiah ikelaiah released this 02 Aug 12:02
530efa2

See the complete v1.9.2 release notes.

Documentation

  • Added a double-real beginner guide, task-oriented recipe index, and explicit
    beginner-to-advanced routes for every stable domain without changing the
    frozen 1.9 public API.
  • Added searchable routes for dense and sparse solves, descriptive and
    streaming statistics, probability, interpolation and fitting,
    optimisation, FFT and filtering, time series, finance, geometry, and unit
    conversion.

Validation

  • Made each beginner recipe's code and claimed output part of the clean-
    archive documentation checks, including all 13 domain routes, generated
    problem-oriented search results, local links, release identity, and exact
    public declarations.
  • Made checked-heap qualification capture heaptrc in an explicit cross-platform
    log, reject missing or nonzero summaries numerically, and preserve evidence
    artifacts even when a qualification job fails.

mathlib-fp 1.9.1

Choose a tag to compare

@ikelaiah ikelaiah released this 02 Aug 06:46
c90da48

Version 1.9.1 is a feature-frozen stabilisation and documentation-delivery
release for the public 1.9 API. It adds no public type, algorithm family,
overload, default, or deprecation.

Correctness fix

  • Seeded TStatsKit.BootstrapMean and
    BootstrapConfidenceInterval now use the shared explicit-state generator's
    unbiased bounded-index sampling. The former private LCG/modulo path reused
    weak low bits; for an eight-element input it selected every element exactly
    once per resample and could collapse a percentile interval to the sample
    mean. A permanent power-of-two-length regression verifies varying resamples,
    a non-degenerate interval, deterministic replay, and unchanged global
    RandSeed.

Documentation and first use

  • The versioned documentation site
    identifies 1.9.1 as current while retaining the generated 1.9.0 site from
    its tagged sources.
  • The release publishes a deterministic
    offline HTML archive
    and adjacent SHA-256 file. Web and offline HTML are generated by the same
    dependency-free builder from reviewed repository Markdown.
  • Every runnable documentation program that prints a result now has an
    adjacent exact or ordered-substring output contract. The checker verifies
    numerical values and iterative statuses, not only a zero exit code.
  • The dense solve, solver-selection, sparse workflow, and migration examples
    publish checked output/status contracts and end with checked success markers.
  • The 1.9 feedback route asks specifically about installation
    time, confusing type choices, boilerplate conversions, unexpected errors,
    missing selection guidance, and migration problems.

Install

Download the tagged source as
.tar.gz
or .zip,
extract it, and compile the README program with src/ on the unit search path.
No configure step, network access, foreign binary, or third-party runtime
package is required.

Compatibility and limitations

The checked public-api-1.9.json snapshot and all 2,880 owner/signature-aware
declaration rows are unchanged from 1.9.0. Existing 1.9 source remains
compatible. The algorithm and scale limitations listed in the
1.9 capability inventory are unchanged; 1.9.1 does not pull
forward any 1.9.2 learning-path or later convergence work.

See the 1.9.1 qualification report for the exact
normal, optimised, checked/heap-traced, example, documentation, package, and
clean-archive gates.

mathlib-fp 1.9.0

Choose a tag to compare

@ikelaiah ikelaiah released this 01 Aug 10:25
d11ef90

Released: 2026-08-01.

Version 1.9.0 adds a complete portable typed path for matrices that are sparse,
compactly structured, or available only through a product. It is an additive
release: maintained 1.x APIs and defaults remain available.

User-visible additions

  • AlgebraLib.SparseMatrices: immutable validated CSR/CSC for single/double
    real and complex scalars, deterministic triplet construction, explicit
    stored-zero policy, sparse arithmetic/products/conversions, and compact
    diagonal/tridiagonal/band storage.
  • AlgebraLib.LinearOperators: one typed ordinary/adjoint product contract for
    sparse, structured, dense, and user-supplied matrix-free problems; explicit
    ownership and reentrancy; identity, diagonal, IC(0), and ILU(0)
    preconditioners.
  • AlgebraLib.IterativeSolvers: CG, MINRES, restarted GMRES, BiCGSTAB, and
    LSQR for all four scalar paths, with shared options/results, true-residual
    reporting, LSQR normal-residual convergence, explicit confirmation,
    cancellation/progress, refresh counts, breakdown reasons, and reusable
    workspaces.
  • AlgebraLib.StructuredSolvers: reusable pivoted tridiagonal factors,
    compact band factors, and an explicitly selected natural-order sparse LU
    baseline with pivot/fill diagnostics and multiple-RHS solves.
  • AlgebraLib.PartialEigensystems: deterministic restarted Lanczos and
    Arnoldi for largest-magnitude selected eigenpairs, including independently
    recomputed residuals.
  • MathBase.Interchange: Matrix Market coordinate double-real/double-complex
    sparse exchange and checksummed versioned CSR/CSC binary interchange for all
    four scalar kinds, with independent stored-nonzero and per-axis dimension
    limits checked before shape-sized allocation.
  • An end-to-end sparse Matrix Market/preconditioned-CG example and a
    run-checked candidate-2.0 migration preview covering dense/sparse solves,
    fitting, interpolation, optimization, DSP, and streaming statistics.
  • A complete classified 1.9 public-API snapshot and generated declaration
    reference keyed by unit, owner, kind, name, and normalized signature, with
    per-unit interface SHA-256 enforcement.
  • Compiler-backed execution of every self-contained published Pascal example;
    all 1.9 release-facing Pascal fences are required to remain self-contained.

The sparse linear-algebra guide documents every
representation, solver-selection rule, residual formula, default, status,
ownership/aliasing contract, operation cost, reuse path, and stable limit.

Compatibility and migration

TMatrixKitSparse is unchanged and remains a compatibility path. Its legacy
storage is not silently replaced by CSR/CSC; the migration example performs an
explicit value copy and chooses a zero policy. No maintained public identifier
is removed or renamed.

The candidate 2.0 contract and
migration preview are documentation and
compile-checked 1.9 runway only. They do not activate breaking 2.0 behavior.
There are no formal deprecations in 1.9.0.

Numerical and scalability evidence

The focused suites compare all four scalar storage/operator paths with typed
dense oracles, execute every iterative method for every scalar, and cover
success, iteration limit, cancellation, invalid structure, singularity, and
numerical breakdown. Matrix Market and binary tests cover round trips plus
malformed coordinates, duplicates, explicit zeros, version/kind mismatches,
checksum corruption, truncation, nonzero limits, and dimension limits.

A 20,000-dimensional matrix-free test is a regression tripwire against an
accidental full dense allocation (which would require 3.2 GB of binary64
values). Matrix-free construction validates each vector axis independently,
so this linear-storage path is not rejected on Win32 because the hypothetical
dense product exceeds its address space. The Win64 FPC 3.2.2 -O3
qualification benchmark additionally ran:

  • a 100,000-by-100,000 CSR system with 100,000 nonzeros in 125 ms initially,
    then 20 warmed solves in 2,109 ms, one CG iteration/three products per solve,
    zero final true residual, approximately 3,300,041 retained scalar/index
    slots, and zero sampled repeated-solve peak/retained heap growth;
  • a 200,000-dimensional matrix-free system in 172 ms initially, then 20 warmed
    solves in 3,484 ms, one CG iteration/three products per solve, zero retained
    operator values, zero final true residual, approximately 5,800,041 retained
    scalar slots, and zero sampled repeated-solve peak/retained heap growth.

Both used prepared Into workspaces and allocated zero elements proportional
to a full dense matrix. Repeated-solve heap measurements use a fixed 65,536-byte
regression ceiling.
Timing and heap figures are workload-, compiler-, platform-, and
machine-specific observations, not universal speed or memory guarantees. Full
commands and conditions are in the
1.9 qualification report.

Important limits

  • Sparse kernels are portable serial paths. Distributed, out-of-core, GPU,
    vendor-library, parallel, and SIMD sparse execution are not included.
  • The general band factor does not pivot. Sparse LU uses natural ordering with
    row pivoting; it has no fill-reducing symbolic ordering and fill can be large.
  • Solvers validate types and shapes, not the caller's symmetry, definiteness,
    or conditioning model. LSQR is unpreconditioned in 1.9.
  • Partial eigensystems target largest magnitude only. There is no shift-invert,
    interior target, generalized, full nonsymmetric, Schur, or polynomial path.
  • Matrix Market sparse text is coordinate real general/complex general in
    double precision and forbids duplicate and explicit-zero entries.
  • Advanced DSP, survival/state-space, implicit ODE, and mixed-integer/global
    optimisation families remain outside this focused release.

Every remaining baseline gap is recorded in
capabilities.json.

mathlib-fp 1.8.0

Choose a tag to compare

@ikelaiah ikelaiah released this 30 Jul 09:48
0c6ad2e

Released 2026-07-30.

Version 1.8.0 delivers a deliberately bounded applied-numerics layer on the
typed dense and modelling foundations from 1.5–1.7. This release also closes
the implementation/documentation gaps found by an exhaustive audit of the
published 1.7 and active 1.8 roadmap requirements. DSP, inference, fitting,
typed data analysis, and scalar/multivariate state-space examples reuse the same
TDoubleArray, TComplexArray, and typed dense matrices. The release also
adds reproducible local random state, portable numerical interchange, and a
deterministic serial blocked matrix path.

User-visible additions

  • MathBase.Random: TLocalRandom and explicit four-word TRandomState, with
    deterministic replay and split streams and no mutation of RTL RandSeed.
  • StatsLib.Streaming: weighted, online, mergeable TOnlineStatistics with
    a documented TNonFinitePolicy and constant retained state.
  • EngineeringLib.DSP: TDSPKit, TFFTNormalization, arbitrary-length and
    batched/2-D real/complex transforms, direct/FFT and overlap-add/save
    convolution, correlation, resampling, window metrics,
    periodogram/Welch/STFT, analytic/cross spectra, Haar transform, plus bounded
    block/FIR/biquad state.
  • StatsLib.Inference: paired normal/exponential/binomial operations,
    parameter estimates, t/ANOVA/contingency/rank tests, multiplicity
    corrections, SVD OLS diagnostics, and separation-aware binary logistic
    regression.
  • MLLib.Analysis: typed-dense PCA (TPCAResult), seeded k-means++
    (TKMeansPlusPlusResult), fitted standardization, deterministic
    validation/k-fold splits, binary LDA, hierarchical clustering, seeded
    classification/regression forests with OOB/importance diagnostics, and exact
    low-dimensional TKDTree queries.
  • TimeSeriesLib.StateSpace: explicit scalar and dense multivariate
    linear-Gaussian Kalman configuration, block processing, likelihood,
    innovations, covariances, and forecasts.
  • MathBase.Interchange: invariant scalar/vector/matrix text, delimited
    matrices, a dense Matrix Market subset, typed metadata/complex summaries,
    and a versioned,
    checksummed little-endian binary format for double/complex vectors,
    typed-dense matrices, and RNG state.
  • InterchangeLib.Models: versioned, capped, checksummed cubic-spline,
    streaming-FIR, fitted-standardization, and scalar-Kalman adapters.
  • MathBase.Expressions: bounded arithmetic over immutable scalar, vector,
    and dense-matrix bindings with no scripting or I/O primitives.
  • AlgebraLib.DenseKernels: TDenseMultiplyPath,
    MultiplyBlockedInto, MultiplyAutoInto, and SelectedMultiplyPath.
  • The 1.7 modelling/optimisation surface now includes natural/clamped/
    not-a-knot splines, explicit complex-step callbacks, vector forward AD and
    derivative checks, cubature/local-RNG Monte Carlo, scaled/covariance-aware
    fitting, all-complex polynomial roots, component ODE tolerances, detailed
    bounded/trust/constrained/multistart/Pareto solvers, warm-start workspaces,
    two-phase simplex, and QP failure/certificate diagnostics.

The applied numerics guide, interchange
guide
, and portable-performance guide
document selection, units, ownership, mutation, indexing, shapes, resource
bounds, error behavior, and compatibility.

Compatibility

The release is additive. Existing 1.7 and earlier public signatures remain
available, and the established EngineeringLib.Signal FFT is unchanged.
Every new API uses zero-based arrays and row/column typed-matrix indexing.
Input arrays and streams are borrowed for a call; returned arrays and matrices
own their values. Stateful records copy their state on assignment.

Binary interchange and model adapters have explicit format versions and byte order. Callers can
set an element cap. Loaders verify magic, version, kind, shape, payload size,
complete input, finite numeric values, and CRC-32 before returning a value.

Accuracy and performance evidence

The portable DFT and portable dense multiply are correctness oracles.
Arbitrary-length transforms agree with the direct DFT within 2e-12 on the
published double fixture, 2-D double round trips within 2e-11, single
round trips within 2e-5, and FFT/direct/block convolution within 1e-12.
Portable, blocked, and automatic matrix multiplication agree exactly on the
tested deterministic traversal.

The 1.8 qualification report publishes the complete
gate, bounded-state and corrupt-input evidence, and performance changes from
1.7.0. Timing statements are workload- and machine-specific, not universal
speed claims.

Release qualification completed on 2026-07-30 with 899 passing tests across
the documented Win64 and Win32 configurations, all 22 examples, both Lazarus
package targets, documentation and clean-archive checks, and the required
Linux and Windows GitHub Actions pull-request and push workflows.

Known limitations and open roadmap work

  • FIR/overlap state is bounded by tap count; biquad state has two delay values.
    Equiripple and Chebyshev/elliptic/Bessel design, broader wavelets/wavelet
    packets, and broader multirate workflows remain conditional and unqualified.
  • Streaming statistics expose moments through variance. The inference layer
    is a portable double baseline; survival/factor analysis, robust covariance,
    multinomial/count GLMs, and certified exact tables remain open.
  • Data analysis is dense, serial, and in-memory. Impurity importance has its
    documented bias and the small-data hierarchy baseline is cubic.
  • State-space support is time-invariant and linear-Gaussian. Controls,
    missing-observation handling, smoothing, and parameter estimation remain
    open.
  • Matrix Market support is the dense array real/complex general subset.
    Selected models have adapters; decompositions, forests, arbitrary model
    graphs, and multivariate state are not persisted.
  • ODEs remain explicit/non-stiff with no mass-matrix path. Interior-point LP,
    general quadratic/conic certificates, sparse, and integer optimisation are
    not claimed.
  • The optimized matrix path is serial and deterministic. No parallel,
    thread-pool, SIMD, ARM64, or vendor-library dispatch is claimed.

These gaps are marked unsupported in
capabilities.json; no later-roadmap API is included.

mathlib-fp 1.7.0

Choose a tag to compare

@ikelaiah ikelaiah released this 29 Jul 20:22
3878e3d

Release date: 2026-07-30.

Version 1.7.0 completes the numerical-modelling and optimisation milestone on
the 1.5/1.6 typed dense engine. It provides end-to-end interpolation, fitting,
integration, nonlinear-equation, adaptive ODE, derivative, LP/QP,
cone-constrained, and nonlinear-optimisation workflows with inspectable
outcomes.

User-visible additions

  • NumericsLib.Interpolation: barycentric/rational interpolation,
    monotonicity-preserving PCHIP, Akima curves, derivatives/antiderivatives,
    bilinear/bicubic grids, and small scattered IDW/RBF/thin-plate methods.
  • NumericsLib.Differentiation: scale-aware gradients, Jacobians, Hessians,
    dual-number forward AD, and analytic-gradient checks.
  • NumericsLib.Modelling: adaptive Gauss-Kronrod finite/improper integration,
    deterministic Halton integration, weighted QR polynomial/linear-basis
    fitting, bounded robust Levenberg-Marquardt, vector Newton equations, and
    adaptive vector Dormand-Prince ODEs with dense output and events.
  • MathBase.Iteration: a common status vocabulary distinguishing convergence,
    acceptable limits, stagnation, breakdown, infeasibility, unboundedness,
    iteration exhaustion, and cancellation.
  • OptimizationLib.Convex: dense positive-semidefinite QP with explicit
    projection and feasible-start affine second-order-cone optimisation.

The numerical modelling guide and
convex optimisation guide contain 60-second examples,
selection advice, API contracts, diagnostics, and limitations. Runnable
cross-domain examples are
17_numerical_modelling.pas and
18_convex_optimization.pas.

Diagnostics and derivative paths

Iterative 1.7 results retain the best finite iterate and a
TIterationStatus. Analytic, central-difference, and forward-AD derivatives
are compared on smooth reference problems. CheckGradient and nonlinear fit
Jacobian checking identify the mismatching variable or matrix element before a
long solve.

Adaptive integration reports an embedded-pair error estimate. Fits report
parameters, residuals, rank, degrees of freedom, justified covariance, RSS,
R-squared, iterations, evaluations, and gradient scale. Vector roots report
residual/step norms. ODE results report accepted/rejected steps, dense output,
and event state. Convex results report objective, optimality scale, feasibility,
iterations, evaluations, and status.

Compatibility and migration

This release is additive. TNumericsKit, TOptimizationKit, existing result
fields, and all 1.6 typed dense APIs remain source compatible. Callers can
migrate one workflow at a time.

The old PenaltyMethod and Maximize implementations no longer use
unit-global callback adapters or locks. Their signatures and numerical intent
are unchanged, while independent calls are now reentrant.

Accuracy evidence

Checked reference workflows include polynomial knot reproduction, monotone
PCHIP bounds, planar grid interpolation, exact RBF nodes, the sine and Gaussian
integrals, exact linear fits, bounded nonlinear residual fits, a two-equation
system, exponential ODE dense output and event time, a constrained convex
quadratic, and the scalar unit-cone optimum.

The 1.7 qualification report lists configurations
and exact gates. Accuracy statements are workload-specific; they are not
universal worst-case proofs.

Known limitations

  • Adaptive ODE integration is non-stiff; stiff methods and mass matrices are
    not claimed.
  • RBF/thin-plate construction is dense and intended for small data sets.
  • Forward AD targets scalar and small-to-medium parameter problems; reverse
    mode is absent.
  • The convex APIs are dense continuous QP/SOCP solvers. Sparse, semidefinite,
    integer/mixed-integer, and general non-convex models are not claimed.
  • The SOCP solver requires a strictly feasible initial point and does not
    provide a general infeasibility certificate.

No persistence/interchange, expression-evaluation, parallel/SIMD, large-data,
or other 1.8.0 feature was added.

mathlib-fp 1.6.0

Choose a tag to compare

@ikelaiah ikelaiah released this 26 Jul 22:30

Release date: 2026-07-27

Version 1.6.0 completes the first typed dense decomposition workflow on the
1.5 contiguous matrix foundation. It is a native Object Pascal release with
no third-party runtime dependency.

Highlights

  • Reusable Householder QR and column-pivoted QR factors support full-rank and
    rank-revealing least-squares solves for tall and square matrices.
  • Reusable compact one-sided Jacobi SVD factors support tall, square, and wide
    matrices plus rank-deficient and underdetermined minimum-norm solves.
  • Full real symmetric and complex Hermitian eigensystems return ascending
    eigenvalues, normalized column eigenvectors, and inspectable convergence
    sweep counts.
  • Reusable triangular solves cover lower/upper, unit/non-unit, ordinary,
    transposed, and conjugate-transposed systems.
  • LU and Cholesky keep their 1.5 behavior and gain additive condition
    indicators and residual/backward-error diagnostic solves.
  • Every applicable operation has matching single/double real/complex entry
    points, supports vector or multiple right-hand sides, and never forms an
    inverse to solve or diagnose a system.

Start with the dense solver-selection guide and run
16_dense_solver_selection.pas.

Public API

AlgebraLib.DenseDecompositions adds:

  • SolveTriangular with TDenseTriangle, TDenseDiagonal, and
    TDenseTranspose;
  • FactorQR, FactorPivotedQR, LeastSquares, and
    RankRevealingLeastSquares;
  • FactorSVD and MinimumNormSolve;
  • FactorSymmetricEigen and FactorHermitianEigen;
  • reusable IDenseSingleQR, IDenseDoubleQR,
    IDenseSingleComplexQR, IDenseComplexQR, matching four SVD handles, and
    the real-symmetric/complex-Hermitian eigen handles; and
  • TDenseSolveDiagnostics, reporting numerical rank, rank deficiency,
    selected tolerance, condition indicator, residual norm, and normalized
    backward error.

AlgebraLib.DenseSolvers adds ConditionIndicator and SolveWithInfo to
existing LU/Cholesky handles, plus SolveWithInfo(A,B,Info) and
SolvePositiveDefinite(A,B,Info) convenience paths.

Factors own immutable snapshots. Coefficients and right-hand sides are never
overwritten; factor outputs and permutation/eigen/singular arrays are copies.
Compact conventions, phase/sign freedoms, tolerances, ordering, allocation,
thread safety, and error behavior are specified in the
1.6 design record.

Solver guidance

  • General square: pivoted LU.
  • Positive-definite symmetric/Hermitian: Cholesky.
  • Tall and full rank: Householder QR.
  • Tall with uncertain rank: column-pivoted QR.
  • Rank deficient or underdetermined when minimum norm matters: SVD.
  • Full real symmetric or complex Hermitian spectrum: the matching Jacobi
    eigensystem.

SVD is deliberately explicit rather than an automatic expensive fallback.
CPQR's rank-deficient solve is a basic solution; use SVD for a minimum-norm
guarantee.

Numerical and maintenance evidence

The focused tests cover reconstruction, orthogonality/unitarity,
permutations, multiple right-hand sides, residuals/backward errors, numerical
rank, singular-value ordering, real and complex eigenpair residuals, factor
reuse, immutable source snapshots, empty and singleton-compatible shapes,
repeated spectra, tiny scale, near rank deficiency, non-finite input, invalid
shape/structure, and single/double scalar parity.

Independent exact fixtures include a published two-parameter least-squares
fit, a known underdetermined Moore-Penrose solution, analytic 2-by-2 real and
complex spectra, diagonal singular values, and triangular systems. Acceptance
budgets are precision and algorithm specific; the
qualification report records the configurations and
normalized measures.

The deterministic benchmark reports QR factor reuse against allocating
convenience calls, compact SVD/minimum-norm work, symmetric eigen work,
checksums, factor-build/result-allocation counts, and estimated peak scalar
working storage. These are reproducibility measurements, not cross-library
speed claims.

Compatibility

No IMatrix, TMatrixKit, IVector, or typed 1.5 symbol is removed or
deprecated. Legacy LU, QR, SVD, Cholesky, pseudoinverse, and eigen methods
remain the compatibility API. They are not silently rerouted where shape,
ordering, tolerance, error, or ownership contracts differ. Migration remains
an explicit copy into typed storage and is documented in
the migration guide.

Known limitations and deferred families

The following are explicitly unsupported in the typed 1.6 API:

  • sparse, packed, and other structured storage/factors;
  • LDLT and specialized structure-only factor families;
  • CG, MINRES, GMRES, BiCGSTAB, LSQR, preconditioners, callbacks, and
    matrix-free solves;
  • nonsymmetric, generalized, polynomial, partial, and Schur eigensystems;
  • mutable update/downdate factors, destructive factorisation, and a general
    public workspace API;
  • automatic dispatch, parallel/SIMD/GPU decomposition kernels, and external
    BLAS/LAPACK bindings; and
  • wholesale migration of fitting, statistics, machine-learning, or other
    higher-level domains.

The pure Pascal portable paths are the complete stable implementation, not a
fallback for a foreign binary.

mathlib-fp 1.5.0

Choose a tag to compare

@ikelaiah ikelaiah released this 26 Jul 07:20
b06b48b

Version 1.5.0 adds the typed contiguous numerical foundation while preserving
the complete 1.4 compatibility API.

User-visible additions

  • 32-byte-aligned row-major matrices for single/double real and complex
    scalars, with checked SizeInt dimensions and allocation arithmetic.
  • Retained-owner mutable row, column, diagonal, and rectangular views, plus
    explicit deep Clone.
  • Matching allocating and reusable-destination kernels for addition,
    subtraction, scaling, AXPY, typed scalar-function application, reductions,
    elementwise multiplication, transpose, and ordinary matrix multiplication.
    Complex paths distinguish conjugation and conjugate transpose.
  • Allocation-free operator-friendly 2x2 value records and matching batch array
    types for every supported scalar path.
  • Direct Solve(A, B) for one or many right-hand sides using pivoted LU, plus
    reusable LU and real/complex Cholesky factor objects.
  • TSingleComplex, explicit single/double complex conversions, compatibility
    bridges for flat/nested arrays and IMatrix, explicit real/complex matrix
    conversions, a migration guide, capability inventory, support matrix, and
    runnable solve example.

Migration and compatibility

No public symbol was removed or deprecated. IMatrix, TMatrixKit,
IVector, and nested TMatrixArray storage remain available. Migration to the
new API is opt-in.

Conversions from nested arrays, flat vectors, and IMatrix copy data into
aligned storage. Conversions back also copy. Views do not copy and are mutable
aliases; Clone is the deep-copy operation. See
MIGRATING_TO_TYPED_DENSE.md.

Maturity and known limitations

The typed storage, kernels, LU solve, and Cholesky solve are stable within
their documented finite-input contracts. The 1.5 scope is dense, square direct
solves. It does not add sparse typed storage, least squares, QR/SVD/eigen
workflows, condition estimators, SIMD, or parallel dispatch.

Bessel, elliptic, and exponential-integral families remain unsupported rather
than being represented as complete. The complete supported/unsupported
inventory is in CAPABILITIES.md.

Validation evidence

The 1.5 tests cover:

  • reference real/complex products, odd and empty shapes, mutable view aliases,
    deep copies, aligned storage, explicit compatibility copies, and overlapping
    MultiplyInto;
  • mixed 1e200/1e-200 matrix products with representable results;
  • single/double real and complex operation parity with precision-appropriate
    tolerances;
  • native-size shape and byte-count overflow before allocation;
  • LU vector and multiple-RHS solutions, factor reuse, singularity errors,
    positive-definite real and Hermitian complex Cholesky, and normalized
    residual/backward-error checks;
  • validation failure without destination mutation.

benchmarks/BenchmarkRunner.lpr includes a deterministic 127 x 129 by
129 x 65 typed product alongside the existing compatibility benchmark. No
throughput improvement is claimed from this first portable kernel.

The repository CI builds and runs the complete tests and examples on Linux
x86-64 and Windows x86-64, builds the Lazarus package on Windows x86-64 and
i386, and runs an optimised i386 suite. The publication CI completed
successfully for PR #9 in
CI run #92.

Installation

Download the
source archive
and its
SHA-256 checksum,
extract it, and put src/ on the FPC unit path. No configure step, network
connection, DLL, licence key, or third-party runtime is needed.

mathlib-fp 1.4.0

Choose a tag to compare

@ikelaiah ikelaiah released this 25 Jul 02:30
bab4de8

Release date: 2026-07-25

Highlights

  • GeometryLib.Geometry now provides natural arithmetic for fixed-size
    TVector2D and TVector3D value records.
  • Vector magnitude and normalization are scale-safe for finite extreme-scale
    components.
  • The geometry walkthrough includes a compact Theodorus-spiral construction
    using Radius := Radius + Step, symmetric 3-D arithmetic, and runnable
    extreme-scale normalization.

Vector arithmetic

Both vector types provide componentwise addition, binary subtraction, unary
negation, scalar multiplication in either operand order, and vector/scalar
division:

V2 := -((V2 + Step) / 2.0);
V3 := 3.0 * (V3 - Offset);

The two types expose the same arithmetic operator set. TVector2D keeps its
existing Perpendicular helper as the intentional dimensional difference.
The operations return independent record values, allocate no storage, and do
not modify their operands, including when a caller assigns an expression back
to one of its inputs.

All fixed-size arithmetic and numeric vector operations are O(1), allocation-
free on successful calls, and reentrant. Concurrent calls are safe when the
same record storage is not being modified by another thread.

Magnitude and normalization

Magnitude scales components before accumulating their squares, avoiding
premature overflow and underflow for representable finite results. Infinity
takes precedence over NaN in the magnitude, matching hypot-style behavior.
Normalise now accepts finite non-zero vectors at tiny and large scales and
returns a new value even when the unnormalised magnitude is too large for
Double. It raises EGeometryError for exact-zero, NaN, or infinite vectors.

Floating-point behavior

The operators apply ordinary IEEE-754 Double arithmetic to each coordinate.
They preserve normal target behavior for signed zero, NaN, infinity, and
overflow rather than rejecting those values. Finite overflow produces signed
infinity; a non-zero finite coordinate divided by signed zero produces the
corresponding signed infinity; zero divided by zero produces NaN. Arithmetic
operators do not raise EGeometryError for these cases and do not alter the
caller's FPU exception mask. The described result values apply with the related
IEEE status exceptions masked; an unmasked FPU exception is reported according
to the caller's configured FPU mode.

Compatibility

This is an additive API change. Existing GeometryLib record fields, methods,
and callers remain source-compatible. Point/vector translation operators are
not included: points and displacement vectors continue to be distinct types
until coordinate-transform semantics have their own documented design. The
existing normalization API now treats small finite non-zero vectors as valid
and reports non-finite vectors explicitly instead of returning indeterminate
coordinates.

Validation

Focused tests cover both dimensions, ordinary arithmetic, value/alias
semantics, additive identity and inverse, distributivity, scale inversion,
2-D/3-D agreement, signed zero, zero-scalar division, NaN, infinity, and
overflow. Extreme-scale magnitude and normalization tests cover large and tiny
finite vectors, zero vectors, and non-finite inputs. Dot linearity and magnitude
scaling connect the operators to the established vector methods. The public-API
smoke suite compiles each new operator form. See the
GeometryLib reference and run
examples/12_geometry.pas for arithmetic,
Theodorus construction, and scale-safe normalization examples.