// polynomial for approximating log(1+x) in single precision // // Copyright (c) 2022-2023, Arm Limited. // SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception deg = 10; a = -0.25; b = 0.5; f = proc(y) { return log(1+y); }; poly = fpminimax(f(x), 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 2 to deg do round(coeff(poly,i), SG, RN);