1/* 2 * Function wrappers for ulp. 3 * 4 * Copyright (c) 2022-2023, Arm Limited. 5 * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception 6 */ 7 8/* clang-format off */ 9 10/* Wrappers for sincos. */ 11static float sincosf_sinf(float x) {(void)cosf(x); return sinf(x);} 12static float sincosf_cosf(float x) {(void)sinf(x); return cosf(x);} 13static double sincos_sin(double x) {(void)cos(x); return sin(x);} 14static double sincos_cos(double x) {(void)sin(x); return cos(x);} 15#if USE_MPFR 16static int sincos_mpfr_sin(mpfr_t y, const mpfr_t x, mpfr_rnd_t r) { mpfr_cos(y,x,r); return mpfr_sin(y,x,r); } 17static int sincos_mpfr_cos(mpfr_t y, const mpfr_t x, mpfr_rnd_t r) { mpfr_sin(y,x,r); return mpfr_cos(y,x,r); } 18#endif 19 20/* Wrappers for vector functions. */ 21#ifdef __vpcs 22static float Z_sinf(float x) { return _ZGVnN4v_sinf(argf(x))[0]; } 23static float Z_cosf(float x) { return _ZGVnN4v_cosf(argf(x))[0]; } 24static float Z_expf_1u(float x) { return _ZGVnN4v_expf_1u(argf(x))[0]; } 25static float Z_expf(float x) { return _ZGVnN4v_expf(argf(x))[0]; } 26static float Z_exp2f_1u(float x) { return _ZGVnN4v_exp2f_1u(argf(x))[0]; } 27static float Z_exp2f(float x) { return _ZGVnN4v_exp2f(argf(x))[0]; } 28static float Z_logf(float x) { return _ZGVnN4v_logf(argf(x))[0]; } 29static float Z_powf(float x, float y) { return _ZGVnN4vv_powf(argf(x),argf(y))[0]; } 30static double Z_sin(double x) { return _ZGVnN2v_sin(argd(x))[0]; } 31static double Z_cos(double x) { return _ZGVnN2v_cos(argd(x))[0]; } 32static double Z_exp(double x) { return _ZGVnN2v_exp(argd(x))[0]; } 33static double Z_log(double x) { return _ZGVnN2v_log(argd(x))[0]; } 34static double Z_pow(double x, double y) { return _ZGVnN2vv_pow(argd(x),argd(y))[0]; } 35#endif 36 37/* clang-format on */ 38