From c5d241f06b42c1211813118a6185a01a3dae1d00 Mon Sep 17 00:00:00 2001 From: Adhemerval Zanella Date: Mon, 28 Oct 2024 12:38:50 -0300 Subject: [PATCH] math: Use cbrtf from CORE-MATH The CORE-MATH implementation is correctly rounded (for any rounding mode) and shows better performance to the generic cbrtf. The code was adapted to glibc style and to use the definition of math_config.h. Benchtest on x64_64 (Ryzen 9 5900X, gcc 14.2.1), aarch64 (M1, gcc 13.2.1), and powerpc (POWER10, gcc 13.2.1): latency master patched improvement x86_64 68.6348 36.8908 46.25% x86_64v2 67.3418 36.6968 45.51% x86_64v3 63.4981 32.7859 48.37% aarch64 29.3172 12.1496 58.56% power10 18.0845 8.8893 50.85% powerpc 18.0859 8.79527 51.37% reciprocal-throughput master patched improvement x86_64 36.4369 13.3565 63.34% x86_64v2 37.3611 13.1149 64.90% x86_64v3 31.6024 11.2102 64.53% aarch64 18.6866 7.3474 60.68% power10 9.4758 3.6329 61.66% powerpc 9.58896 3.90439 59.28% Signed-off-by: Alexei Sibidanov Signed-off-by: Paul Zimmermann Signed-off-by: Adhemerval Zanella --- SHARED-FILES | 4 + sysdeps/aarch64/libm-test-ulps | 4 - sysdeps/alpha/fpu/libm-test-ulps | 4 - sysdeps/arc/fpu/libm-test-ulps | 4 - sysdeps/arc/nofpu/libm-test-ulps | 1 - sysdeps/arm/libm-test-ulps | 4 - sysdeps/csky/fpu/libm-test-ulps | 4 - sysdeps/csky/nofpu/libm-test-ulps | 4 - sysdeps/hppa/fpu/libm-test-ulps | 4 - sysdeps/ieee754/flt-32/s_cbrtf.c | 138 ++++++++++++++++--------- sysdeps/loongarch/lp64/libm-test-ulps | 4 - sysdeps/m68k/m680x0/fpu/libm-test-ulps | 4 - sysdeps/microblaze/libm-test-ulps | 1 - sysdeps/mips/mips32/libm-test-ulps | 4 - sysdeps/mips/mips64/libm-test-ulps | 4 - sysdeps/nios2/libm-test-ulps | 1 - sysdeps/or1k/fpu/libm-test-ulps | 4 - sysdeps/or1k/nofpu/libm-test-ulps | 4 - sysdeps/powerpc/fpu/libm-test-ulps | 4 - sysdeps/powerpc/nofpu/libm-test-ulps | 4 - sysdeps/riscv/nofpu/libm-test-ulps | 4 - sysdeps/riscv/rvd/libm-test-ulps | 4 - sysdeps/s390/fpu/libm-test-ulps | 4 - sysdeps/sh/libm-test-ulps | 2 - sysdeps/sparc/fpu/libm-test-ulps | 4 - sysdeps/x86_64/fpu/libm-test-ulps | 4 - 26 files changed, 92 insertions(+), 135 deletions(-) diff --git a/SHARED-FILES b/SHARED-FILES index 228f415dfd..d367f4b62f 100644 --- a/SHARED-FILES +++ b/SHARED-FILES @@ -268,3 +268,7 @@ sysdeps/ieee754/flt-32/s_log10p1f.c (file src/binary32/log10p1/log10p1f.c in CORE-MATH) - The code was adapted to use glibc code style and internal functions to handle errno, overflow, and underflow. +sysdeps/ieee754/flt-32/s_cbrtf.c + (file src/binary32/cbrt/cbrtf.c in CORE-MATH) + - The code was adapted to use glibc code style and internal + functions to handle errno, overflow, and underflow. diff --git a/sysdeps/aarch64/libm-test-ulps b/sysdeps/aarch64/libm-test-ulps index c523d45802..4979769b58 100644 --- a/sysdeps/aarch64/libm-test-ulps +++ b/sysdeps/aarch64/libm-test-ulps @@ -474,7 +474,6 @@ ldouble: 2 Function: "cbrt": double: 4 -float: 1 ldouble: 1 Function: "cbrt_advsimd": @@ -483,7 +482,6 @@ float: 1 Function: "cbrt_downward": double: 4 -float: 1 ldouble: 1 Function: "cbrt_sve": @@ -492,12 +490,10 @@ float: 1 Function: "cbrt_towardzero": double: 3 -float: 1 ldouble: 1 Function: "cbrt_upward": double: 5 -float: 1 ldouble: 1 Function: Real part of "ccos": diff --git a/sysdeps/alpha/fpu/libm-test-ulps b/sysdeps/alpha/fpu/libm-test-ulps index 212c52c8cc..a2b5404f9d 100644 --- a/sysdeps/alpha/fpu/libm-test-ulps +++ b/sysdeps/alpha/fpu/libm-test-ulps @@ -417,22 +417,18 @@ ldouble: 2 Function: "cbrt": double: 4 -float: 1 ldouble: 1 Function: "cbrt_downward": double: 4 -float: 1 ldouble: 1 Function: "cbrt_towardzero": double: 3 -float: 1 ldouble: 1 Function: "cbrt_upward": double: 5 -float: 1 ldouble: 1 Function: Real part of "ccos": diff --git a/sysdeps/arc/fpu/libm-test-ulps b/sysdeps/arc/fpu/libm-test-ulps index 7812a11b5b..c6f3646797 100644 --- a/sysdeps/arc/fpu/libm-test-ulps +++ b/sysdeps/arc/fpu/libm-test-ulps @@ -337,19 +337,15 @@ float: 2 Function: "cbrt": double: 4 -float: 1 Function: "cbrt_downward": double: 4 -float: 1 Function: "cbrt_towardzero": double: 3 -float: 1 Function: "cbrt_upward": double: 5 -float: 1 Function: Real part of "ccos": double: 3 diff --git a/sysdeps/arc/nofpu/libm-test-ulps b/sysdeps/arc/nofpu/libm-test-ulps index d0cfa46c3d..6319012db5 100644 --- a/sysdeps/arc/nofpu/libm-test-ulps +++ b/sysdeps/arc/nofpu/libm-test-ulps @@ -84,7 +84,6 @@ float: 1 Function: "cbrt": double: 4 -float: 1 Function: Real part of "ccos": double: 1 diff --git a/sysdeps/arm/libm-test-ulps b/sysdeps/arm/libm-test-ulps index 6cdd3d53d6..d9317046a9 100644 --- a/sysdeps/arm/libm-test-ulps +++ b/sysdeps/arm/libm-test-ulps @@ -333,19 +333,15 @@ float: 1 Function: "cbrt": double: 4 -float: 1 Function: "cbrt_downward": double: 4 -float: 1 Function: "cbrt_towardzero": double: 3 -float: 1 Function: "cbrt_upward": double: 5 -float: 1 Function: Real part of "ccos": double: 1 diff --git a/sysdeps/csky/fpu/libm-test-ulps b/sysdeps/csky/fpu/libm-test-ulps index a7b2bec17e..c3a3db9bcb 100644 --- a/sysdeps/csky/fpu/libm-test-ulps +++ b/sysdeps/csky/fpu/libm-test-ulps @@ -330,19 +330,15 @@ float: 1 Function: "cbrt": double: 4 -float: 1 Function: "cbrt_downward": double: 4 -float: 1 Function: "cbrt_towardzero": double: 3 -float: 1 Function: "cbrt_upward": double: 5 -float: 1 Function: Real part of "ccos": double: 1 diff --git a/sysdeps/csky/nofpu/libm-test-ulps b/sysdeps/csky/nofpu/libm-test-ulps index 4e4451a5d2..68a74bf1d0 100644 --- a/sysdeps/csky/nofpu/libm-test-ulps +++ b/sysdeps/csky/nofpu/libm-test-ulps @@ -328,19 +328,15 @@ float: 1 Function: "cbrt": double: 4 -float: 1 Function: "cbrt_downward": double: 4 -float: 1 Function: "cbrt_towardzero": double: 3 -float: 1 Function: "cbrt_upward": double: 5 -float: 1 Function: Real part of "ccos": double: 1 diff --git a/sysdeps/hppa/fpu/libm-test-ulps b/sysdeps/hppa/fpu/libm-test-ulps index 0af5b61362..a3e66291a0 100644 --- a/sysdeps/hppa/fpu/libm-test-ulps +++ b/sysdeps/hppa/fpu/libm-test-ulps @@ -338,20 +338,16 @@ float: 1 Function: "cbrt": double: 4 -float: 1 ldouble: 1 Function: "cbrt_downward": double: 4 -float: 1 Function: "cbrt_towardzero": double: 3 -float: 1 Function: "cbrt_upward": double: 5 -float: 1 Function: Real part of "ccos": double: 1 diff --git a/sysdeps/ieee754/flt-32/s_cbrtf.c b/sysdeps/ieee754/flt-32/s_cbrtf.c index 68b8b0ec37..5a7a9a952d 100644 --- a/sysdeps/ieee754/flt-32/s_cbrtf.c +++ b/sysdeps/ieee754/flt-32/s_cbrtf.c @@ -1,61 +1,99 @@ -/* Compute cubic root of float value. - Copyright (C) 1997-2024 Free Software Foundation, Inc. - This file is part of the GNU C Library. +/* Correctly-rounded cubic root of binary32 value. - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. +Copyright (c) 2023, 2024 Alexei Sibidanov. - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. +The original version of this file was copied from the CORE-MATH +project (file src/binary32/cbrt/cbrtf.c, revision bc385c2). - You should have received a copy of the GNU Lesser General Public - License along with the GNU C Library; if not, see - . */ +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: -#include +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. +*/ + +#include #include - - -#define CBRT2 1.2599210498948731648 /* 2^(1/3) */ -#define SQR_CBRT2 1.5874010519681994748 /* 2^(2/3) */ - -static const double factor[5] = -{ - 1.0 / SQR_CBRT2, - 1.0 / CBRT2, - 1.0, - CBRT2, - SQR_CBRT2 -}; - +#include +#include +#include "math_config.h" float __cbrtf (float x) { - float xm, ym, u, t2; - int xe; - - /* Reduce X. XM now is an range 1.0 to 0.5. */ - xm = __frexpf (fabsf (x), &xe); - - /* If X is not finite or is null return it (with raising exceptions - if necessary. - Note: *Our* version of `frexp' sets XE to zero if the argument is - Inf or NaN. This is not portable but faster. */ - if (xe == 0 && fpclassify (x) <= FP_ZERO) - return x + x; - - u = (0.492659620528969547 + (0.697570460207922770 - - 0.191502161678719066 * xm) * xm); - - t2 = u * u * u; - - ym = u * (t2 + 2.0 * xm) / (2.0 * t2 + xm) * factor[2 + xe % 3]; - - return __ldexpf (x > 0.0 ? ym : -ym, xe / 3); + static const union + { + double d; + uint64_t u; + } escale[3] = + { + { .d = 1.0 }, + { .d = 0x1.428a2f98d728bp+0 }, /* 2^(1/3) */ + { .d = 0x1.965fea53d6e3dp+0 }, /* 2^(2/3) */ + }; + uint32_t u = asuint (x); + uint32_t au = u << 1; + uint32_t sgn = u >> 31; + uint32_t e = au >> 24; + if (__glibc_unlikely (au < 1u << 24 || au >= 0xffu << 24)) + { + if (au >= 0xffu << 24) + return x + x; /* inf, nan */ + if (au == 0) + return x; /* +-0 */ + int nz = __builtin_clz (au) - 7; /* subnormal */ + au <<= nz; + e -= nz - 1; + } + uint32_t mant = au & 0xffffff; + e += 899; + uint32_t et = e / 3, it = e % 3; + uint64_t isc = escale[it].u; + isc += (int64_t) (et - 342) << 52; + isc |= (int64_t) sgn << 63; + double cvt2 = asdouble (isc); + static const double c[] = + { + 0x1.2319d352ea5d5p-1, 0x1.67ad8ee258d1ap-1, -0x1.9342edf9cbad9p-2, + 0x1.b6388fc510a75p-3, -0x1.6002455599e2fp-4, 0x1.7b096936192c4p-6, + -0x1.e5577187e8bf8p-9, 0x1.169ef81d6c34ep-12 + }; + double z = asdouble ((uint64_t) mant << 28 | UINT64_C(0x3ff) << 52); + double r0 = -0x1.9931c6c2d19d1p-6 / z; + double z2 = z * z; + double z4 = z2 * z2; + double f = ((c[0] + z * c[1]) + z2 * (c[2] + z * c[3])) + + z4 * ((c[4] + z * c[5]) + z2 * (c[6] + z * c[7])) + r0; + double r = f * cvt2; + float ub = r; + float lb = r - cvt2 * 1.4182e-9; + if (__glibc_likely (ub == lb)) + return ub; + const double u0 = -0x1.ab16ec65d138fp+3; + double h = f * f * f - z; + f -= (f * r0 * u0) * h; + r = f * cvt2; + uint64_t cvt1 = asuint64 (r); + ub = r; + int64_t m0 = cvt1 << 19; + int64_t m1 = m0 >> 63; + if (__glibc_unlikely ((m0 ^ m1) < (UINT64_C(1) << 31))) + { + cvt1 = (cvt1 + (UINT64_C(1) << 31)) & UINT64_C(0xffffffff00000000); + ub = asdouble (cvt1); + } + return ub; } libm_alias_float (__cbrt, cbrt) diff --git a/sysdeps/loongarch/lp64/libm-test-ulps b/sysdeps/loongarch/lp64/libm-test-ulps index 7c20711268..1aaf7b3fa3 100644 --- a/sysdeps/loongarch/lp64/libm-test-ulps +++ b/sysdeps/loongarch/lp64/libm-test-ulps @@ -417,22 +417,18 @@ ldouble: 2 Function: "cbrt": double: 4 -float: 1 ldouble: 1 Function: "cbrt_downward": double: 4 -float: 1 ldouble: 1 Function: "cbrt_towardzero": double: 3 -float: 1 ldouble: 1 Function: "cbrt_upward": double: 5 -float: 1 ldouble: 1 Function: Real part of "ccos": diff --git a/sysdeps/m68k/m680x0/fpu/libm-test-ulps b/sysdeps/m68k/m680x0/fpu/libm-test-ulps index 3964b83b81..8456a59010 100644 --- a/sysdeps/m68k/m680x0/fpu/libm-test-ulps +++ b/sysdeps/m68k/m680x0/fpu/libm-test-ulps @@ -379,22 +379,18 @@ ldouble: 1 Function: "cbrt": double: 1 -float: 1 ldouble: 1 Function: "cbrt_downward": double: 1 -float: 1 ldouble: 1 Function: "cbrt_towardzero": double: 1 -float: 1 ldouble: 1 Function: "cbrt_upward": double: 1 -float: 1 ldouble: 1 Function: Real part of "ccos": diff --git a/sysdeps/microblaze/libm-test-ulps b/sysdeps/microblaze/libm-test-ulps index 328e31582b..c89096defd 100644 --- a/sysdeps/microblaze/libm-test-ulps +++ b/sysdeps/microblaze/libm-test-ulps @@ -81,7 +81,6 @@ float: 1 Function: "cbrt": double: 3 -float: 1 Function: Real part of "ccos": double: 1 diff --git a/sysdeps/mips/mips32/libm-test-ulps b/sysdeps/mips/mips32/libm-test-ulps index c319e0642c..cef264d649 100644 --- a/sysdeps/mips/mips32/libm-test-ulps +++ b/sysdeps/mips/mips32/libm-test-ulps @@ -333,19 +333,15 @@ float: 1 Function: "cbrt": double: 4 -float: 1 Function: "cbrt_downward": double: 4 -float: 1 Function: "cbrt_towardzero": double: 3 -float: 1 Function: "cbrt_upward": double: 5 -float: 1 Function: Real part of "ccos": double: 1 diff --git a/sysdeps/mips/mips64/libm-test-ulps b/sysdeps/mips/mips64/libm-test-ulps index 365b860c54..724249d3ad 100644 --- a/sysdeps/mips/mips64/libm-test-ulps +++ b/sysdeps/mips/mips64/libm-test-ulps @@ -417,22 +417,18 @@ ldouble: 2 Function: "cbrt": double: 4 -float: 1 ldouble: 1 Function: "cbrt_downward": double: 4 -float: 1 ldouble: 1 Function: "cbrt_towardzero": double: 3 -float: 1 ldouble: 1 Function: "cbrt_upward": double: 5 -float: 1 ldouble: 1 Function: Real part of "ccos": diff --git a/sysdeps/nios2/libm-test-ulps b/sysdeps/nios2/libm-test-ulps index 5240767c0e..dbccba13cb 100644 --- a/sysdeps/nios2/libm-test-ulps +++ b/sysdeps/nios2/libm-test-ulps @@ -84,7 +84,6 @@ float: 1 Function: "cbrt": double: 4 -float: 1 Function: Real part of "ccos": double: 1 diff --git a/sysdeps/or1k/fpu/libm-test-ulps b/sysdeps/or1k/fpu/libm-test-ulps index 9ced4b0052..df2b69ac75 100644 --- a/sysdeps/or1k/fpu/libm-test-ulps +++ b/sysdeps/or1k/fpu/libm-test-ulps @@ -333,19 +333,15 @@ float: 1 Function: "cbrt": double: 4 -float: 1 Function: "cbrt_downward": double: 4 -float: 1 Function: "cbrt_towardzero": double: 3 -float: 1 Function: "cbrt_upward": double: 5 -float: 1 Function: Real part of "ccos": double: 1 diff --git a/sysdeps/or1k/nofpu/libm-test-ulps b/sysdeps/or1k/nofpu/libm-test-ulps index c7ae0f002b..2263f3f0b7 100644 --- a/sysdeps/or1k/nofpu/libm-test-ulps +++ b/sysdeps/or1k/nofpu/libm-test-ulps @@ -333,19 +333,15 @@ float: 1 Function: "cbrt": double: 4 -float: 1 Function: "cbrt_downward": double: 4 -float: 1 Function: "cbrt_towardzero": double: 3 -float: 1 Function: "cbrt_upward": double: 5 -float: 1 Function: Real part of "ccos": double: 1 diff --git a/sysdeps/powerpc/fpu/libm-test-ulps b/sysdeps/powerpc/fpu/libm-test-ulps index 8d0c18eed1..36fa54d97e 100644 --- a/sysdeps/powerpc/fpu/libm-test-ulps +++ b/sysdeps/powerpc/fpu/libm-test-ulps @@ -506,25 +506,21 @@ ldouble: 6 Function: "cbrt": double: 4 -float: 1 float128: 1 ldouble: 1 Function: "cbrt_downward": double: 4 -float: 1 float128: 1 ldouble: 5 Function: "cbrt_towardzero": double: 3 -float: 1 float128: 1 ldouble: 3 Function: "cbrt_upward": double: 5 -float: 1 float128: 2 ldouble: 2 diff --git a/sysdeps/powerpc/nofpu/libm-test-ulps b/sysdeps/powerpc/nofpu/libm-test-ulps index 20036c779c..c32c8017b4 100644 --- a/sysdeps/powerpc/nofpu/libm-test-ulps +++ b/sysdeps/powerpc/nofpu/libm-test-ulps @@ -421,22 +421,18 @@ ldouble: 6 Function: "cbrt": double: 4 -float: 1 ldouble: 1 Function: "cbrt_downward": double: 4 -float: 1 ldouble: 5 Function: "cbrt_towardzero": double: 3 -float: 1 ldouble: 3 Function: "cbrt_upward": double: 5 -float: 1 ldouble: 2 Function: Real part of "ccos": diff --git a/sysdeps/riscv/nofpu/libm-test-ulps b/sysdeps/riscv/nofpu/libm-test-ulps index cccc864a7a..79927c2bd9 100644 --- a/sysdeps/riscv/nofpu/libm-test-ulps +++ b/sysdeps/riscv/nofpu/libm-test-ulps @@ -417,22 +417,18 @@ ldouble: 2 Function: "cbrt": double: 4 -float: 1 ldouble: 1 Function: "cbrt_downward": double: 4 -float: 1 ldouble: 1 Function: "cbrt_towardzero": double: 3 -float: 1 ldouble: 1 Function: "cbrt_upward": double: 5 -float: 1 ldouble: 1 Function: Real part of "ccos": diff --git a/sysdeps/riscv/rvd/libm-test-ulps b/sysdeps/riscv/rvd/libm-test-ulps index 14fc7633af..fbd5b8fed7 100644 --- a/sysdeps/riscv/rvd/libm-test-ulps +++ b/sysdeps/riscv/rvd/libm-test-ulps @@ -417,22 +417,18 @@ ldouble: 2 Function: "cbrt": double: 4 -float: 1 ldouble: 1 Function: "cbrt_downward": double: 4 -float: 1 ldouble: 1 Function: "cbrt_towardzero": double: 3 -float: 1 ldouble: 1 Function: "cbrt_upward": double: 5 -float: 1 ldouble: 1 Function: Real part of "ccos": diff --git a/sysdeps/s390/fpu/libm-test-ulps b/sysdeps/s390/fpu/libm-test-ulps index a25bb505b3..ade5a39db4 100644 --- a/sysdeps/s390/fpu/libm-test-ulps +++ b/sysdeps/s390/fpu/libm-test-ulps @@ -417,22 +417,18 @@ ldouble: 2 Function: "cbrt": double: 4 -float: 1 ldouble: 1 Function: "cbrt_downward": double: 4 -float: 1 ldouble: 1 Function: "cbrt_towardzero": double: 3 -float: 1 ldouble: 1 Function: "cbrt_upward": double: 5 -float: 1 ldouble: 1 Function: Real part of "ccos": diff --git a/sysdeps/sh/libm-test-ulps b/sysdeps/sh/libm-test-ulps index 8562796de8..b0040d7218 100644 --- a/sysdeps/sh/libm-test-ulps +++ b/sysdeps/sh/libm-test-ulps @@ -164,11 +164,9 @@ float: 2 Function: "cbrt": double: 4 -float: 1 Function: "cbrt_towardzero": double: 3 -float: 1 Function: Real part of "ccos": double: 1 diff --git a/sysdeps/sparc/fpu/libm-test-ulps b/sysdeps/sparc/fpu/libm-test-ulps index 6ea02058e9..d78b46b97b 100644 --- a/sysdeps/sparc/fpu/libm-test-ulps +++ b/sysdeps/sparc/fpu/libm-test-ulps @@ -417,22 +417,18 @@ ldouble: 2 Function: "cbrt": double: 4 -float: 1 ldouble: 1 Function: "cbrt_downward": double: 4 -float: 1 ldouble: 1 Function: "cbrt_towardzero": double: 3 -float: 1 ldouble: 1 Function: "cbrt_upward": double: 5 -float: 1 ldouble: 1 Function: Real part of "ccos": diff --git a/sysdeps/x86_64/fpu/libm-test-ulps b/sysdeps/x86_64/fpu/libm-test-ulps index e3c811549c..327937929d 100644 --- a/sysdeps/x86_64/fpu/libm-test-ulps +++ b/sysdeps/x86_64/fpu/libm-test-ulps @@ -638,25 +638,21 @@ ldouble: 1 Function: "cbrt": double: 4 -float: 1 float128: 1 ldouble: 1 Function: "cbrt_downward": double: 4 -float: 1 float128: 1 ldouble: 1 Function: "cbrt_towardzero": double: 3 -float: 1 float128: 1 ldouble: 1 Function: "cbrt_upward": double: 5 -float: 1 float128: 1 ldouble: 1