code wiki / (root) / nx_fx_f64_const.nx

nx_fx_f64_const.nx

buildroot/runtime/nx_fx_f64_const.nx

1343 B24 linesdepth 0pulls 0 transitivereach 0 importersview sourcekind tooltopic fx
docsdependenciesstructsconstsfunctions

about

nx_fx_f64_const.nx -- LN39 fixture: `const NAME: f64 = EXPR` folds at compile time to the SAME bits the program computes at run time with the hardware ops on the same literals. Exit 0 iff every check holds, else a bitmask (bit k = check k). license_tier: ORIGINAL

dependencies 0 imports · 0 importers

imports: none

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main fx_id

structs

none

consts

4const PI: f64 = 3.141592653589793
5const HALF_PI: f64 = PI / 2.0
6const TWO_PI: f64 = 2.0 * PI
7const NEG_1P5: f64 = -1.5
8const K: i64 = 3
9const KF: f64 = K * 2.0
10const E9: f64 = 1e9
11const MIX: f64 = (PI - 1.0) / (K + 1)

functions

12func fx_id(x: f64) -> f64 { return x }
called by 1: main
13func main() -> i64
calls 1: fx_id