Skip to content

Commit b28ed01

Browse files
authored
Update a header in response to cephes::cbrt leaving detail (#27)
* Update `alg.h` header for `cephes::cbrt` leaving detail * Get cbrt from alg.h in test_cbrt.h
1 parent a523fdd commit b28ed01

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/xsf/alg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
namespace xsf {
66

7-
XSF_HOST_DEVICE inline double cbrt(double x) { return cephes::detail::cbrt(x); }
7+
XSF_HOST_DEVICE inline double cbrt(double x) { return cephes::cbrt(x); }
88

99
XSF_HOST_DEVICE inline float cbrt(float x) { return cbrt(static_cast<double>(x)); }
1010

tests/scipy_special_tests/test_cbrt.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include "../testing_utils.h"
22

3-
#include <xsf/cephes/cbrt.h>
3+
#include <xsf/alg.h>
44

55
namespace fs = std::filesystem;
66

@@ -15,7 +15,7 @@ TEST_CASE("cephes::cbrt d->d scipy_special_tests", "[cephes::cbrt][d->d][scipy_s
1515

1616
auto x = input;
1717
auto [desired, fallback] = output;
18-
auto out = xsf::cephes::cbrt(x);
18+
auto out = xsf::cbrt(x);
1919
auto error = xsf::extended_relative_error(out, desired);
2020
tol = adjust_tolerance(tol);
2121
CAPTURE(x, out, desired, error, tol, fallback);

0 commit comments

Comments
 (0)