diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 05:07:20 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-07-07 05:07:20 +0000 |
commit | 70bf985bf12dfa02e9d634a433858320aa2f29dd (patch) | |
tree | b6182e391304fb3a42c51d482dcf671f540f2363 /pl/math/tools/cbrtf.sollya | |
parent | a57d1a3f7aaf52c6cc32e264be96a14ed1cec5a0 (diff) | |
parent | 172d24a7ae67ee7bae413d5a8618f1b5edc002be (diff) | |
download | arm-optimized-routines-android14-mainline-sdkext-release.tar.gz |
Snap for 10453563 from 172d24a7ae67ee7bae413d5a8618f1b5edc002be to mainline-sdkext-releaseaml_sdk_341710000aml_sdk_341510000aml_sdk_341410000aml_sdk_341110080aml_sdk_341110000aml_sdk_341010000aml_sdk_340912010android14-mainline-sdkext-release
Change-Id: I215e72558ed58a0414b9cabba3e9c567d0895c17
Diffstat (limited to 'pl/math/tools/cbrtf.sollya')
-rw-r--r-- | pl/math/tools/cbrtf.sollya | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/pl/math/tools/cbrtf.sollya b/pl/math/tools/cbrtf.sollya new file mode 100644 index 0000000..4e0cc69 --- /dev/null +++ b/pl/math/tools/cbrtf.sollya @@ -0,0 +1,20 @@ +// polynomial for approximating cbrt(x) in single precision +// +// Copyright (c) 2022-2023, Arm Limited. +// SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception + +deg = 3; + +a = 0.5; +b = 1; + + +f = x^(1/3); + +poly = fpminimax(f, deg, [|single ...|], [a;b]); + +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), SG, RN); |