1// polynomial for approximating cbrt(x) in double precision 2// 3// Copyright (c) 2022-2023, Arm Limited. 4// SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 5 6deg = 3; 7 8a = 0.5; 9b = 1; 10 11 12f = x^(1/3); 13 14poly = fpminimax(f, deg, [|double ...|], [a;b]); 15 16display = hexadecimal; 17print("rel error:", accurateinfnorm(1-poly(x)/f(x), [a;b], 30)); 18print("in [",a,b,"]"); 19print("coeffs:"); 20for i from 0 to deg do round(coeff(poly,i), D, RN); 21