def g12_scale

unified-nsga-iii@0.2.2.0 · util.bend:251

import unified-nsga-iii@0.2.2.0/util.bend as Util
import Base

251# Decision-variable duplicate key: 12 decimal places, round(x*1e12)/1e12.
252# C# DecisionKey is double.ToString("G12") (12 significant digits). Those
253# are not the same format. Near magnitude 1, F32 ULP is coarser than
254# 1e-12, so 12-dp rounding often does nothing. Below about 1e-5 a 12-dp
255# bin is wider than the F32 ULP and the round changes the value
256# (1.234567e-8 → 1.2346e-8). This tree keeps 12-dp keys. It does not
257# match C# G12. See src/g12_key.bend.
258def g12_scale() -> F32:
259  1000000000000.0

Uses (1)

Used by (1)