xref: /freebsd/contrib/arm-optimized-routines/pl/math/tools/erfcf.sollya (revision 2da066ef6d85d3f7cd8aaec14369d66254836536)
1// tables and constants for approximating erfcf(x).
2//
3// Copyright (c) 2023, Arm Limited.
4// SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception
5
6display = hexadecimal;
7prec=128;
8
9// Tables
10print("{ i, r, erfc(r), 2/sqrt(pi) * exp(-r^2) }");
11for i from 0 to 644 do {
12  r = 0.0 + i / 64;
13  t0 = single(erfc(r) * 2^47);
14  t1 = single(2/sqrt(pi) * exp(-r * r) * 2^47);
15  print("{ " @ t0 @ ",\t" @ t1 @ " },");
16};
17
18// Constants
19single(1/3);
20single(2/15);
21single(1/10);
22single(2/sqrt(pi));
23