diff options
author | Elliott Hughes <enh@google.com> | 2023-01-25 21:31:42 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2023-01-25 21:31:42 +0000 |
commit | 8a481eb48cf7ace04026cbe776d65492f89a6d7d (patch) | |
tree | 945eb1832687ad5eb97c433013617dbe107718e5 /pl/math/tools/erfc.sollya | |
parent | 0bc581b0e4f509c96bffa7af329087ae2b4bfb97 (diff) | |
parent | 8783f524beaad825ac1bddeb93cef35b5f793513 (diff) | |
download | arm-optimized-routines-8a481eb48cf7ace04026cbe776d65492f89a6d7d.tar.gz |
Upgrade ARM-software/optimized-routines to v23.01 am: 62662f115a am: 8783f524be
Original change: https://android-review.googlesource.com/c/platform/external/arm-optimized-routines/+/2402215
Change-Id: Ief5438cf89d86c43e5f52d5e48b882bacb945170
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
Diffstat (limited to 'pl/math/tools/erfc.sollya')
-rw-r--r-- | pl/math/tools/erfc.sollya | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/pl/math/tools/erfc.sollya b/pl/math/tools/erfc.sollya new file mode 100644 index 0000000..8c40b4b --- /dev/null +++ b/pl/math/tools/erfc.sollya @@ -0,0 +1,23 @@ +// polynomial for approximating erfc(x)*exp(x*x) +// +// Copyright (c) 2022-2023, Arm Limited. +// SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception + +deg = 12; // poly degree + +// interval bounds +a = 0x1.60dfc14636e2ap0; +b = 0x1.d413cccfe779ap0; + +f = proc(y) { + t = y + a; + return erfc(t) * exp(t*t); +}; + +poly = remez(f(x), deg, [0;b-a], 1, 1e-16); + +display = hexadecimal; +print("rel error:", accurateinfnorm(1-poly(x)/f(x), [a;b], 30)); +print("in [",a,b,"]"); +print("coeffs:"); +for i from 0 to deg do round(coeff(poly,i), 52, RN); |