
(FPCore (y x) :precision binary64 (+ (pow (log y) (sin x)) (* (/ x y) (cbrt (* y x)))))
double code(double y, double x) {
return pow(log(y), sin(x)) + ((x / y) * cbrt((y * x)));
}
public static double code(double y, double x) {
return Math.pow(Math.log(y), Math.sin(x)) + ((x / y) * Math.cbrt((y * x)));
}
function code(y, x) return Float64((log(y) ^ sin(x)) + Float64(Float64(x / y) * cbrt(Float64(y * x)))) end
code[y_, x_] := N[(N[Power[N[Log[y], $MachinePrecision], N[Sin[x], $MachinePrecision]], $MachinePrecision] + N[(N[(x / y), $MachinePrecision] * N[Power[N[(y * x), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
{\log y}^{\sin x} + \frac{x}{y} \cdot \sqrt[3]{y \cdot x}
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (y x) :precision binary64 (+ (pow (log y) (sin x)) (* (/ x y) (cbrt (* y x)))))
double code(double y, double x) {
return pow(log(y), sin(x)) + ((x / y) * cbrt((y * x)));
}
public static double code(double y, double x) {
return Math.pow(Math.log(y), Math.sin(x)) + ((x / y) * Math.cbrt((y * x)));
}
function code(y, x) return Float64((log(y) ^ sin(x)) + Float64(Float64(x / y) * cbrt(Float64(y * x)))) end
code[y_, x_] := N[(N[Power[N[Log[y], $MachinePrecision], N[Sin[x], $MachinePrecision]], $MachinePrecision] + N[(N[(x / y), $MachinePrecision] * N[Power[N[(y * x), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
{\log y}^{\sin x} + \frac{x}{y} \cdot \sqrt[3]{y \cdot x}
(FPCore (y x) :precision binary64 (fma (* (cbrt y) (/ x y)) (cbrt x) (pow (log y) (sin x))))
double code(double y, double x) {
return fma((cbrt(y) * (x / y)), cbrt(x), pow(log(y), sin(x)));
}
function code(y, x) return fma(Float64(cbrt(y) * Float64(x / y)), cbrt(x), (log(y) ^ sin(x))) end
code[y_, x_] := N[(N[(N[Power[y, 1/3], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision] * N[Power[x, 1/3], $MachinePrecision] + N[Power[N[Log[y], $MachinePrecision], N[Sin[x], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\mathsf{fma}\left(\sqrt[3]{y} \cdot \frac{x}{y}, \sqrt[3]{x}, {\log y}^{\sin x}\right)
Initial program 78.5%
lift-+.f64N/A
+-commutativeN/A
add-flipN/A
sub-flipN/A
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
associate-*l*N/A
*-commutativeN/A
remove-double-negN/A
lower-fma.f64N/A
*-commutativeN/A
mult-flipN/A
lower-/.f6478.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6478.5%
Applied rewrites78.5%
lift-/.f64N/A
div-flip-revN/A
lift-cbrt.f64N/A
lift-*.f64N/A
cbrt-prodN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
associate-/r*N/A
div-flip-revN/A
lower-/.f64N/A
lower-/.f6499.4%
Applied rewrites99.4%
lift-/.f64N/A
mult-flipN/A
*-commutativeN/A
lift-/.f64N/A
associate-/r/N/A
lift-/.f64N/A
associate-*r*N/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
cbrt-prodN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lift-*.f6478.5%
lift-fma.f64N/A
*-commutativeN/A
Applied rewrites99.4%
(FPCore (y x)
:precision binary64
(let* ((t_0 (pow (log y) (sin x))))
(if (<= (+ t_0 (* (/ x y) (cbrt (* y x)))) 2e+250)
(fma (/ (cbrt (* x y)) y) x t_0)
(fma (* (cbrt y) (/ x y)) (cbrt x) 1.0))))double code(double y, double x) {
double t_0 = pow(log(y), sin(x));
double tmp;
if ((t_0 + ((x / y) * cbrt((y * x)))) <= 2e+250) {
tmp = fma((cbrt((x * y)) / y), x, t_0);
} else {
tmp = fma((cbrt(y) * (x / y)), cbrt(x), 1.0);
}
return tmp;
}
function code(y, x) t_0 = log(y) ^ sin(x) tmp = 0.0 if (Float64(t_0 + Float64(Float64(x / y) * cbrt(Float64(y * x)))) <= 2e+250) tmp = fma(Float64(cbrt(Float64(x * y)) / y), x, t_0); else tmp = fma(Float64(cbrt(y) * Float64(x / y)), cbrt(x), 1.0); end return tmp end
code[y_, x_] := Block[{t$95$0 = N[Power[N[Log[y], $MachinePrecision], N[Sin[x], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[N[(t$95$0 + N[(N[(x / y), $MachinePrecision] * N[Power[N[(y * x), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 2e+250], N[(N[(N[Power[N[(x * y), $MachinePrecision], 1/3], $MachinePrecision] / y), $MachinePrecision] * x + t$95$0), $MachinePrecision], N[(N[(N[Power[y, 1/3], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision] * N[Power[x, 1/3], $MachinePrecision] + 1.0), $MachinePrecision]]]
\begin{array}{l}
t_0 := {\log y}^{\sin x}\\
\mathbf{if}\;t\_0 + \frac{x}{y} \cdot \sqrt[3]{y \cdot x} \leq 2 \cdot 10^{+250}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\sqrt[3]{x \cdot y}}{y}, x, t\_0\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt[3]{y} \cdot \frac{x}{y}, \sqrt[3]{x}, 1\right)\\
\end{array}
if (+.f64 (pow.f64 (log.f64 y) (sin.f64 x)) (*.f64 (/.f64 x y) (cbrt.f64 (*.f64 y x)))) < 1.9999999999999998e250Initial program 78.5%
lift-+.f64N/A
+-commutativeN/A
add-flipN/A
sub-flipN/A
lift-*.f64N/A
lift-/.f64N/A
mult-flipN/A
associate-*l*N/A
*-commutativeN/A
remove-double-negN/A
lower-fma.f64N/A
*-commutativeN/A
mult-flipN/A
lower-/.f6478.5%
lift-*.f64N/A
*-commutativeN/A
lower-*.f6478.5%
Applied rewrites78.5%
if 1.9999999999999998e250 < (+.f64 (pow.f64 (log.f64 y) (sin.f64 x)) (*.f64 (/.f64 x y) (cbrt.f64 (*.f64 y x)))) Initial program 78.5%
Taylor expanded in x around 0
Applied rewrites69.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lift-*.f64N/A
cbrt-unprodN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
*-commutativeN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
cbrt-prodN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lower-fma.f6469.5%
Applied rewrites69.5%
lift-fma.f64N/A
lift-cbrt.f64N/A
lift-*.f64N/A
cbrt-prodN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6486.5%
Applied rewrites86.5%
(FPCore (y x) :precision binary64 (fma (* (pow y -0.6666666666666666) x) (cbrt x) (pow (log y) (sin x))))
double code(double y, double x) {
return fma((pow(y, -0.6666666666666666) * x), cbrt(x), pow(log(y), sin(x)));
}
function code(y, x) return fma(Float64((y ^ -0.6666666666666666) * x), cbrt(x), (log(y) ^ sin(x))) end
code[y_, x_] := N[(N[(N[Power[y, -0.6666666666666666], $MachinePrecision] * x), $MachinePrecision] * N[Power[x, 1/3], $MachinePrecision] + N[Power[N[Log[y], $MachinePrecision], N[Sin[x], $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\mathsf{fma}\left({y}^{-0.6666666666666666} \cdot x, \sqrt[3]{x}, {\log y}^{\sin x}\right)
Initial program 78.5%
lift-+.f64N/A
+-commutativeN/A
add-flipN/A
sub-flipN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lift-*.f64N/A
cbrt-prodN/A
associate-*r*N/A
remove-double-negN/A
lower-fma.f64N/A
Applied rewrites96.7%
(FPCore (y x) :precision binary64 (if (<= (+ (pow (log y) (sin x)) (* (/ x y) (cbrt (* y x)))) 500.0) (/ 1.0 (/ 1.0 (exp (* (log (* -1.0 (log (/ 1.0 y)))) (sin x))))) (fma (* (cbrt y) (/ x y)) (cbrt x) 1.0)))
double code(double y, double x) {
double tmp;
if ((pow(log(y), sin(x)) + ((x / y) * cbrt((y * x)))) <= 500.0) {
tmp = 1.0 / (1.0 / exp((log((-1.0 * log((1.0 / y)))) * sin(x))));
} else {
tmp = fma((cbrt(y) * (x / y)), cbrt(x), 1.0);
}
return tmp;
}
function code(y, x) tmp = 0.0 if (Float64((log(y) ^ sin(x)) + Float64(Float64(x / y) * cbrt(Float64(y * x)))) <= 500.0) tmp = Float64(1.0 / Float64(1.0 / exp(Float64(log(Float64(-1.0 * log(Float64(1.0 / y)))) * sin(x))))); else tmp = fma(Float64(cbrt(y) * Float64(x / y)), cbrt(x), 1.0); end return tmp end
code[y_, x_] := If[LessEqual[N[(N[Power[N[Log[y], $MachinePrecision], N[Sin[x], $MachinePrecision]], $MachinePrecision] + N[(N[(x / y), $MachinePrecision] * N[Power[N[(y * x), $MachinePrecision], 1/3], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 500.0], N[(1.0 / N[(1.0 / N[Exp[N[(N[Log[N[(-1.0 * N[Log[N[(1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * N[Sin[x], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[y, 1/3], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision] * N[Power[x, 1/3], $MachinePrecision] + 1.0), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;{\log y}^{\sin x} + \frac{x}{y} \cdot \sqrt[3]{y \cdot x} \leq 500:\\
\;\;\;\;\frac{1}{\frac{1}{e^{\log \left(-1 \cdot \log \left(\frac{1}{y}\right)\right) \cdot \sin x}}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\sqrt[3]{y} \cdot \frac{x}{y}, \sqrt[3]{x}, 1\right)\\
\end{array}
if (+.f64 (pow.f64 (log.f64 y) (sin.f64 x)) (*.f64 (/.f64 x y) (cbrt.f64 (*.f64 y x)))) < 500Initial program 78.5%
lift-+.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
add-to-fractionN/A
div-addN/A
common-denominatorN/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f64N/A
lower-*.f64N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-fma.f64N/A
*-commutativeN/A
Applied rewrites41.2%
Taylor expanded in y around inf
lower-/.f64N/A
lower-exp.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-*.f64N/A
lower-log.f64N/A
lower-/.f64N/A
lower-sin.f6464.1%
Applied rewrites64.1%
if 500 < (+.f64 (pow.f64 (log.f64 y) (sin.f64 x)) (*.f64 (/.f64 x y) (cbrt.f64 (*.f64 y x)))) Initial program 78.5%
Taylor expanded in x around 0
Applied rewrites69.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lift-*.f64N/A
cbrt-unprodN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
*-commutativeN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
cbrt-prodN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lower-fma.f6469.5%
Applied rewrites69.5%
lift-fma.f64N/A
lift-cbrt.f64N/A
lift-*.f64N/A
cbrt-prodN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6486.5%
Applied rewrites86.5%
(FPCore (y x) :precision binary64 (fma (* (cbrt y) (/ x y)) (cbrt x) 1.0))
double code(double y, double x) {
return fma((cbrt(y) * (x / y)), cbrt(x), 1.0);
}
function code(y, x) return fma(Float64(cbrt(y) * Float64(x / y)), cbrt(x), 1.0) end
code[y_, x_] := N[(N[(N[Power[y, 1/3], $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision] * N[Power[x, 1/3], $MachinePrecision] + 1.0), $MachinePrecision]
\mathsf{fma}\left(\sqrt[3]{y} \cdot \frac{x}{y}, \sqrt[3]{x}, 1\right)
Initial program 78.5%
Taylor expanded in x around 0
Applied rewrites69.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lift-*.f64N/A
cbrt-unprodN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
*-commutativeN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
cbrt-prodN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lower-fma.f6469.5%
Applied rewrites69.5%
lift-fma.f64N/A
lift-cbrt.f64N/A
lift-*.f64N/A
cbrt-prodN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6486.5%
Applied rewrites86.5%
(FPCore (y x) :precision binary64 (fma (* x (/ (cbrt x) y)) (cbrt y) 1.0))
double code(double y, double x) {
return fma((x * (cbrt(x) / y)), cbrt(y), 1.0);
}
function code(y, x) return fma(Float64(x * Float64(cbrt(x) / y)), cbrt(y), 1.0) end
code[y_, x_] := N[(N[(x * N[(N[Power[x, 1/3], $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] * N[Power[y, 1/3], $MachinePrecision] + 1.0), $MachinePrecision]
\mathsf{fma}\left(x \cdot \frac{\sqrt[3]{x}}{y}, \sqrt[3]{y}, 1\right)
Initial program 78.5%
Taylor expanded in x around 0
Applied rewrites69.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lift-*.f64N/A
cbrt-unprodN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
*-commutativeN/A
associate-*r*N/A
lower-fma.f64N/A
lower-*.f6486.5%
Applied rewrites86.5%
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
associate-/l*N/A
div-flip-revN/A
lift-/.f64N/A
lower-*.f64N/A
lift-/.f64N/A
div-flip-revN/A
lower-/.f6486.5%
Applied rewrites86.5%
(FPCore (y x) :precision binary64 (fma (* x (pow y -0.6666666666666666)) (cbrt x) 1.0))
double code(double y, double x) {
return fma((x * pow(y, -0.6666666666666666)), cbrt(x), 1.0);
}
function code(y, x) return fma(Float64(x * (y ^ -0.6666666666666666)), cbrt(x), 1.0) end
code[y_, x_] := N[(N[(x * N[Power[y, -0.6666666666666666], $MachinePrecision]), $MachinePrecision] * N[Power[x, 1/3], $MachinePrecision] + 1.0), $MachinePrecision]
\mathsf{fma}\left(x \cdot {y}^{-0.6666666666666666}, \sqrt[3]{x}, 1\right)
Initial program 78.5%
Taylor expanded in x around 0
Applied rewrites69.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lift-*.f64N/A
cbrt-unprodN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
*-commutativeN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
cbrt-prodN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lower-fma.f6469.5%
Applied rewrites69.5%
lift-fma.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-/.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6469.5%
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flip-revN/A
lower-/.f6469.5%
Applied rewrites69.5%
lift-fma.f64N/A
+-commutativeN/A
lift-/.f64N/A
associate-*l/N/A
*-commutativeN/A
lift-cbrt.f64N/A
lift-*.f64N/A
cbrt-prodN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
*-commutativeN/A
lift-*.f64N/A
associate-*l/N/A
lift-/.f64N/A
+-commutativeN/A
Applied rewrites84.0%
(FPCore (y x) :precision binary64 (if (<= x 1.25e+117) (fma (/ x y) (cbrt (* x y)) 1.0) (fma (pow y -0.6666666666666666) (pow x 1.3333333333333333) 1.0)))
double code(double y, double x) {
double tmp;
if (x <= 1.25e+117) {
tmp = fma((x / y), cbrt((x * y)), 1.0);
} else {
tmp = fma(pow(y, -0.6666666666666666), pow(x, 1.3333333333333333), 1.0);
}
return tmp;
}
function code(y, x) tmp = 0.0 if (x <= 1.25e+117) tmp = fma(Float64(x / y), cbrt(Float64(x * y)), 1.0); else tmp = fma((y ^ -0.6666666666666666), (x ^ 1.3333333333333333), 1.0); end return tmp end
code[y_, x_] := If[LessEqual[x, 1.25e+117], N[(N[(x / y), $MachinePrecision] * N[Power[N[(x * y), $MachinePrecision], 1/3], $MachinePrecision] + 1.0), $MachinePrecision], N[(N[Power[y, -0.6666666666666666], $MachinePrecision] * N[Power[x, 1.3333333333333333], $MachinePrecision] + 1.0), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;x \leq 1.25 \cdot 10^{+117}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{y}, \sqrt[3]{x \cdot y}, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left({y}^{-0.6666666666666666}, {x}^{1.3333333333333333}, 1\right)\\
\end{array}
if x < 1.25e117Initial program 78.5%
Taylor expanded in x around 0
Applied rewrites69.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lift-*.f64N/A
cbrt-unprodN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
*-commutativeN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
cbrt-prodN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lower-fma.f6469.5%
Applied rewrites69.5%
if 1.25e117 < x Initial program 78.5%
Taylor expanded in x around 0
Applied rewrites69.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lift-*.f64N/A
cbrt-unprodN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
*-commutativeN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
cbrt-prodN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lower-fma.f6469.5%
Applied rewrites69.5%
lift-fma.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-/.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flip-revN/A
lift-cbrt.f64N/A
lift-*.f64N/A
*-commutativeN/A
cbrt-prodN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
associate-*l/N/A
associate-*l*N/A
*-commutativeN/A
Applied rewrites38.9%
(FPCore (y x) :precision binary64 (if (<= x 1.25e+117) (fma (/ x y) (cbrt (* x y)) 1.0) (/ (pow x 1.3333333333333333) (pow y 0.6666666666666666))))
double code(double y, double x) {
double tmp;
if (x <= 1.25e+117) {
tmp = fma((x / y), cbrt((x * y)), 1.0);
} else {
tmp = pow(x, 1.3333333333333333) / pow(y, 0.6666666666666666);
}
return tmp;
}
function code(y, x) tmp = 0.0 if (x <= 1.25e+117) tmp = fma(Float64(x / y), cbrt(Float64(x * y)), 1.0); else tmp = Float64((x ^ 1.3333333333333333) / (y ^ 0.6666666666666666)); end return tmp end
code[y_, x_] := If[LessEqual[x, 1.25e+117], N[(N[(x / y), $MachinePrecision] * N[Power[N[(x * y), $MachinePrecision], 1/3], $MachinePrecision] + 1.0), $MachinePrecision], N[(N[Power[x, 1.3333333333333333], $MachinePrecision] / N[Power[y, 0.6666666666666666], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;x \leq 1.25 \cdot 10^{+117}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{y}, \sqrt[3]{x \cdot y}, 1\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{{x}^{1.3333333333333333}}{{y}^{0.6666666666666666}}\\
\end{array}
if x < 1.25e117Initial program 78.5%
Taylor expanded in x around 0
Applied rewrites69.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lift-*.f64N/A
cbrt-unprodN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
*-commutativeN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
cbrt-prodN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lower-fma.f6469.5%
Applied rewrites69.5%
if 1.25e117 < x Initial program 78.5%
lift-+.f64N/A
lift-*.f64N/A
lift-/.f64N/A
associate-*l/N/A
add-to-fractionN/A
div-addN/A
common-denominatorN/A
div-flipN/A
lower-unsound-/.f64N/A
lower-unsound-/.f64N/A
lower-*.f64N/A
distribute-rgt-outN/A
lower-*.f64N/A
lower-fma.f64N/A
*-commutativeN/A
Applied rewrites41.2%
lift-pow.f64N/A
pow-to-expN/A
lower-unsound-exp.f64N/A
lower-unsound-*.f64N/A
lower-unsound-log.f64N/A
lower-unsound-log.f64N/A
lower-unsound-log.f6441.2%
Applied rewrites41.2%
Taylor expanded in y around 0
lower-/.f64N/A
lower-pow.f64N/A
lower-pow.f6414.3%
Applied rewrites14.3%
(FPCore (y x) :precision binary64 (fma (/ (cbrt (* x y)) y) x 1.0))
double code(double y, double x) {
return fma((cbrt((x * y)) / y), x, 1.0);
}
function code(y, x) return fma(Float64(cbrt(Float64(x * y)) / y), x, 1.0) end
code[y_, x_] := N[(N[(N[Power[N[(x * y), $MachinePrecision], 1/3], $MachinePrecision] / y), $MachinePrecision] * x + 1.0), $MachinePrecision]
\mathsf{fma}\left(\frac{\sqrt[3]{x \cdot y}}{y}, x, 1\right)
Initial program 78.5%
Taylor expanded in x around 0
Applied rewrites69.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lift-*.f64N/A
cbrt-unprodN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
*-commutativeN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
cbrt-prodN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lower-fma.f6469.5%
Applied rewrites69.5%
lift-fma.f64N/A
lift-/.f64N/A
mult-flipN/A
lift-/.f64N/A
associate-*l*N/A
lift-*.f64N/A
*-commutativeN/A
lower-fma.f6469.5%
lift-*.f64N/A
*-commutativeN/A
lift-/.f64N/A
mult-flip-revN/A
lower-/.f6469.5%
Applied rewrites69.5%
(FPCore (y x) :precision binary64 (fma (/ x y) (cbrt (* x y)) 1.0))
double code(double y, double x) {
return fma((x / y), cbrt((x * y)), 1.0);
}
function code(y, x) return fma(Float64(x / y), cbrt(Float64(x * y)), 1.0) end
code[y_, x_] := N[(N[(x / y), $MachinePrecision] * N[Power[N[(x * y), $MachinePrecision], 1/3], $MachinePrecision] + 1.0), $MachinePrecision]
\mathsf{fma}\left(\frac{x}{y}, \sqrt[3]{x \cdot y}, 1\right)
Initial program 78.5%
Taylor expanded in x around 0
Applied rewrites69.5%
lift-+.f64N/A
+-commutativeN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lift-*.f64N/A
cbrt-unprodN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
*-commutativeN/A
lift-cbrt.f64N/A
lift-cbrt.f64N/A
cbrt-prodN/A
lift-*.f64N/A
lift-cbrt.f64N/A
lower-fma.f6469.5%
Applied rewrites69.5%
herbie shell --seed 1
(FPCore (y x)
:name "pow(log(y),sin(x))+(x/y)*cbrt(y*x)"
:precision binary64
:pre (and (and (<= -1.79e+308 y) (<= y 1.79e+308)) (and (<= -1.79e+308 x) (<= x 1.79e+308)))
(+ (pow (log y) (sin x)) (* (/ x y) (cbrt (* y x)))))