From 8e9946aa47ea848ccd093020e2b655df6c09e7e6 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Mon, 9 Nov 2026 19:24:25 -0500 Subject: [PATCH] docs(engines): keep layouts the same across platforms with PortableMath --- docs/nesting-engines.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/docs/nesting-engines.md b/docs/nesting-engines.md index b5344661..d5a28f1a 100644 --- a/docs/nesting-engines.md +++ b/docs/nesting-engines.md @@ -612,6 +612,10 @@ Use the [engine benchmarking guide](performance/engine-benchmarking.md) for the jobs that engine targets, with every layout valid. Report cost, validity, unplaced parts and time. - Placement must be deterministic: no clocks, unseeded randomness or environment variables. Budget work by counting it; wall time may stop work only through the cancellation token. +- Layouts must also match across platforms. Call `PortableMath` (`OpenNest.Math`) for Sin, Cos, + Tan, Atan, Atan2, Asin and Acos in Core, Engine, IO and Data: `System.Math` calls the C runtime, + whose last bit differs between Windows and Linux, and that bit was enough to nest the same job + differently. `PortableMathTests.LayoutProjects_UsePortableTrigOnly` fails on a runtime call. - Keep each engine's tests passing, including `EngineContractTests` (quadrants, overflow, priority, cancellation, stock and plate limits, determinism). Every layout in those tests is checked with `NestLayoutCheck`, the benchmark's validator.