code wiki / (root) / nx_f32_rope_test.nx

nx_f32_rope_test.nx

buildroot/runtime/nx_f32_rope_test.nx

2758 B80 linesdepth 6pulls 9 transitivereach 0 importersview sourcekind gate/prooftopic f32
docsdependenciesstructsconstsfunctions

about

nx_f32_rope_test.nx -- smoke for nx_f32_rope.nx. Two test classes: A) position=0 identity: cos(0)=1, sin(0)=0, so RoPE preserves input exactly bit-for-bit. B) head_dim=2, position=1, base=10000: theta_0 = 1.0, so x' = [x0*cos(1) - x1*sin(1), x0*sin(1) + x1*cos(1)]. With x=[1,0]: x' = [cos(1), sin(1)] ~= [0.5403, 0.8415].

dependencies 8 imports · 0 importers

nx_syscalls.nx nx_tier.nx nx_f32.nx nx_f32_div.nx nx_f32_cvt.nx nx_f32_exp.nx nx_f32_sincos.nx nx_f32_rope.nx nx_f32_rope_test.nx

imports: nx_syscalls.nxnx_tier.nxnx_f32.nxnx_f32_div.nxnx_f32_cvt.nxnx_f32_exp.nxnx_f32_sincos.nxnx_f32_rope.nx

imported by: nobody (leaf or entry point)

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

main nx_f32_rope_verdict_is_val sys_mmap nx_f32_rope_apply_vector nx_i32_to_f32 nx_f32_neg nx_f32_div nx_f32_classify nx_f32_exp_field nx_f32_mant_field nx_f32_sign nx_f32_mant_field ↻ nx_f32_exp_field ↻ nx_f32_mul nx_f32_classify ↻ nx_f32_sign ↻ nx_f32_mant_field ↻ nx_f32_exp_field ↻ nx_f32_exp nx_f32_classify ↻ nx_f32_sign ↻ _f32_to_i32_rne nx_f32_classify ↻ nx_f32_sign ↻ nx_f32_exp_field ↻ nx_f32_mant_field ↻ nx_i32_to_f32 ↻ _f32_ldexp nx_f32_classify ↻ nx_f32_exp_field ↻ nx_f32_sign ↻ nx_f32_cos nx_f32_classify ↻ _sc_range_reduce_pk nx_f32_mul ↻ _sc_f32_to_i32_rne nx_f32_classify ↻ nx_f32_sign ↻ nx_f32_exp_field ↻ nx_f32_mant_field ↻

structs

none

consts

none

functions

19func _ulp_diff_pos(a: i64, b: i64) -> i64
called by 1: main
24func main() -> i64