From ecb1c6f6ea7872645cb4c26514d5f64815b61a1b Mon Sep 17 00:00:00 2001 From: Joe Ramsay Date: Thu, 15 Dec 2022 13:27:39 +0000 Subject: pl/math: Move ULP limits to routine source files Introduces a new set of macros and Make rules for mechanically generating a list of ULP limits for each routine, to be consumed by runulp.sh. This removes the need to maintain long lists of thresholds in runulp.sh. --- pl/math/Dir.mk | 33 +++++++++++++++++-- pl/math/acosh_3u.c | 2 ++ pl/math/acoshf_2u8.c | 2 ++ pl/math/asinh_2u5.c | 2 ++ pl/math/asinhf_3u5.c | 2 ++ pl/math/atan2_2u5.c | 2 ++ pl/math/atan2f_3u.c | 2 ++ pl/math/atanhf_3u1.c | 2 ++ pl/math/cbrtf_1u5.c | 2 ++ pl/math/cosh_2u.c | 2 ++ pl/math/coshf_1u9.c | 2 ++ pl/math/erfc_4u5.c | 2 ++ pl/math/erfcf_2u.c | 2 ++ pl/math/erff_1u5.c | 2 ++ pl/math/expm1_2u5.c | 2 ++ pl/math/expm1f_1u6.c | 2 ++ pl/math/include/pl_test.h | 16 ++++++++++ pl/math/log10_2u.c | 2 ++ pl/math/log10f.c | 14 +++------ pl/math/log1p_2u.c | 2 ++ pl/math/log1pf_2u1.c | 2 ++ pl/math/sinh_3u.c | 2 ++ pl/math/sinhf_2u3.c | 2 ++ pl/math/sv_atan2_2u5.c | 9 +++--- pl/math/sv_atan2f_3u.c | 9 +++--- pl/math/sv_atan_2u5.c | 6 ++-- pl/math/sv_atanf_2u9.c | 6 ++-- pl/math/sv_cos_2u5.c | 6 ++-- pl/math/sv_cosf_2u1.c | 6 ++-- pl/math/sv_erf_2u5.c | 6 ++-- pl/math/sv_erfc_4u.c | 6 ++-- pl/math/sv_erff_1u3.c | 6 ++-- pl/math/sv_expf_2u.c | 6 ++-- pl/math/sv_log10_2u5.c | 6 ++-- pl/math/sv_log10f_3u5.c | 6 ++-- pl/math/sv_log_2u5.c | 4 ++- pl/math/sv_logf_3u4.c | 6 ++-- pl/math/sv_sin_3u.c | 6 ++-- pl/math/sv_sinf_1u9.c | 6 ++-- pl/math/sv_tanf_3u2.c | 6 ++-- pl/math/tanf_3u3.c | 2 ++ pl/math/tanhf_2u6.c | 2 ++ pl/math/test/pl_test.h | 14 +++++++++ pl/math/test/runulp.sh | 80 ++++------------------------------------------- pl/math/v_asinh_2u5.c | 2 ++ pl/math/v_asinhf_2u7.c | 2 ++ pl/math/v_atan2_3u.c | 3 ++ pl/math/v_atan2f_3u.c | 2 ++ pl/math/v_atan_2u5.c | 2 ++ pl/math/v_atanf_3u.c | 2 ++ pl/math/v_atanhf_3u1.c | 3 +- pl/math/v_cbrtf_1u5.c | 2 ++ pl/math/v_cosh_2u.c | 4 ++- pl/math/v_coshf_2u4.c | 2 ++ pl/math/v_erf_2u.c | 2 ++ pl/math/v_erfc_4u.c | 2 ++ pl/math/v_erfcf_1u.c | 2 ++ pl/math/v_erff_1u5.c | 2 ++ pl/math/v_expm1_2u5.c | 2 ++ pl/math/v_expm1f_1u6.c | 2 ++ pl/math/v_log10_2u5.c | 2 ++ pl/math/v_log10f_3u5.c | 2 ++ pl/math/v_log1p_2u5.c | 6 ++-- pl/math/v_log1pf_2u1.c | 2 ++ pl/math/v_log2_3u.c | 2 ++ pl/math/v_log2f_2u6.c | 2 ++ pl/math/v_sinh_3u.c | 2 ++ pl/math/v_sinhf_2u3.c | 2 ++ pl/math/v_tanf_3u2.c | 2 ++ pl/math/v_tanhf_2u6.c | 2 ++ pl/math/vn_asinh_2u5.c | 2 +- pl/math/vn_asinhf_2u7.c | 2 +- pl/math/vn_atan2_3u.c | 2 +- pl/math/vn_atan2f_3u.c | 2 +- pl/math/vn_atan_2u5.c | 2 +- pl/math/vn_atanf_3u.c | 2 +- pl/math/vn_atanhf_3u1.c | 2 +- pl/math/vn_cbrtf_1u5.c | 2 +- pl/math/vn_cosh_2u.c | 2 +- pl/math/vn_coshf_2u4.c | 2 +- pl/math/vn_erf_2u.c | 2 +- pl/math/vn_erfc_4u.c | 2 +- pl/math/vn_erfcf_1u.c | 2 +- pl/math/vn_erff_1u5.c | 2 +- pl/math/vn_expm1_2u5.c | 2 +- pl/math/vn_expm1f_1u6.c | 2 +- pl/math/vn_log10_2u5.c | 2 +- pl/math/vn_log10f_3u5.c | 2 +- pl/math/vn_log1p_2u5.c | 2 +- pl/math/vn_log1pf_2u1.c | 2 +- pl/math/vn_log2_3u.c | 2 +- pl/math/vn_log2f_2u6.c | 2 +- pl/math/vn_sinh_3u.c | 2 +- pl/math/vn_sinhf_2u3.c | 2 +- pl/math/vn_tanf_3u2.c | 2 +- pl/math/vn_tanhf_2u6.c | 2 +- 96 files changed, 266 insertions(+), 153 deletions(-) create mode 100644 pl/math/include/pl_test.h create mode 100644 pl/math/test/pl_test.h diff --git a/pl/math/Dir.mk b/pl/math/Dir.mk index b866fa4..0cae7be 100644 --- a/pl/math/Dir.mk +++ b/pl/math/Dir.mk @@ -143,8 +143,37 @@ check-pl/math-test: $(math-tools) check-pl/math-rtest: $(math-host-tools) $(math-tools) cat $(pl-math-rtests) | build/pl/bin/rtest | $(EMULATOR) build/pl/bin/mathtest $(math-testflags) -check-pl/math-ulp: $(math-tools) - WANT_ERRNO=$(WANT_ERRNO) WANT_SVE_MATH=$(WANT_SVE_MATH) ULPFLAGS="$(math-ulpflags)" build/pl/bin/runulp.sh $(EMULATOR) +ulp-input-dir=$(B)/test/inputs + +math-lib-lims = $(patsubst $(PLM)/%,$(ulp-input-dir)/%.ulp,$(basename $(math-lib-srcs))) +math-lib-aliases = $(patsubst $(PLM)/%,$(ulp-input-dir)/%.alias,$(basename $(math-lib-srcs))) + +$(math-lib-lims): CFLAGS_PL += -I$(PLM) -I$(PLM)/include $(math-cflags) +$(math-lib-aliases): CFLAGS_PL += -I$(PLM) -I$(PLM)/include $(math-cflags) + +$(ulp-input-dir)/%.ulp: $(PLM)/%.c + mkdir -p $(@D) + $(CC) -I$(PLM)/test $(CFLAGS_PL) $< -o - -E | { grep "PL_TEST_ULP" || true; } > $@ + +$(ulp-input-dir)/%.alias: $(PLM)/%.c + mkdir -p $(@D) + $(CC) -I$(PLM)/test $(CFLAGS_PL) $< -o - -E | { grep "PL_TEST_ALIAS" || true; } | sed "s/_x / /g"> $@ + +ulp-lims := $(ulp-input-dir)/limits +$(ulp-lims): $(math-lib-lims) + cat $^ | sed "s/PL_TEST_ULP //g;s/^ *//g" > $@ + +ulp-aliases := $(ulp-input-dir)/aliases +$(ulp-aliases): $(math-lib-aliases) + cat $^ | sed "s/PL_TEST_ALIAS //g;s/^ *//g" > $@ + +check-pl/math-ulp: $(math-tools) $(ulp-lims) $(ulp-aliases) + WANT_ERRNO=$(WANT_ERRNO) \ + WANT_SVE_MATH=$(WANT_SVE_MATH) \ + ULPFLAGS="$(math-ulpflags)" \ + LIMITS=../../../$(ulp-lims) \ + ALIASES=../../../$(ulp-aliases) \ + build/pl/bin/runulp.sh $(EMULATOR) check-pl/math: check-pl/math-test check-pl/math-rtest check-pl/math-ulp diff --git a/pl/math/acosh_3u.c b/pl/math/acosh_3u.c index e0014d6..f135b5d 100644 --- a/pl/math/acosh_3u.c +++ b/pl/math/acosh_3u.c @@ -6,6 +6,7 @@ #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #define Ln2 (0x1.62e42fefa39efp-1) #define MinusZero (0x8000000000000000) @@ -56,3 +57,4 @@ acosh (double x) } PL_SIG (S, D, 1, acosh, 1.0, 10.0) +PL_TEST_ULP (acosh, 2.19) diff --git a/pl/math/acoshf_2u8.c b/pl/math/acoshf_2u8.c index 0b1e9c7..0f9824d 100644 --- a/pl/math/acoshf_2u8.c +++ b/pl/math/acoshf_2u8.c @@ -6,6 +6,7 @@ #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #define Ln2 (0x1.62e4p-1f) #define MinusZero 0x80000000 @@ -53,3 +54,4 @@ acoshf (float x) } PL_SIG (S, F, 1, acosh, 1.0, 10.0) +PL_TEST_ULP (acoshf, 2.30) diff --git a/pl/math/asinh_2u5.c b/pl/math/asinh_2u5.c index bbe6bee..44435be 100644 --- a/pl/math/asinh_2u5.c +++ b/pl/math/asinh_2u5.c @@ -7,6 +7,7 @@ #include "estrin.h" #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #define AbsMask 0x7fffffffffffffff #define ExpM26 0x3e50000000000000 /* asuint64(0x1.0p-26). */ @@ -75,3 +76,4 @@ asinh (double x) } PL_SIG (S, D, 1, asinh, -10.0, 10.0) +PL_TEST_ULP (asinh, 1.54) diff --git a/pl/math/asinhf_3u5.c b/pl/math/asinhf_3u5.c index ec3dd9b..36c332d 100644 --- a/pl/math/asinhf_3u5.c +++ b/pl/math/asinhf_3u5.c @@ -7,6 +7,7 @@ #include "estrinf.h" #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #define AbsMask (0x7fffffff) #define SqrtFltMax (0x1.749e96p+10f) @@ -69,3 +70,4 @@ asinhf (float x) } PL_SIG (S, F, 1, asinh, -10.0, 10.0) +PL_TEST_ULP (asinhf, 2.9) diff --git a/pl/math/atan2_2u5.c b/pl/math/atan2_2u5.c index c1cf7a3..fb5ced4 100644 --- a/pl/math/atan2_2u5.c +++ b/pl/math/atan2_2u5.c @@ -10,6 +10,7 @@ #include "atan_common.h" #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #define Pi (0x1.921fb54442d18p+1) #define PiOver2 (0x1.921fb54442d18p+0) @@ -150,3 +151,4 @@ atan2 (double y, double x) /* Arity of 2 means no mathbench entry emitted. See test/mathbench_funcs.h. */ PL_SIG (S, D, 2, atan2) +PL_TEST_ULP (atan2, 1.78) diff --git a/pl/math/atan2f_3u.c b/pl/math/atan2f_3u.c index 7780be6..0a3e975 100644 --- a/pl/math/atan2f_3u.c +++ b/pl/math/atan2f_3u.c @@ -10,6 +10,7 @@ #include "atanf_common.h" #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #define Pi (0x1.921fb6p+1f) #define PiOver2 (0x1.921fb6p+0f) @@ -158,3 +159,4 @@ atan2f (float y, float x) /* Arity of 2 means no mathbench entry emitted. See test/mathbench_funcs.h. */ PL_SIG (S, F, 2, atan2) +PL_TEST_ULP (atan2f, 2.4) diff --git a/pl/math/atanhf_3u1.c b/pl/math/atanhf_3u1.c index db663bf..47b9486 100644 --- a/pl/math/atanhf_3u1.c +++ b/pl/math/atanhf_3u1.c @@ -7,6 +7,7 @@ #include "math_config.h" #include "mathlib.h" #include "pl_sig.h" +#include "pl_test.h" #define AbsMask 0x7fffffff #define Half 0x3f000000 @@ -77,3 +78,4 @@ atanhf (float x) } PL_SIG (S, F, 1, atanh, -1.0, 1.0) +PL_TEST_ULP (atanhf, 2.59) diff --git a/pl/math/cbrtf_1u5.c b/pl/math/cbrtf_1u5.c index 74e7a49..c6d1de9 100644 --- a/pl/math/cbrtf_1u5.c +++ b/pl/math/cbrtf_1u5.c @@ -8,6 +8,7 @@ #include "estrinf.h" #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #define AbsMask 0x7fffffff #define SignMask 0x80000000 @@ -61,3 +62,4 @@ cbrtf (float x) } PL_SIG (S, F, 1, cbrt, -10.0, 10.0) +PL_TEST_ULP (cbrtf, 1.03) diff --git a/pl/math/cosh_2u.c b/pl/math/cosh_2u.c index 6be189d..9e137ff 100644 --- a/pl/math/cosh_2u.c +++ b/pl/math/cosh_2u.c @@ -7,6 +7,7 @@ #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #define AbsMask 0x7fffffffffffffff #define SpecialBound \ @@ -56,3 +57,4 @@ cosh (double x) } PL_SIG (S, D, 1, cosh, -10.0, 10.0) +PL_TEST_ULP (cosh, 1.43) diff --git a/pl/math/coshf_1u9.c b/pl/math/coshf_1u9.c index b9cbe54..0e7b30f 100644 --- a/pl/math/coshf_1u9.c +++ b/pl/math/coshf_1u9.c @@ -7,6 +7,7 @@ #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #define AbsMask 0x7fffffff #define TinyBound 0x20000000 /* 0x1p-63: Round to 1 below this. */ @@ -61,3 +62,4 @@ coshf (float x) } PL_SIG (S, F, 1, cosh, -10.0, 10.0) +PL_TEST_ULP (coshf, 1.89) diff --git a/pl/math/erfc_4u5.c b/pl/math/erfc_4u5.c index b418421..8394e48 100644 --- a/pl/math/erfc_4u5.c +++ b/pl/math/erfc_4u5.c @@ -8,6 +8,7 @@ #include "math_config.h" #include "pairwise_horner.h" #include "pl_sig.h" +#include "pl_test.h" #define AbsMask (0x7fffffffffffffff) @@ -145,3 +146,4 @@ erfc (double x) } PL_SIG (S, D, 1, erfc, -6.0, 28.0) +PL_TEST_ULP (erfc, 3.56) diff --git a/pl/math/erfcf_2u.c b/pl/math/erfcf_2u.c index 32a96dc..f76a11a 100644 --- a/pl/math/erfcf_2u.c +++ b/pl/math/erfcf_2u.c @@ -8,6 +8,7 @@ #include "erfcf.h" #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #define P(i) __erfcf_poly_data.poly[i] @@ -123,3 +124,4 @@ erfcf (float x) } PL_SIG (S, F, 1, erfc, -4.0, 10.0) +PL_TEST_ULP (erfcf, 1.5) diff --git a/pl/math/erff_1u5.c b/pl/math/erff_1u5.c index afa5880..fa1e55f 100644 --- a/pl/math/erff_1u5.c +++ b/pl/math/erff_1u5.c @@ -8,6 +8,7 @@ #include "hornerf.h" #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #define TwoOverSqrtPiMinusOne 0x1.06eba8p-3f #define A __erff_data.erff_poly_A @@ -98,3 +99,4 @@ erff (float x) } PL_SIG (S, F, 1, erf, -4.0, 4.0) +PL_TEST_ULP (erff, 0.6) diff --git a/pl/math/expm1_2u5.c b/pl/math/expm1_2u5.c index 55ddbd1..cfde806 100644 --- a/pl/math/expm1_2u5.c +++ b/pl/math/expm1_2u5.c @@ -8,6 +8,7 @@ #include "estrin.h" #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #define InvLn2 0x1.71547652b82fep0 #define Ln2hi 0x1.62e42fefa39efp-1 @@ -76,3 +77,4 @@ expm1 (double x) } PL_SIG (S, D, 1, expm1, -9.9, 9.9) +PL_TEST_ULP (expm1, 1.68) diff --git a/pl/math/expm1f_1u6.c b/pl/math/expm1f_1u6.c index 9c0c178..82dc28d 100644 --- a/pl/math/expm1f_1u6.c +++ b/pl/math/expm1f_1u6.c @@ -8,6 +8,7 @@ #include "hornerf.h" #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #define Shift (0x1.8p23f) #define InvLn2 (0x1.715476p+0f) @@ -72,3 +73,4 @@ expm1f (float x) } PL_SIG (S, F, 1, expm1, -9.9, 9.9) +PL_TEST_ULP (expm1f, 1.02) diff --git a/pl/math/include/pl_test.h b/pl/math/include/pl_test.h new file mode 100644 index 0000000..1ab3814 --- /dev/null +++ b/pl/math/include/pl_test.h @@ -0,0 +1,16 @@ +/* + * PL macros to aid testing. This version of this file is used for building the + * routine, not the tests. Separate definitions are found in test/pl_test.h + * which emit test parameters. + * + * Copyright (c) 2022, Arm Limited. + * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception. + */ + +/* Emit max ULP threshold - silenced for building the routine. */ +#define PL_TEST_ULP(f, l) + +/* Emit alias. The PL_TEST_ALIAS declaration is piggy-backed on top of + strong_alias. Use PL_ALIAS instead of strong_alias to make sure the alias is + also added to the test suite. */ +#define PL_ALIAS(a, b) strong_alias (a, b) diff --git a/pl/math/log10_2u.c b/pl/math/log10_2u.c index b05e17b..1827bb9 100644 --- a/pl/math/log10_2u.c +++ b/pl/math/log10_2u.c @@ -7,6 +7,7 @@ #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" /* Polynomial coefficients and lookup tables. */ #define T __log10_data.tab @@ -143,3 +144,4 @@ log10l (long double x) // clang-format on PL_SIG (S, D, 1, log10, 0.01, 11.1) +PL_TEST_ULP (log10, 1.11) diff --git a/pl/math/log10f.c b/pl/math/log10f.c index ea67b4b..84db420 100644 --- a/pl/math/log10f.c +++ b/pl/math/log10f.c @@ -5,11 +5,13 @@ * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception */ -#include "math_config.h" -#include "pl_sig.h" #include #include +#include "math_config.h" +#include "pl_sig.h" +#include "pl_test.h" + /* Data associated to logf: LOGF_TABLE_BITS = 4 @@ -86,11 +88,5 @@ log10f (float x) return eval_as_float (y); } -// clang-format off -#if USE_GLIBC_ABI -strong_alias (log10f, __log10f_finite) -hidden_alias (log10f, __ieee754_log10f) -#endif - PL_SIG (S, F, 1, log10, 0.01, 11.1) - // clang-format on +PL_TEST_ULP (log10f, 0.30) diff --git a/pl/math/log1p_2u.c b/pl/math/log1p_2u.c index 20b4811..5a6f798 100644 --- a/pl/math/log1p_2u.c +++ b/pl/math/log1p_2u.c @@ -7,6 +7,7 @@ #include "estrin.h" #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #define Ln2Hi 0x1.62e42fefa3800p-1 #define Ln2Lo 0x1.ef35793c76730p-45 @@ -123,3 +124,4 @@ log1p (double x) } PL_SIG (S, D, 1, log1p, -0.9, 10.0) +PL_TEST_ULP (log1p, 1.26) diff --git a/pl/math/log1pf_2u1.c b/pl/math/log1pf_2u1.c index 97dd1c4..f791105 100644 --- a/pl/math/log1pf_2u1.c +++ b/pl/math/log1pf_2u1.c @@ -7,6 +7,7 @@ #include "hornerf.h" #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #define Ln2 (0x1.62e43p-1f) #define SignMask (0x80000000) @@ -152,3 +153,4 @@ log1pf (float x) } PL_SIG (S, F, 1, log1p, -0.9, 10.0) +PL_TEST_ULP (log1pf, 1.52) diff --git a/pl/math/sinh_3u.c b/pl/math/sinh_3u.c index f56b8d0..86f00a1 100644 --- a/pl/math/sinh_3u.c +++ b/pl/math/sinh_3u.c @@ -7,6 +7,7 @@ #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #define AbsMask 0x7fffffffffffffff #define Half 0x3fe0000000000000 @@ -56,3 +57,4 @@ sinh (double x) } PL_SIG (S, D, 1, sinh, -10.0, 10.0) +PL_TEST_ULP (sinh, 2.08) diff --git a/pl/math/sinhf_2u3.c b/pl/math/sinhf_2u3.c index cb5eb51..15786d9 100644 --- a/pl/math/sinhf_2u3.c +++ b/pl/math/sinhf_2u3.c @@ -7,6 +7,7 @@ #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #define AbsMask 0x7fffffff #define Half 0x3f000000 @@ -66,3 +67,4 @@ sinhf (float x) } PL_SIG (S, F, 1, sinh, -10.0, 10.0) +PL_TEST_ULP (sinhf, 1.76) diff --git a/pl/math/sv_atan2_2u5.c b/pl/math/sv_atan2_2u5.c index c047595..4ab2fea 100644 --- a/pl/math/sv_atan2_2u5.c +++ b/pl/math/sv_atan2_2u5.c @@ -7,6 +7,7 @@ #include "sv_math.h" #include "pl_sig.h" +#include "pl_test.h" #if SV_SUPPORTED @@ -79,9 +80,9 @@ __sv_atan2_x (sv_f64_t y, sv_f64_t x, const svbool_t pg) return ret; } -strong_alias (__sv_atan2_x, _ZGVsMxvv_atan2) +PL_ALIAS (__sv_atan2_x, _ZGVsMxvv_atan2) - /* Arity of 2 means no mathbench entry emitted. See test/mathbench_funcs.h. - */ - PL_SIG (SV, D, 2, atan2) +/* Arity of 2 means no mathbench entry emitted. See test/mathbench_funcs.h. */ +PL_SIG (SV, D, 2, atan2) +PL_TEST_ULP (__sv_atan2, 1.78) #endif diff --git a/pl/math/sv_atan2f_3u.c b/pl/math/sv_atan2f_3u.c index 0ce7071..90656f0 100644 --- a/pl/math/sv_atan2f_3u.c +++ b/pl/math/sv_atan2f_3u.c @@ -7,6 +7,7 @@ #include "sv_math.h" #include "pl_sig.h" +#include "pl_test.h" #if SV_SUPPORTED @@ -80,9 +81,9 @@ __sv_atan2f_x (sv_f32_t y, sv_f32_t x, const svbool_t pg) return ret; } -strong_alias (__sv_atan2f_x, _ZGVsMxvv_atan2f) +PL_ALIAS (__sv_atan2f_x, _ZGVsMxvv_atan2f) - /* Arity of 2 means no mathbench entry emitted. See test/mathbench_funcs.h. - */ - PL_SIG (SV, F, 2, atan2) +/* Arity of 2 means no mathbench entry emitted. See test/mathbench_funcs.h. */ +PL_SIG (SV, F, 2, atan2) +PL_TEST_ULP (__sv_atan2f, 2.45) #endif diff --git a/pl/math/sv_atan_2u5.c b/pl/math/sv_atan_2u5.c index 4f52b43..93b39b1 100644 --- a/pl/math/sv_atan_2u5.c +++ b/pl/math/sv_atan_2u5.c @@ -7,6 +7,7 @@ #include "sv_math.h" #include "pl_sig.h" +#include "pl_test.h" #if SV_SUPPORTED @@ -49,7 +50,8 @@ __sv_atan_x (sv_f64_t x, const svbool_t pg) return y; } -strong_alias (__sv_atan_x, _ZGVsMxv_atan) +PL_ALIAS (__sv_atan_x, _ZGVsMxv_atan) - PL_SIG (SV, D, 1, atan, -3.1, 3.1) +PL_SIG (SV, D, 1, atan, -3.1, 3.1) +PL_TEST_ULP (__sv_atan, 1.78) #endif diff --git a/pl/math/sv_atanf_2u9.c b/pl/math/sv_atanf_2u9.c index db15830..386c28e 100644 --- a/pl/math/sv_atanf_2u9.c +++ b/pl/math/sv_atanf_2u9.c @@ -7,6 +7,7 @@ #include "sv_math.h" #include "pl_sig.h" +#include "pl_test.h" #if SV_SUPPORTED @@ -46,7 +47,8 @@ __sv_atanf_x (sv_f32_t x, const svbool_t pg) return sv_as_f32_u32 (sveor_u32_x (pg, sv_as_u32_f32 (y), sign)); } -strong_alias (__sv_atanf_x, _ZGVsMxv_atanf) +PL_ALIAS (__sv_atanf_x, _ZGVsMxv_atanf) - PL_SIG (SV, F, 1, atan, -3.1, 3.1) +PL_SIG (SV, F, 1, atan, -3.1, 3.1) +PL_TEST_ULP (__sv_atanf, 2.9) #endif diff --git a/pl/math/sv_cos_2u5.c b/pl/math/sv_cos_2u5.c index a19be9b..146ca22 100644 --- a/pl/math/sv_cos_2u5.c +++ b/pl/math/sv_cos_2u5.c @@ -7,6 +7,7 @@ #include "sv_math.h" #include "pl_sig.h" +#include "pl_test.h" #if SV_SUPPORTED @@ -74,7 +75,8 @@ __sv_cos_x (sv_f64_t x, const svbool_t pg) return y; } -strong_alias (__sv_cos_x, _ZGVsMxv_cos) +PL_ALIAS (__sv_cos_x, _ZGVsMxv_cos) - PL_SIG (SV, D, 1, cos, -3.1, 3.1) +PL_SIG (SV, D, 1, cos, -3.1, 3.1) +PL_TEST_ULP (__sv_cos, 1.61) #endif diff --git a/pl/math/sv_cosf_2u1.c b/pl/math/sv_cosf_2u1.c index 3bc3d71..fdc4b1e 100644 --- a/pl/math/sv_cosf_2u1.c +++ b/pl/math/sv_cosf_2u1.c @@ -7,6 +7,7 @@ #include "sv_math.h" #include "pl_sig.h" +#include "pl_test.h" #if SV_SUPPORTED @@ -72,7 +73,8 @@ __sv_cosf_x (sv_f32_t x, const svbool_t pg) return y; } -strong_alias (__sv_cosf_x, _ZGVsMxv_cosf) +PL_ALIAS (__sv_cosf_x, _ZGVsMxv_cosf) - PL_SIG (SV, F, 1, cos, -3.1, 3.1) +PL_SIG (SV, F, 1, cos, -3.1, 3.1) +PL_TEST_ULP (__sv_cosf, 1.57) #endif diff --git a/pl/math/sv_erf_2u5.c b/pl/math/sv_erf_2u5.c index eac500c..f91aa41 100644 --- a/pl/math/sv_erf_2u5.c +++ b/pl/math/sv_erf_2u5.c @@ -7,6 +7,7 @@ #include "sv_math.h" #include "pl_sig.h" +#include "pl_test.h" #if SV_SUPPORTED @@ -87,7 +88,8 @@ __sv_erf_x (sv_f64_t x, const svbool_t pg) return y; } -strong_alias (__sv_erf_x, _ZGVsMxv_erf) +PL_ALIAS (__sv_erf_x, _ZGVsMxv_erf) - PL_SIG (SV, D, 1, erf, -4.0, 4.0) +PL_SIG (SV, D, 1, erf, -4.0, 4.0) +PL_TEST_ULP (__sv_erf, 1.97) #endif diff --git a/pl/math/sv_erfc_4u.c b/pl/math/sv_erfc_4u.c index 41fb654..d426fa9 100644 --- a/pl/math/sv_erfc_4u.c +++ b/pl/math/sv_erfc_4u.c @@ -7,6 +7,7 @@ #include "sv_math.h" #include "pl_sig.h" +#include "pl_test.h" #if SV_SUPPORTED #include "sv_exp_tail.h" @@ -132,7 +133,8 @@ __sv_erfc_x (sv_f64_t x, const svbool_t pg) return y; } -strong_alias (__sv_erfc_x, _ZGVsMxv_erfc) +PL_ALIAS (__sv_erfc_x, _ZGVsMxv_erfc) - PL_SIG (SV, D, 1, erfc, -4.0, 10.0) +PL_SIG (SV, D, 1, erfc, -4.0, 10.0) +PL_TEST_ULP (__sv_erfc, 3.15) #endif diff --git a/pl/math/sv_erff_1u3.c b/pl/math/sv_erff_1u3.c index 02d7625..9589fb3 100644 --- a/pl/math/sv_erff_1u3.c +++ b/pl/math/sv_erff_1u3.c @@ -7,6 +7,7 @@ #include "sv_math.h" #include "pl_sig.h" +#include "pl_test.h" #if SV_SUPPORTED @@ -88,7 +89,8 @@ __sv_erff_x (sv_f32_t x, const svbool_t pg) return y; } -strong_alias (__sv_erff_x, _ZGVsMxv_erff) +PL_ALIAS (__sv_erff_x, _ZGVsMxv_erff) - PL_SIG (SV, F, 1, erf, -4.0, 4.0) +PL_SIG (SV, F, 1, erf, -4.0, 4.0) +PL_TEST_ULP (__sv_erff, 0.76) #endif diff --git a/pl/math/sv_expf_2u.c b/pl/math/sv_expf_2u.c index d301392..f97a762 100644 --- a/pl/math/sv_expf_2u.c +++ b/pl/math/sv_expf_2u.c @@ -7,6 +7,7 @@ #include "sv_math.h" #include "pl_sig.h" +#include "pl_test.h" #if SV_SUPPORTED @@ -140,7 +141,8 @@ __sv_expf_x (sv_f32_t x, const svbool_t pg) return sv_fma_f32_x (pg, poly, scale, scale); } -strong_alias (__sv_expf_x, _ZGVsMxv_expf) +PL_ALIAS (__sv_expf_x, _ZGVsMxv_expf) - PL_SIG (SV, F, 1, exp, -9.9, 9.9) +PL_SIG (SV, F, 1, exp, -9.9, 9.9) +PL_TEST_ULP (__sv_expf, 1.46) #endif // SV_SUPPORTED diff --git a/pl/math/sv_log10_2u5.c b/pl/math/sv_log10_2u5.c index d6ed49a..a9b002b 100644 --- a/pl/math/sv_log10_2u5.c +++ b/pl/math/sv_log10_2u5.c @@ -8,6 +8,7 @@ #include "sv_math.h" #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #if SV_SUPPORTED @@ -75,7 +76,8 @@ __sv_log10_x (sv_f64_t x, const svbool_t pg) return y; } -strong_alias (__sv_log10_x, _ZGVsMxv_log10) +PL_ALIAS (__sv_log10_x, _ZGVsMxv_log10) - PL_SIG (SV, D, 1, log10, 0.01, 11.1) +PL_SIG (SV, D, 1, log10, 0.01, 11.1) +PL_TEST_ULP (__sv_log10, 1.97) #endif diff --git a/pl/math/sv_log10f_3u5.c b/pl/math/sv_log10f_3u5.c index c1ff196..b29ee80 100644 --- a/pl/math/sv_log10f_3u5.c +++ b/pl/math/sv_log10f_3u5.c @@ -7,6 +7,7 @@ #include "sv_math.h" #include "pl_sig.h" +#include "pl_test.h" #if SV_SUPPORTED @@ -74,7 +75,8 @@ __sv_log10f_x (sv_f32_t x, const svbool_t pg) return y; } -strong_alias (__sv_log10f_x, _ZGVsMxv_log10f) +PL_ALIAS (__sv_log10f_x, _ZGVsMxv_log10f) - PL_SIG (SV, F, 1, log10, 0.01, 11.1) +PL_SIG (SV, F, 1, log10, 0.01, 11.1) +PL_TEST_ULP (__sv_log10f, 2.82) #endif diff --git a/pl/math/sv_log_2u5.c b/pl/math/sv_log_2u5.c index a50c3d6..8477739 100644 --- a/pl/math/sv_log_2u5.c +++ b/pl/math/sv_log_2u5.c @@ -7,6 +7,7 @@ #include "sv_math.h" #include "pl_sig.h" +#include "pl_test.h" #if SV_SUPPORTED @@ -71,7 +72,8 @@ __sv_log_x (sv_f64_t x, const svbool_t pg) return y; } -strong_alias (__sv_log_x, _ZGVsMxv_log); +PL_ALIAS (__sv_log_x, _ZGVsMxv_log) PL_SIG (SV, D, 1, log, 0.01, 11.1) +PL_TEST_ULP (__sv_log, 1.68) #endif // SV_SUPPORTED diff --git a/pl/math/sv_logf_3u4.c b/pl/math/sv_logf_3u4.c index e9147e4..8fea406 100644 --- a/pl/math/sv_logf_3u4.c +++ b/pl/math/sv_logf_3u4.c @@ -7,6 +7,7 @@ #include "sv_math.h" #include "pl_sig.h" +#include "pl_test.h" #if SV_SUPPORTED @@ -63,7 +64,8 @@ __sv_logf_x (sv_f32_t x, const svbool_t pg) return y; } -strong_alias (__sv_logf_x, _ZGVsMxv_logf) +PL_ALIAS (__sv_logf_x, _ZGVsMxv_logf) - PL_SIG (SV, F, 1, log, 0.01, 11.1) +PL_SIG (SV, F, 1, log, 0.01, 11.1) +PL_TEST_ULP (__sv_logf, 2.85) #endif // SV_SUPPORTED diff --git a/pl/math/sv_sin_3u.c b/pl/math/sv_sin_3u.c index 4d879e0..5637ebe 100644 --- a/pl/math/sv_sin_3u.c +++ b/pl/math/sv_sin_3u.c @@ -7,6 +7,7 @@ #include "sv_math.h" #include "pl_sig.h" +#include "pl_test.h" #if SV_SUPPORTED @@ -79,7 +80,8 @@ __sv_sin_x (sv_f64_t x, const svbool_t pg) return y; } -strong_alias (__sv_sin_x, _ZGVsMxv_sin) +PL_ALIAS (__sv_sin_x, _ZGVsMxv_sin) - PL_SIG (SV, D, 1, sin, -3.1, 3.1) +PL_SIG (SV, D, 1, sin, -3.1, 3.1) +PL_TEST_ULP (__sv_sin, 2.03) #endif diff --git a/pl/math/sv_sinf_1u9.c b/pl/math/sv_sinf_1u9.c index 5634a87..ca26e92 100644 --- a/pl/math/sv_sinf_1u9.c +++ b/pl/math/sv_sinf_1u9.c @@ -7,6 +7,7 @@ #include "sv_math.h" #include "pl_sig.h" +#include "pl_test.h" #if SV_SUPPORTED @@ -74,7 +75,8 @@ __sv_sinf_x (sv_f32_t x, const svbool_t pg) return y; } -strong_alias (__sv_sinf_x, _ZGVsMxv_sinf) +PL_ALIAS (__sv_sinf_x, _ZGVsMxv_sinf) - PL_SIG (SV, F, 1, sin, -3.1, 3.1) +PL_SIG (SV, F, 1, sin, -3.1, 3.1) +PL_TEST_ULP (__sv_sinf, 1.40) #endif diff --git a/pl/math/sv_tanf_3u2.c b/pl/math/sv_tanf_3u2.c index 2f28239..8629b05 100644 --- a/pl/math/sv_tanf_3u2.c +++ b/pl/math/sv_tanf_3u2.c @@ -7,6 +7,7 @@ #include "sv_math.h" #include "pl_sig.h" +#include "pl_test.h" #if SV_SUPPORTED @@ -98,7 +99,8 @@ __sv_tanf_x (sv_f32_t x, const svbool_t pg) return y; } -strong_alias (__sv_tanf_x, _ZGVsMxv_tanf) +PL_ALIAS (__sv_tanf_x, _ZGVsMxv_tanf) - PL_SIG (SV, F, 1, tan, -3.1, 3.1) +PL_SIG (SV, F, 1, tan, -3.1, 3.1) +PL_TEST_ULP (__sv_tanf, 2.7) #endif diff --git a/pl/math/tanf_3u3.c b/pl/math/tanf_3u3.c index 3e4ad38..e8784d8 100644 --- a/pl/math/tanf_3u3.c +++ b/pl/math/tanf_3u3.c @@ -6,6 +6,7 @@ */ #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" /* Useful constants. */ #define NegPio2_1 (-0x1.921fb6p+0f) @@ -193,3 +194,4 @@ tanf (float x) } PL_SIG (S, F, 1, tan, -3.1, 3.1) +PL_TEST_ULP (tanf, 2.80) diff --git a/pl/math/tanhf_2u6.c b/pl/math/tanhf_2u6.c index 90f561f..e6cbbd0 100644 --- a/pl/math/tanhf_2u6.c +++ b/pl/math/tanhf_2u6.c @@ -6,6 +6,7 @@ */ #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #define BoringBound \ 0x41102cb3 /* 0x1.205966p+3, above which tanhf rounds to 1 (or -1 for \ @@ -81,3 +82,4 @@ tanhf (float x) } PL_SIG (S, F, 1, tanh, -10.0, 10.0) +PL_TEST_ULP (tanhf, 2.09) diff --git a/pl/math/test/pl_test.h b/pl/math/test/pl_test.h new file mode 100644 index 0000000..d4901b1 --- /dev/null +++ b/pl/math/test/pl_test.h @@ -0,0 +1,14 @@ +/* + * PL macros for emitting various details about routines for consumption by + * runulp.sh. + * + * Copyright (c) 2022, Arm Limited. + * SPDX-License-Identifier: MIT OR Apache-2.0 WITH LLVM-exception. + */ + +/* Emit the max ULP threshold, l, for routine f. */ +#define PL_TEST_ULP(f, l) PL_TEST_ULP f l + +/* Emit aliases to allow test params to be mapped from aliases back to their + aliasees. */ +#define PL_ALIAS(a, b) PL_TEST_ALIAS a b diff --git a/pl/math/test/runulp.sh b/pl/math/test/runulp.sh index a1410b4..3e31c00 100755 --- a/pl/math/test/runulp.sh +++ b/pl/math/test/runulp.sh @@ -21,14 +21,16 @@ FAIL=0 PASS=0 t() { - $emu ./ulp -e $L $flags "$@" && PASS=$((PASS+1)) || FAIL=$((FAIL+1)) + key=$(cat $ALIASES | { grep " $1$" || echo $1; } | awk '{print $1}') + L=$(cat $LIMITS | grep "^$key " | awk '{print $2}') + [[ $L =~ ^[0-9]+\.[0-9]+$ ]] + $emu ./ulp -e $L $flags ${5:-} $1 $2 $3 $4 && PASS=$((PASS+1)) || FAIL=$((FAIL+1)) } check() { $emu ./ulp -f -q "$@" #>/dev/null } -L=0.6 t erff 0 0xffff0000 10000 t erff 0x1p-127 0x1p-26 40000 t erff -0x1p-127 -0x1p-26 40000 @@ -36,19 +38,16 @@ t erff 0x1p-26 0x1p3 40000 t erff -0x1p-26 -0x1p3 40000 t erff 0 inf 40000 -L=0.30 t log10f 0 0xffff0000 10000 t log10f 0x1p-127 0x1p-26 50000 t log10f 0x1p-26 0x1p3 50000 t log10f 0x1p-4 0x1p4 50000 t log10f 0 inf 50000 -L=1.11 t log10 0 0xffff000000000000 10000 t log10 0x1p-4 0x1p4 40000 t log10 0 inf 40000 -L=3.56 t erfc 0 0xffff0000 10000 t erfc 0x1p-1022 0x1p-26 40000 t erfc -0x1p-1022 -0x1p-26 40000 @@ -56,7 +55,6 @@ t erfc 0x1p-26 0x1p5 40000 t erfc -0x1p-26 -0x1p3 40000 t erfc 0 inf 40000 -L=1.5 t erfcf 0 0xffff0000 10000 t erfcf 0x1p-127 0x1p-26 40000 t erfcf -0x1p-127 -0x1p-26 40000 @@ -64,31 +62,27 @@ t erfcf 0x1p-26 0x1p5 40000 t erfcf -0x1p-26 -0x1p3 40000 t erfcf 0 inf 40000 -L=1.78 t atan2 -10.0 10.0 50000 t atan2 -1.0 1.0 40000 t atan2 0.0 1.0 40000 t atan2 1.0 100.0 40000 t atan2 1e6 1e32 40000 -t atan2 0x1p-1022 0x1p-1000 x 0 0x1p-1022 40000 +check atan2 0x1p-1022 0x1p-1000 x 0 0x1p-1022 40000 # Regression-test for correct NaN handling check atan2 0x1.7887a0a717aefp+1017 0x1.7887a0a717aefp+1017 x -nan -nan check atan2 nan nan x -nan -nan -L=2.4 t atan2f -10.0 10.0 50000 t atan2f -1.0 1.0 40000 t atan2f 0.0 1.0 40000 t atan2f 1.0 100.0 40000 t atan2f 1e6 1e32 40000 -L=2.9 t asinhf 0 0x1p-12 5000 t asinhf 0x1p-12 1.0 50000 t asinhf 1.0 0x1p11 50000 t asinhf 0x1p11 0x1p127 20000 -L=1.54 t asinh -0x1p-26 0x1p-26 50000 t asinh 0x1p-26 1.0 40000 t asinh -0x1p-26 -1.0 10000 @@ -97,7 +91,6 @@ t asinh -1.0 -100.0 10000 t asinh 100.0 inf 50000 t asinh -100.0 -inf 10000 -L=1.26 t log1p -10.0 10.0 10000 t log1p 0.0 0x1p-23 50000 t log1p 0x1p-23 0.001 50000 @@ -107,7 +100,6 @@ t log1p -0x1p-23 -0.001 50000 t log1p -0.001 -1.0 50000 t log1p -1.0 inf 5000 -L=1.52 t log1pf -10.0 10.0 10000 t log1pf 0.0 0x1p-23 50000 t log1pf 0x1p-23 0.001 50000 @@ -117,7 +109,6 @@ t log1pf -0x1p-23 -0.001 50000 t log1pf -0.001 -1.0 50000 t log1pf -1.0 inf 5000 -L=2.80 t tanf 0 0xffff0000 10000 t tanf 0x1p-127 0x1p-14 50000 t tanf -0x1p-127 -0x1p-14 50000 @@ -132,27 +123,23 @@ t tanf -0x1p17 -0x1p54 50000 t tanf 0x1p54 inf 50000 t tanf -0x1p54 -inf 50000 -L=2.30 t acoshf 0 1 100 t acoshf 1 2 10000 t acoshf 2 0x1p64 100000 t acoshf 0x1p64 inf 100000 t acoshf -0 -inf 10000 -L=2.19 t acosh 0 1 10000 t acosh 1 2 100000 t acosh 2 0x1p511 100000 t acosh 0x1p511 inf 100000 t acosh -0 -inf 10000 -L=1.02 t expm1f 0 0x1p-23 1000 t expm1f -0 -0x1p-23 1000 t expm1f 0x1p-23 0x1.644716p6 100000 t expm1f -0x1p-23 -0x1.9bbabcp+6 100000 -L=1.76 t sinhf 0 0x1.62e43p+6 100000 t sinhf -0 -0x1.62e43p+6 100000 t sinhf 0x1.62e43p+6 0x1.65a9fap+6 100 @@ -160,7 +147,6 @@ t sinhf -0x1.62e43p+6 -0x1.65a9fap+6 100 t sinhf 0x1.65a9fap+6 inf 100 t sinhf -0x1.65a9fap+6 -inf 100 -L=1.89 t coshf 0 0x1p-63 100 t coshf 0 0x1.5a92d8p+6 80000 t coshf 0x1.5a92d8p+6 inf 2000 @@ -168,7 +154,6 @@ t coshf -0 -0x1p-63 100 t coshf -0 -0x1.5a92d8p+6 80000 t coshf -0x1.5a92d8p+6 -inf 2000 -L=1.68 t expm1 0 0x1p-51 1000 t expm1 -0 -0x1p-51 1000 t expm1 0x1p-51 0x1.63108c75a1937p+9 100000 @@ -176,7 +161,6 @@ t expm1 -0x1p-51 -0x1.740bf7c0d927dp+9 100000 t expm1 0x1.63108c75a1937p+9 inf 100 t expm1 -0x1.740bf7c0d927dp+9 -inf 100 -L=2.08 t sinh 0 0x1p-51 100 t sinh -0 -0x1p-51 100 t sinh 0x1p-51 0x1.62e42fefa39fp+9 100000 @@ -184,7 +168,6 @@ t sinh -0x1p-51 -0x1.62e42fefa39fp+9 100000 t sinh 0x1.62e42fefa39fp+9 inf 1000 t sinh -0x1.62e42fefa39fp+9 -inf 1000 -L=1.43 t cosh 0 0x1.61da04cbafe44p+9 100000 t cosh -0 -0x1.61da04cbafe44p+9 100000 t cosh 0x1.61da04cbafe44p+9 0x1p10 1000 @@ -192,7 +175,6 @@ t cosh -0x1.61da04cbafe44p+9 -0x1p10 1000 t cosh 0x1p10 inf 100 t cosh -0x1p10 -inf 100 -L=2.59 t atanhf 0 0x1p-12 500 t atanhf 0x1p-12 1 200000 t atanhf 1 inf 1000 @@ -200,11 +182,9 @@ t atanhf -0 -0x1p-12 500 t atanhf -0x1p-12 -1 200000 t atanhf -1 -inf 1000 -L=1.03 t cbrtf 0 inf 1000000 t cbrtf -0 -inf 1000000 -L=2.09 t tanhf 0 0x1p-23 1000 t tanhf -0 -0x1p-23 1000 t tanhf 0x1p-23 0x1.205966p+3 100000 @@ -604,59 +584,11 @@ range_sve_erfc=' 0 inf 40000 ' -# error limits -L_erfc=3.15 -L_erfcf=0.26 -L_log10=1.97 -L_log10f=2.81 -L_erf=1.26 -L_erff=0.76 -# TODO tighten this once __v_atan2 is fixed -L_atan2=2.9 -L_atan=1.78 -L_atan2f=2.46 -L_atanf=2.5 -L_log1pf=1.53 -L_asinhf=2.17 -L_log2f=2.10 -L_log2=2.10 -L_tanf=2.7 -L_log1p=1.97 -L_expm1f=1.02 -L_sinhf=1.76 -L_coshf=1.89 -L_expm1=1.68 -L_sinh=2.08 -L_cosh=1.43 -L_atanhf=2.59 -L_cbrtf=1.03 -L_asinh=1.54 -L_tanhf=2.09 - -L_sve_cosf=1.57 -L_sve_cos=1.61 -L_sve_sinf=1.40 -L_sve_sin=2.03 -L_sve_atanf=2.9 -L_sve_atan=1.78 -L_sve_atan2f=2.45 -L_sve_atan2=1.78 -L_sve_log10=1.97 -L_sve_log10f=2.82 -L_sve_logf=2.85 -L_sve_log=1.68 -L_sve_expf=1.46 -L_sve_erff=0.76 -L_sve_erf=1.97 -L_sve_tanf=2.7 -L_sve_erfc=3.15 - while read G F R D A do [ "$R" = 1 ] && { [[ $G != sve_* ]] || [ $WANT_SVE_MATH -eq 1 ]; } || continue case "$G" in \#*) continue ;; esac eval range="\${range_$G}" - eval L="\${L_$G}" while read X do [ -n "$X" ] || continue @@ -683,7 +615,7 @@ do fi fi case "$X" in \#*) continue ;; esac - t $A $f $F $X + t $F $X "$A $f" done << EOF $range EOF diff --git a/pl/math/v_asinh_2u5.c b/pl/math/v_asinh_2u5.c index 02e8098..d7f9a50 100644 --- a/pl/math/v_asinh_2u5.c +++ b/pl/math/v_asinh_2u5.c @@ -7,6 +7,7 @@ #include "v_math.h" #include "estrin.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -154,4 +155,5 @@ VPCS_ATTR v_f64_t V_NAME (asinh) (v_f64_t x) VPCS_ALIAS PL_SIG (V, D, 1, asinh, -10.0, 10.0) +PL_TEST_ULP (V_NAME (asinh), 1.54) #endif diff --git a/pl/math/v_asinhf_2u7.c b/pl/math/v_asinhf_2u7.c index 18a2395..812e28f 100644 --- a/pl/math/v_asinhf_2u7.c +++ b/pl/math/v_asinhf_2u7.c @@ -7,6 +7,7 @@ #include "v_math.h" #include "include/mathlib.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -55,4 +56,5 @@ VPCS_ATTR v_f32_t V_NAME (asinhf) (v_f32_t x) VPCS_ALIAS PL_SIG (V, F, 1, asinh, -10.0, 10.0) +PL_TEST_ULP (V_NAME (asinhf), 2.17) #endif diff --git a/pl/math/v_atan2_3u.c b/pl/math/v_atan2_3u.c index 2b31bec..27af80d 100644 --- a/pl/math/v_atan2_3u.c +++ b/pl/math/v_atan2_3u.c @@ -7,6 +7,7 @@ #include "v_math.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -79,4 +80,6 @@ VPCS_ALIAS /* Arity of 2 means no mathbench entry emitted. See test/mathbench_funcs.h. */ PL_SIG (V, D, 2, atan2) +// TODO tighten this once __v_atan2 is fixed +PL_TEST_ULP (V_NAME (atan2), 2.9) #endif diff --git a/pl/math/v_atan2f_3u.c b/pl/math/v_atan2f_3u.c index 8c2c8f2..3d8f9fc 100644 --- a/pl/math/v_atan2f_3u.c +++ b/pl/math/v_atan2f_3u.c @@ -7,6 +7,7 @@ #include "v_math.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -79,4 +80,5 @@ VPCS_ALIAS /* Arity of 2 means no mathbench entry emitted. See test/mathbench_funcs.h. */ PL_SIG (V, F, 2, atan2) +PL_TEST_ULP (V_NAME (atan2f), 2.46) #endif diff --git a/pl/math/v_atan_2u5.c b/pl/math/v_atan_2u5.c index 3e504e7..de39fa7 100644 --- a/pl/math/v_atan_2u5.c +++ b/pl/math/v_atan_2u5.c @@ -7,6 +7,7 @@ #include "v_math.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -51,4 +52,5 @@ v_f64_t V_NAME (atan) (v_f64_t x) VPCS_ALIAS PL_SIG (V, D, 1, atan, -10.0, 10.0) +PL_TEST_ULP (V_NAME (atan), 1.78) #endif diff --git a/pl/math/v_atanf_3u.c b/pl/math/v_atanf_3u.c index 9a0230a..8014d65 100644 --- a/pl/math/v_atanf_3u.c +++ b/pl/math/v_atanf_3u.c @@ -7,6 +7,7 @@ #include "v_math.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -50,4 +51,5 @@ v_f32_t V_NAME (atanf) (v_f32_t x) VPCS_ALIAS PL_SIG (V, F, 1, atan, -10.0, 10.0) +PL_TEST_ULP (V_NAME (atanf), 2.5) #endif diff --git a/pl/math/v_atanhf_3u1.c b/pl/math/v_atanhf_3u1.c index 5c9ceb1..c950c46 100644 --- a/pl/math/v_atanhf_3u1.c +++ b/pl/math/v_atanhf_3u1.c @@ -7,6 +7,7 @@ #include "v_math.h" #include "mathlib.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -46,8 +47,8 @@ VPCS_ATTR v_f32_t V_NAME (atanhf) (v_f32_t x) return v_call_f32 (atanhf, x, y, special); return y; } - VPCS_ALIAS PL_SIG (V, F, 1, atanh, -1.0, 1.0) +PL_TEST_ULP (V_NAME (atanhf), 2.59) #endif diff --git a/pl/math/v_cbrtf_1u5.c b/pl/math/v_cbrtf_1u5.c index 9db2579..b5f4c72 100644 --- a/pl/math/v_cbrtf_1u5.c +++ b/pl/math/v_cbrtf_1u5.c @@ -7,6 +7,7 @@ #include "v_math.h" #include "mathlib.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -87,4 +88,5 @@ VPCS_ATTR v_f32_t V_NAME (cbrtf) (v_f32_t x) VPCS_ALIAS PL_SIG (V, F, 1, cbrt, -10.0, 10.0) +PL_TEST_ULP (V_NAME (cbrtf), 1.03) #endif diff --git a/pl/math/v_cosh_2u.c b/pl/math/v_cosh_2u.c index fa4f1e6..1cac350 100644 --- a/pl/math/v_cosh_2u.c +++ b/pl/math/v_cosh_2u.c @@ -6,8 +6,9 @@ #include "v_math.h" #include "pl_sig.h" - +#include "pl_test.h" #include "v_exp_tail.h" + #define C1 v_f64 (C1_scal) #define C2 v_f64 (C2_scal) #define C3 v_f64 (C3_scal) @@ -85,4 +86,5 @@ VPCS_ATTR v_f64_t V_NAME (cosh) (v_f64_t x) VPCS_ALIAS PL_SIG (V, D, 1, cosh, -10.0, 10.0) +PL_TEST_ULP (V_NAME (cosh), 1.43) #endif diff --git a/pl/math/v_coshf_2u4.c b/pl/math/v_coshf_2u4.c index 95288d9..b0a2be1 100644 --- a/pl/math/v_coshf_2u4.c +++ b/pl/math/v_coshf_2u4.c @@ -7,6 +7,7 @@ #include "v_math.h" #include "mathlib.h" #include "pl_sig.h" +#include "pl_test.h" #define AbsMask 0x7fffffff #define TinyBound 0x20000000 /* 0x1p-63: Round to 1 below this. */ @@ -61,4 +62,5 @@ VPCS_ATTR v_f32_t V_NAME (coshf) (v_f32_t x) VPCS_ALIAS PL_SIG (V, F, 1, cosh, -10.0, 10.0) +PL_TEST_ULP (V_NAME (coshf), 1.89) #endif diff --git a/pl/math/v_erf_2u.c b/pl/math/v_erf_2u.c index 192b6ed..e33d405 100644 --- a/pl/math/v_erf_2u.c +++ b/pl/math/v_erf_2u.c @@ -9,6 +9,7 @@ #include "include/mathlib.h" #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -105,4 +106,5 @@ v_f64_t V_NAME (erf) (v_f64_t x) VPCS_ALIAS PL_SIG (V, D, 1, erf, -6.0, 6.0) +PL_TEST_ULP (V_NAME (erf), 1.26) #endif diff --git a/pl/math/v_erfc_4u.c b/pl/math/v_erfc_4u.c index 88f5172..9b08ead 100644 --- a/pl/math/v_erfc_4u.c +++ b/pl/math/v_erfc_4u.c @@ -9,6 +9,7 @@ #include "horner.h" #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -157,4 +158,5 @@ v_f64_t V_NAME (erfc) (v_f64_t x) VPCS_ALIAS PL_SIG (V, D, 1, erfc, -6.0, 28.0) +PL_TEST_ULP (V_NAME (erfc), 3.15) #endif diff --git a/pl/math/v_erfcf_1u.c b/pl/math/v_erfcf_1u.c index cf2b174..e39801e 100644 --- a/pl/math/v_erfcf_1u.c +++ b/pl/math/v_erfcf_1u.c @@ -9,6 +9,7 @@ #include "erfcf.h" #include "estrin.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -172,4 +173,5 @@ v_f32_t V_NAME (erfcf) (v_f32_t x) VPCS_ALIAS PL_SIG (V, F, 1, erfc, -6.0, 28.0) +PL_TEST_ULP (V_NAME (erfcf), 0.26) #endif diff --git a/pl/math/v_erff_1u5.c b/pl/math/v_erff_1u5.c index 3e8d400..52f063c 100644 --- a/pl/math/v_erff_1u5.c +++ b/pl/math/v_erff_1u5.c @@ -9,6 +9,7 @@ #include "include/mathlib.h" #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -105,4 +106,5 @@ v_f32_t V_NAME (erff) (v_f32_t x) VPCS_ALIAS PL_SIG (V, F, 1, erf, -4.0, 4.0) +PL_TEST_ULP (V_NAME (erff), 0.76) #endif diff --git a/pl/math/v_expm1_2u5.c b/pl/math/v_expm1_2u5.c index 78576a9..e0a31a5 100644 --- a/pl/math/v_expm1_2u5.c +++ b/pl/math/v_expm1_2u5.c @@ -7,6 +7,7 @@ #include "v_math.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -101,4 +102,5 @@ v_f64_t V_NAME (expm1) (v_f64_t x) VPCS_ALIAS PL_SIG (V, D, 1, expm1, -9.9, 9.9) +PL_TEST_ULP (V_NAME (expm1), 1.68) #endif diff --git a/pl/math/v_expm1f_1u6.c b/pl/math/v_expm1f_1u6.c index 6d1ae0e..dd211f9 100644 --- a/pl/math/v_expm1f_1u6.c +++ b/pl/math/v_expm1f_1u6.c @@ -7,6 +7,7 @@ #include "v_math.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -84,4 +85,5 @@ v_f32_t V_NAME (expm1f) (v_f32_t x) VPCS_ALIAS PL_SIG (V, F, 1, expm1, -9.9, 9.9) +PL_TEST_ULP (V_NAME (expm1f), 1.02) #endif diff --git a/pl/math/v_log10_2u5.c b/pl/math/v_log10_2u5.c index c481b00..014accc 100644 --- a/pl/math/v_log10_2u5.c +++ b/pl/math/v_log10_2u5.c @@ -8,6 +8,7 @@ #include "v_math.h" #include "include/mathlib.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -101,4 +102,5 @@ v_f64_t V_NAME (log10) (v_f64_t x) VPCS_ALIAS PL_SIG (V, D, 1, log10, 0.01, 11.1) +PL_TEST_ULP (V_NAME (log10), 1.97) #endif diff --git a/pl/math/v_log10f_3u5.c b/pl/math/v_log10f_3u5.c index 8bf8bb3..f25da91 100644 --- a/pl/math/v_log10f_3u5.c +++ b/pl/math/v_log10f_3u5.c @@ -8,6 +8,7 @@ #include "v_math.h" #include "mathlib.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -74,4 +75,5 @@ v_f32_t V_NAME (log10f) (v_f32_t x) VPCS_ALIAS PL_SIG (V, F, 1, log10, 0.01, 11.1) +PL_TEST_ULP (V_NAME (log10f), 2.81) #endif diff --git a/pl/math/v_log1p_2u5.c b/pl/math/v_log1p_2u5.c index e0d58ec..889fac0 100644 --- a/pl/math/v_log1p_2u5.c +++ b/pl/math/v_log1p_2u5.c @@ -5,12 +5,12 @@ */ #include "v_math.h" +#include "estrin.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED -#include "estrin.h" - #define Ln2Hi v_f64 (0x1.62e42fefa3800p-1) #define Ln2Lo v_f64 (0x1.ef35793c76730p-45) #define HfRt2Top 0x3fe6a09e00000000 /* top32(asuint64(sqrt(2)/2)) << 32. */ @@ -103,8 +103,8 @@ VPCS_ATTR v_f64_t V_NAME (log1p) (v_f64_t x) return y; } - VPCS_ALIAS PL_SIG (V, D, 1, log1p, -0.9, 10.0) +PL_TEST_ULP (V_NAME (log1p), 1.97) #endif diff --git a/pl/math/v_log1pf_2u1.c b/pl/math/v_log1pf_2u1.c index 361fa4f..93c896b 100644 --- a/pl/math/v_log1pf_2u1.c +++ b/pl/math/v_log1pf_2u1.c @@ -6,6 +6,7 @@ #include "v_math.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -145,4 +146,5 @@ VPCS_ATTR v_f32_t V_NAME (log1pf) (v_f32_t x) VPCS_ALIAS PL_SIG (V, F, 1, log1p, -0.9, 10.0) +PL_TEST_ULP (V_NAME (log1pf), 1.53) #endif diff --git a/pl/math/v_log2_3u.c b/pl/math/v_log2_3u.c index 07afced..3bdfd2e 100644 --- a/pl/math/v_log2_3u.c +++ b/pl/math/v_log2_3u.c @@ -8,6 +8,7 @@ #include "v_math.h" #include "include/mathlib.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -88,4 +89,5 @@ v_f64_t V_NAME (log2) (v_f64_t x) VPCS_ALIAS PL_SIG (V, D, 1, log2, 0.01, 11.1) +PL_TEST_ULP (V_NAME (log2), 2.10) #endif diff --git a/pl/math/v_log2f_2u6.c b/pl/math/v_log2f_2u6.c index 335b324..8d7d138 100644 --- a/pl/math/v_log2f_2u6.c +++ b/pl/math/v_log2f_2u6.c @@ -8,6 +8,7 @@ #include "v_math.h" #include "math_config.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -120,4 +121,5 @@ VPCS_ATTR v_f32_t V_NAME (log2f) (v_f32_t x) VPCS_ALIAS PL_SIG (V, F, 1, log2, 0.01, 11.1) +PL_TEST_ULP (V_NAME (log2f), 2.10) #endif diff --git a/pl/math/v_sinh_3u.c b/pl/math/v_sinh_3u.c index cec8208..7d6b612 100644 --- a/pl/math/v_sinh_3u.c +++ b/pl/math/v_sinh_3u.c @@ -7,6 +7,7 @@ #include "v_math.h" #include "mathlib.h" #include "pl_sig.h" +#include "pl_test.h" #define AbsMask 0x7fffffffffffffff #define Half 0x3fe0000000000000 @@ -44,4 +45,5 @@ VPCS_ATTR v_f64_t V_NAME (sinh) (v_f64_t x) VPCS_ALIAS PL_SIG (V, D, 1, sinh, -10.0, 10.0) +PL_TEST_ULP (V_NAME (sinh), 2.08) #endif diff --git a/pl/math/v_sinhf_2u3.c b/pl/math/v_sinhf_2u3.c index 299f081..76bfe78 100644 --- a/pl/math/v_sinhf_2u3.c +++ b/pl/math/v_sinhf_2u3.c @@ -7,6 +7,7 @@ #include "v_math.h" #include "mathlib.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -43,4 +44,5 @@ VPCS_ATTR v_f32_t V_NAME (sinhf) (v_f32_t x) VPCS_ALIAS PL_SIG (V, F, 1, sinh, -10.0, 10.0) +PL_TEST_ULP (V_NAME (sinhf), 1.76) #endif diff --git a/pl/math/v_tanf_3u2.c b/pl/math/v_tanf_3u2.c index 9a11ba4..73b0807 100644 --- a/pl/math/v_tanf_3u2.c +++ b/pl/math/v_tanf_3u2.c @@ -8,6 +8,7 @@ #include "v_math.h" #include "estrinf.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -117,4 +118,5 @@ v_f32_t V_NAME (tanf) (v_f32_t x) VPCS_ALIAS PL_SIG (V, F, 1, tan, -3.1, 3.1) +PL_TEST_ULP (V_NAME (tanf), 2.7) #endif diff --git a/pl/math/v_tanhf_2u6.c b/pl/math/v_tanhf_2u6.c index 1196c4a..bb86794 100644 --- a/pl/math/v_tanhf_2u6.c +++ b/pl/math/v_tanhf_2u6.c @@ -8,6 +8,7 @@ #include "estrinf.h" #include "mathlib.h" #include "pl_sig.h" +#include "pl_test.h" #if V_SUPPORTED @@ -90,4 +91,5 @@ VPCS_ATTR v_f32_t V_NAME (tanhf) (v_f32_t x) VPCS_ALIAS PL_SIG (V, F, 1, tanh, -10.0, 10.0) +PL_TEST_ULP (V_NAME (tanhf), 2.09) #endif diff --git a/pl/math/vn_asinh_2u5.c b/pl/math/vn_asinh_2u5.c index ecc61ed..e349530 100644 --- a/pl/math/vn_asinh_2u5.c +++ b/pl/math/vn_asinh_2u5.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_asinh, _ZGVnN2v_asinh) +#define VPCS_ALIAS PL_ALIAS (__vn_asinh, _ZGVnN2v_asinh) #include "v_asinh_2u5.c" #endif diff --git a/pl/math/vn_asinhf_2u7.c b/pl/math/vn_asinhf_2u7.c index c42e37e..8efe099 100644 --- a/pl/math/vn_asinhf_2u7.c +++ b/pl/math/vn_asinhf_2u7.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_asinhf, _ZGVnN4v_asinhf) +#define VPCS_ALIAS PL_ALIAS (__vn_asinhf, _ZGVnN4v_asinhf) #include "v_asinhf_2u7.c" #endif diff --git a/pl/math/vn_atan2_3u.c b/pl/math/vn_atan2_3u.c index b7c46e9..7575bff 100644 --- a/pl/math/vn_atan2_3u.c +++ b/pl/math/vn_atan2_3u.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_atan2, _ZGVnN2vv_atan2) +#define VPCS_ALIAS PL_ALIAS (__vn_atan2, _ZGVnN2vv_atan2) #include "v_atan2_3u.c" #endif diff --git a/pl/math/vn_atan2f_3u.c b/pl/math/vn_atan2f_3u.c index 23aad38..b378806 100644 --- a/pl/math/vn_atan2f_3u.c +++ b/pl/math/vn_atan2f_3u.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_atan2f, _ZGVnN4vv_atan2f) +#define VPCS_ALIAS PL_ALIAS (__vn_atan2f, _ZGVnN4vv_atan2f) #include "v_atan2f_3u.c" #endif diff --git a/pl/math/vn_atan_2u5.c b/pl/math/vn_atan_2u5.c index 22baab9..539e61b 100644 --- a/pl/math/vn_atan_2u5.c +++ b/pl/math/vn_atan_2u5.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_atan, _ZGVnN2v_atan) +#define VPCS_ALIAS PL_ALIAS (__vn_atan, _ZGVnN2v_atan) #include "v_atan_2u5.c" #endif diff --git a/pl/math/vn_atanf_3u.c b/pl/math/vn_atanf_3u.c index 17ba6b8..aaeef5b 100644 --- a/pl/math/vn_atanf_3u.c +++ b/pl/math/vn_atanf_3u.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_atanf, _ZGVnN4v_atanf) +#define VPCS_ALIAS PL_ALIAS (__vn_atanf, _ZGVnN4v_atanf) #include "v_atanf_3u.c" #endif diff --git a/pl/math/vn_atanhf_3u1.c b/pl/math/vn_atanhf_3u1.c index d4ad391..32e2c45 100644 --- a/pl/math/vn_atanhf_3u1.c +++ b/pl/math/vn_atanhf_3u1.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_atanhf, _ZGVnN4v_atanhf) +#define VPCS_ALIAS PL_ALIAS (__vn_atanhf, _ZGVnN4v_atanhf) #include "v_atanhf_3u1.c" #endif diff --git a/pl/math/vn_cbrtf_1u5.c b/pl/math/vn_cbrtf_1u5.c index 3452807..53774cf 100644 --- a/pl/math/vn_cbrtf_1u5.c +++ b/pl/math/vn_cbrtf_1u5.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_cbrtf, _ZGVnN4v_cbrtf) +#define VPCS_ALIAS PL_ALIAS (__vn_cbrtf, _ZGVnN4v_cbrtf) #include "v_cbrtf_1u5.c" #endif diff --git a/pl/math/vn_cosh_2u.c b/pl/math/vn_cosh_2u.c index 5f02efd..5950e2d 100644 --- a/pl/math/vn_cosh_2u.c +++ b/pl/math/vn_cosh_2u.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_cosh, _ZGVnN2v_cosh) +#define VPCS_ALIAS PL_ALIAS (__vn_cosh, _ZGVnN2v_cosh) #include "v_cosh_2u.c" #endif diff --git a/pl/math/vn_coshf_2u4.c b/pl/math/vn_coshf_2u4.c index 6bc4635..e2fdc13 100644 --- a/pl/math/vn_coshf_2u4.c +++ b/pl/math/vn_coshf_2u4.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_coshf, _ZGVnN4v_coshf) +#define VPCS_ALIAS PL_ALIAS (__vn_coshf, _ZGVnN4v_coshf) #include "v_coshf_2u4.c" #endif diff --git a/pl/math/vn_erf_2u.c b/pl/math/vn_erf_2u.c index 2841eca..0ffad52 100644 --- a/pl/math/vn_erf_2u.c +++ b/pl/math/vn_erf_2u.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_erf, _ZGVnN2v_erf) +#define VPCS_ALIAS PL_ALIAS (__vn_erf, _ZGVnN2v_erf) #include "v_erf_2u.c" #endif diff --git a/pl/math/vn_erfc_4u.c b/pl/math/vn_erfc_4u.c index 678e316..940188a 100644 --- a/pl/math/vn_erfc_4u.c +++ b/pl/math/vn_erfc_4u.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_erfc, _ZGVnN2v_erfc) +#define VPCS_ALIAS PL_ALIAS (__vn_erfc, _ZGVnN2v_erfc) #include "v_erfc_4u.c" #endif diff --git a/pl/math/vn_erfcf_1u.c b/pl/math/vn_erfcf_1u.c index 2248f79..58829b5 100644 --- a/pl/math/vn_erfcf_1u.c +++ b/pl/math/vn_erfcf_1u.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_erfcf, _ZGVnN4v_erfcf) +#define VPCS_ALIAS PL_ALIAS (__vn_erfcf, _ZGVnN4v_erfcf) #include "v_erfcf_1u.c" #endif diff --git a/pl/math/vn_erff_1u5.c b/pl/math/vn_erff_1u5.c index 5b48442..f39560e 100644 --- a/pl/math/vn_erff_1u5.c +++ b/pl/math/vn_erff_1u5.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_erff, _ZGVnN4v_erff) +#define VPCS_ALIAS PL_ALIAS (__vn_erff, _ZGVnN4v_erff) #include "v_erff_1u5.c" #endif diff --git a/pl/math/vn_expm1_2u5.c b/pl/math/vn_expm1_2u5.c index fc88b06..d946808 100644 --- a/pl/math/vn_expm1_2u5.c +++ b/pl/math/vn_expm1_2u5.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_expm1, _ZGVnN2v_expm1) +#define VPCS_ALIAS PL_ALIAS (__vn_expm1, _ZGVnN2v_expm1) #include "v_expm1_2u5.c" #endif diff --git a/pl/math/vn_expm1f_1u6.c b/pl/math/vn_expm1f_1u6.c index 5cbb929..304e0a5 100644 --- a/pl/math/vn_expm1f_1u6.c +++ b/pl/math/vn_expm1f_1u6.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_expm1f, _ZGVnN4v_expm1f) +#define VPCS_ALIAS PL_ALIAS (__vn_expm1f, _ZGVnN4v_expm1f) #include "v_expm1f_1u6.c" #endif diff --git a/pl/math/vn_log10_2u5.c b/pl/math/vn_log10_2u5.c index b94499b..e52285c 100644 --- a/pl/math/vn_log10_2u5.c +++ b/pl/math/vn_log10_2u5.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_log10, _ZGVnN2v_log10) +#define VPCS_ALIAS PL_ALIAS (__vn_log10, _ZGVnN2v_log10) #include "v_log10_2u5.c" #endif diff --git a/pl/math/vn_log10f_3u5.c b/pl/math/vn_log10f_3u5.c index b419d0a..7d6fe25 100644 --- a/pl/math/vn_log10f_3u5.c +++ b/pl/math/vn_log10f_3u5.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_log10f, _ZGVnN4v_log10f) +#define VPCS_ALIAS PL_ALIAS (__vn_log10f, _ZGVnN4v_log10f) #include "v_log10f_3u5.c" #endif diff --git a/pl/math/vn_log1p_2u5.c b/pl/math/vn_log1p_2u5.c index 4fed0b3..7beab12 100644 --- a/pl/math/vn_log1p_2u5.c +++ b/pl/math/vn_log1p_2u5.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_log1p, _ZGVnN2v_log1p) +#define VPCS_ALIAS PL_ALIAS (__vn_log1p, _ZGVnN2v_log1p) #include "v_log1p_2u5.c" #endif diff --git a/pl/math/vn_log1pf_2u1.c b/pl/math/vn_log1pf_2u1.c index 429d167..f5ebcd8 100644 --- a/pl/math/vn_log1pf_2u1.c +++ b/pl/math/vn_log1pf_2u1.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_log1pf, _ZGVnN4v_log1pf) +#define VPCS_ALIAS PL_ALIAS (__vn_log1pf, _ZGVnN4v_log1pf) #include "v_log1pf_2u1.c" #endif diff --git a/pl/math/vn_log2_3u.c b/pl/math/vn_log2_3u.c index d74f9ca..3a67e03 100644 --- a/pl/math/vn_log2_3u.c +++ b/pl/math/vn_log2_3u.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_log2, _ZGVnN2v_log2) +#define VPCS_ALIAS PL_ALIAS (__vn_log2, _ZGVnN2v_log2) #include "v_log2_3u.c" #endif diff --git a/pl/math/vn_log2f_2u6.c b/pl/math/vn_log2f_2u6.c index dc5ab03..18effaf 100644 --- a/pl/math/vn_log2f_2u6.c +++ b/pl/math/vn_log2f_2u6.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_log2f, _ZGVnN4v_log2f) +#define VPCS_ALIAS PL_ALIAS (__vn_log2f, _ZGVnN4v_log2f) #include "v_log2f_2u6.c" #endif diff --git a/pl/math/vn_sinh_3u.c b/pl/math/vn_sinh_3u.c index 2b68578..fb42f20 100644 --- a/pl/math/vn_sinh_3u.c +++ b/pl/math/vn_sinh_3u.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_sinh, _ZGVnN2v_sinh) +#define VPCS_ALIAS PL_ALIAS (__vn_sinh, _ZGVnN2v_sinh) #include "v_sinh_3u.c" #endif diff --git a/pl/math/vn_sinhf_2u3.c b/pl/math/vn_sinhf_2u3.c index fcedb6d..230ee6e 100644 --- a/pl/math/vn_sinhf_2u3.c +++ b/pl/math/vn_sinhf_2u3.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_sinhf, _ZGVnN4v_sinhf) +#define VPCS_ALIAS PL_ALIAS (__vn_sinhf, _ZGVnN4v_sinhf) #include "v_sinhf_2u3.c" #endif diff --git a/pl/math/vn_tanf_3u2.c b/pl/math/vn_tanf_3u2.c index a086cc9..e37976d 100644 --- a/pl/math/vn_tanf_3u2.c +++ b/pl/math/vn_tanf_3u2.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_tanf, _ZGVnN4v_tanf) +#define VPCS_ALIAS PL_ALIAS (__vn_tanf, _ZGVnN4v_tanf) #include "v_tanf_3u2.c" #endif diff --git a/pl/math/vn_tanhf_2u6.c b/pl/math/vn_tanhf_2u6.c index 96fd67a..86e460c 100644 --- a/pl/math/vn_tanhf_2u6.c +++ b/pl/math/vn_tanhf_2u6.c @@ -7,6 +7,6 @@ #include "include/mathlib.h" #ifdef __vpcs #define VPCS 1 -#define VPCS_ALIAS strong_alias (__vn_tanhf, _ZGVnN4v_tanhf) +#define VPCS_ALIAS PL_ALIAS (__vn_tanhf, _ZGVnN4v_tanhf) #include "v_tanhf_2u6.c" #endif -- cgit v1.2.3