(FPCore (x) :precision binary64 (pow x (/ 9.0 8.0)))
double code(double x) { return pow(x, (9.0 / 8.0)); }
real(8) function code(x) real(8), intent (in) :: x code = x ** (9.0d0 / 8.0d0) end function
public static double code(double x) { return Math.pow(x, (9.0 / 8.0)); }
def code(x): return math.pow(x, (9.0 / 8.0))
function code(x) return x ^ Float64(9.0 / 8.0) end
function tmp = code(x) tmp = x ^ (9.0 / 8.0); end
code[x_] := N[Power[x, N[(9.0 / 8.0), $MachinePrecision]], $MachinePrecision]
\begin{array}{l} \\ {x}^{\left(\frac{9}{8}\right)} \end{array}
Sampling outcomes in binary64 precision:
Herbie found 1 alternatives:
Alternative | Accuracy | Speedup |
---|
(FPCore (x) :precision binary64 (pow x (/ 9.0 8.0)))
double code(double x) { return pow(x, (9.0 / 8.0)); }
real(8) function code(x) real(8), intent (in) :: x code = x ** (9.0d0 / 8.0d0) end function
public static double code(double x) { return Math.pow(x, (9.0 / 8.0)); }
def code(x): return math.pow(x, (9.0 / 8.0))
function code(x) return x ^ Float64(9.0 / 8.0) end
function tmp = code(x) tmp = x ^ (9.0 / 8.0); end
code[x_] := N[Power[x, N[(9.0 / 8.0), $MachinePrecision]], $MachinePrecision]
\begin{array}{l} \\ {x}^{\left(\frac{9}{8}\right)} \end{array}
(FPCore (x) :precision binary64 (pow x 1.125))
double code(double x) { return pow(x, 1.125); }
real(8) function code(x) real(8), intent (in) :: x code = x ** 1.125d0 end function
public static double code(double x) { return Math.pow(x, 1.125); }
def code(x): return math.pow(x, 1.125)
function code(x) return x ^ 1.125 end
function tmp = code(x) tmp = x ^ 1.125; end
code[x_] := N[Power[x, 1.125], $MachinePrecision]
\begin{array}{l} \\ {x}^{1.125} \end{array}
Initial program 100.0%
lift-/.f64
N/A
metadata-eval
100.0
Applied rewrites100.0%
herbie shell --seed 1
(FPCore (x)
:name "pow(x,9/8)"
:precision binary64
:pre (and (<= 0.0 x) (<= x 1000.0))
(pow x (/ 9.0 8.0)))