code wiki / _hdl_build / _pe_f64erfc_test.nx
_pe_f64erfc_test.nx source
↩ module page · 17 lines · 583 B
1// GENERATED invariant KATs for the Builder-authored erfc (ERFC_CF).
2import "_pe_f64erfc.nx"
3func main() -> i64 {
4 var bad: i64 = 0
5 let a: i64 = nx_f64_erfc(0x4000000000000000)
6 if (a >> 63) != 0 { bad = bad + 1 }
7 if a >= 4602678819172646912 { bad = bad + 1 }
8 if a == 0 { bad = bad + 1 }
9 let b: i64 = nx_f64_erfc(0x4008000000000000)
10 let d: i64 = nx_f64_erfc(0x4010000000000000)
11 if a <= b { bad = bad + 1 }
12 if b <= d { bad = bad + 1 }
13 if (b >> 63) != 0 { bad = bad + 1 }
14 if (d >> 63) != 0 { bad = bad + 1 }
15 sys_exit(bad)
16 return bad
17}