Skip to content
Snippets Groups Projects
Commit 56e7fbc3 authored by Thomas Purcell's avatar Thomas Purcell
Browse files

Pow(x, 1/3) -> cbrt(x)

gcc will now accept negative values
parent 1bc47d48
Branches master
No related tags found
No related merge requests found
Pipeline #134906 passed
......@@ -24,6 +24,7 @@
#include <algorithm>
#include <functional>
#include <math.h>
namespace allowed_op_funcs
{
......@@ -230,7 +231,7 @@ inline void cbrt(
const int size, const double* in_0, const double alpha, const double a, double* out)
{
std::transform(
in_0, in_0 + size, out, [&](double i0) { return std::pow(alpha * i0 + a, 1.0 / 3.0); });
in_0, in_0 + size, out, [&](double i0) { return std::cbrt(alpha * i0 + a); });
}
/**
......
File deleted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment