
(FPCore (x y) :precision binary64 (exp (* (* x y) y)))
double code(double x, double y) {
return exp(((x * y) * y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = exp(((x * y) * y))
end function
public static double code(double x, double y) {
return Math.exp(((x * y) * y));
}
def code(x, y): return math.exp(((x * y) * y))
function code(x, y) return exp(Float64(Float64(x * y) * y)) end
function tmp = code(x, y) tmp = exp(((x * y) * y)); end
code[x_, y_] := N[Exp[N[(N[(x * y), $MachinePrecision] * y), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x \cdot y\right) \cdot y}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (exp (* (* x y) y)))
double code(double x, double y) {
return exp(((x * y) * y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = exp(((x * y) * y))
end function
public static double code(double x, double y) {
return Math.exp(((x * y) * y));
}
def code(x, y): return math.exp(((x * y) * y))
function code(x, y) return exp(Float64(Float64(x * y) * y)) end
function tmp = code(x, y) tmp = exp(((x * y) * y)); end
code[x_, y_] := N[Exp[N[(N[(x * y), $MachinePrecision] * y), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{\left(x \cdot y\right) \cdot y}
\end{array}
(FPCore (x y) :precision binary64 (exp (* y (* x y))))
double code(double x, double y) {
return exp((y * (x * y)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = exp((y * (x * y)))
end function
public static double code(double x, double y) {
return Math.exp((y * (x * y)));
}
def code(x, y): return math.exp((y * (x * y)))
function code(x, y) return exp(Float64(y * Float64(x * y))) end
function tmp = code(x, y) tmp = exp((y * (x * y))); end
code[x_, y_] := N[Exp[N[(y * N[(x * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
\begin{array}{l}
\\
e^{y \cdot \left(x \cdot y\right)}
\end{array}
Initial program 100.0%
Final simplification100.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* y (* x y)))
(t_1 (* t_0 (+ 1.0 (* t_0 (+ 0.5 (* t_0 0.16666666666666666)))))))
(if (<= y 5.4e-79) (/ (+ (* t_1 t_1) -1.0) (+ t_1 -1.0)) (exp (* x y)))))
double code(double x, double y) {
double t_0 = y * (x * y);
double t_1 = t_0 * (1.0 + (t_0 * (0.5 + (t_0 * 0.16666666666666666))));
double tmp;
if (y <= 5.4e-79) {
tmp = ((t_1 * t_1) + -1.0) / (t_1 + -1.0);
} else {
tmp = exp((x * y));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y * (x * y)
t_1 = t_0 * (1.0d0 + (t_0 * (0.5d0 + (t_0 * 0.16666666666666666d0))))
if (y <= 5.4d-79) then
tmp = ((t_1 * t_1) + (-1.0d0)) / (t_1 + (-1.0d0))
else
tmp = exp((x * y))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y * (x * y);
double t_1 = t_0 * (1.0 + (t_0 * (0.5 + (t_0 * 0.16666666666666666))));
double tmp;
if (y <= 5.4e-79) {
tmp = ((t_1 * t_1) + -1.0) / (t_1 + -1.0);
} else {
tmp = Math.exp((x * y));
}
return tmp;
}
def code(x, y): t_0 = y * (x * y) t_1 = t_0 * (1.0 + (t_0 * (0.5 + (t_0 * 0.16666666666666666)))) tmp = 0 if y <= 5.4e-79: tmp = ((t_1 * t_1) + -1.0) / (t_1 + -1.0) else: tmp = math.exp((x * y)) return tmp
function code(x, y) t_0 = Float64(y * Float64(x * y)) t_1 = Float64(t_0 * Float64(1.0 + Float64(t_0 * Float64(0.5 + Float64(t_0 * 0.16666666666666666))))) tmp = 0.0 if (y <= 5.4e-79) tmp = Float64(Float64(Float64(t_1 * t_1) + -1.0) / Float64(t_1 + -1.0)); else tmp = exp(Float64(x * y)); end return tmp end
function tmp_2 = code(x, y) t_0 = y * (x * y); t_1 = t_0 * (1.0 + (t_0 * (0.5 + (t_0 * 0.16666666666666666)))); tmp = 0.0; if (y <= 5.4e-79) tmp = ((t_1 * t_1) + -1.0) / (t_1 + -1.0); else tmp = exp((x * y)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[(1.0 + N[(t$95$0 * N[(0.5 + N[(t$95$0 * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 5.4e-79], N[(N[(N[(t$95$1 * t$95$1), $MachinePrecision] + -1.0), $MachinePrecision] / N[(t$95$1 + -1.0), $MachinePrecision]), $MachinePrecision], N[Exp[N[(x * y), $MachinePrecision]], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(x \cdot y\right)\\
t_1 := t\_0 \cdot \left(1 + t\_0 \cdot \left(0.5 + t\_0 \cdot 0.16666666666666666\right)\right)\\
\mathbf{if}\;y \leq 5.4 \cdot 10^{-79}:\\
\;\;\;\;\frac{t\_1 \cdot t\_1 + -1}{t\_1 + -1}\\
\mathbf{else}:\\
\;\;\;\;e^{x \cdot y}\\
\end{array}
\end{array}
if y < 5.4000000000000004e-79Initial program 100.0%
Taylor expanded in x around 0
Simplified72.6%
+-commutativeN/A
flip-+N/A
/-lowering-/.f64N/A
Applied egg-rr63.8%
if 5.4000000000000004e-79 < y Initial program 100.0%
Applied egg-rr87.9%
Final simplification69.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* y (* x y)))
(t_1 (* t_0 (+ 1.0 (* t_0 (+ 0.5 (* t_0 0.16666666666666666)))))))
(if (<= y 7.2e-79) (/ (+ (* t_1 t_1) -1.0) (+ t_1 -1.0)) (exp x))))
double code(double x, double y) {
double t_0 = y * (x * y);
double t_1 = t_0 * (1.0 + (t_0 * (0.5 + (t_0 * 0.16666666666666666))));
double tmp;
if (y <= 7.2e-79) {
tmp = ((t_1 * t_1) + -1.0) / (t_1 + -1.0);
} else {
tmp = exp(x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = y * (x * y)
t_1 = t_0 * (1.0d0 + (t_0 * (0.5d0 + (t_0 * 0.16666666666666666d0))))
if (y <= 7.2d-79) then
tmp = ((t_1 * t_1) + (-1.0d0)) / (t_1 + (-1.0d0))
else
tmp = exp(x)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y * (x * y);
double t_1 = t_0 * (1.0 + (t_0 * (0.5 + (t_0 * 0.16666666666666666))));
double tmp;
if (y <= 7.2e-79) {
tmp = ((t_1 * t_1) + -1.0) / (t_1 + -1.0);
} else {
tmp = Math.exp(x);
}
return tmp;
}
def code(x, y): t_0 = y * (x * y) t_1 = t_0 * (1.0 + (t_0 * (0.5 + (t_0 * 0.16666666666666666)))) tmp = 0 if y <= 7.2e-79: tmp = ((t_1 * t_1) + -1.0) / (t_1 + -1.0) else: tmp = math.exp(x) return tmp
function code(x, y) t_0 = Float64(y * Float64(x * y)) t_1 = Float64(t_0 * Float64(1.0 + Float64(t_0 * Float64(0.5 + Float64(t_0 * 0.16666666666666666))))) tmp = 0.0 if (y <= 7.2e-79) tmp = Float64(Float64(Float64(t_1 * t_1) + -1.0) / Float64(t_1 + -1.0)); else tmp = exp(x); end return tmp end
function tmp_2 = code(x, y) t_0 = y * (x * y); t_1 = t_0 * (1.0 + (t_0 * (0.5 + (t_0 * 0.16666666666666666)))); tmp = 0.0; if (y <= 7.2e-79) tmp = ((t_1 * t_1) + -1.0) / (t_1 + -1.0); else tmp = exp(x); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(x * y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 * N[(1.0 + N[(t$95$0 * N[(0.5 + N[(t$95$0 * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 7.2e-79], N[(N[(N[(t$95$1 * t$95$1), $MachinePrecision] + -1.0), $MachinePrecision] / N[(t$95$1 + -1.0), $MachinePrecision]), $MachinePrecision], N[Exp[x], $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(x \cdot y\right)\\
t_1 := t\_0 \cdot \left(1 + t\_0 \cdot \left(0.5 + t\_0 \cdot 0.16666666666666666\right)\right)\\
\mathbf{if}\;y \leq 7.2 \cdot 10^{-79}:\\
\;\;\;\;\frac{t\_1 \cdot t\_1 + -1}{t\_1 + -1}\\
\mathbf{else}:\\
\;\;\;\;e^{x}\\
\end{array}
\end{array}
if y < 7.2000000000000005e-79Initial program 100.0%
Taylor expanded in x around 0
Simplified72.6%
+-commutativeN/A
flip-+N/A
/-lowering-/.f64N/A
Applied egg-rr63.8%
if 7.2000000000000005e-79 < y Initial program 100.0%
Applied egg-rr69.7%
Final simplification65.3%
(FPCore (x y)
:precision binary64
(+
(+ (* y (* x y)) 1.0)
(*
x
(*
(* y y)
(* (* x (* y y)) (+ 0.5 (* y (* x (* y 0.16666666666666666)))))))))
double code(double x, double y) {
return ((y * (x * y)) + 1.0) + (x * ((y * y) * ((x * (y * y)) * (0.5 + (y * (x * (y * 0.16666666666666666)))))));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((y * (x * y)) + 1.0d0) + (x * ((y * y) * ((x * (y * y)) * (0.5d0 + (y * (x * (y * 0.16666666666666666d0)))))))
end function
public static double code(double x, double y) {
return ((y * (x * y)) + 1.0) + (x * ((y * y) * ((x * (y * y)) * (0.5 + (y * (x * (y * 0.16666666666666666)))))));
}
def code(x, y): return ((y * (x * y)) + 1.0) + (x * ((y * y) * ((x * (y * y)) * (0.5 + (y * (x * (y * 0.16666666666666666)))))))
function code(x, y) return Float64(Float64(Float64(y * Float64(x * y)) + 1.0) + Float64(x * Float64(Float64(y * y) * Float64(Float64(x * Float64(y * y)) * Float64(0.5 + Float64(y * Float64(x * Float64(y * 0.16666666666666666)))))))) end
function tmp = code(x, y) tmp = ((y * (x * y)) + 1.0) + (x * ((y * y) * ((x * (y * y)) * (0.5 + (y * (x * (y * 0.16666666666666666))))))); end
code[x_, y_] := N[(N[(N[(y * N[(x * y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] + N[(x * N[(N[(y * y), $MachinePrecision] * N[(N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(0.5 + N[(y * N[(x * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(y \cdot \left(x \cdot y\right) + 1\right) + x \cdot \left(\left(y \cdot y\right) \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(0.5 + y \cdot \left(x \cdot \left(y \cdot 0.16666666666666666\right)\right)\right)\right)\right)
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
Simplified69.5%
distribute-rgt-inN/A
*-lft-identityN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
Applied egg-rr69.9%
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr69.9%
Final simplification69.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (* y (* x y))))
(+
(+ t_0 1.0)
(* y (* t_0 (* x (* y (+ 0.5 (* t_0 0.16666666666666666)))))))))
double code(double x, double y) {
double t_0 = y * (x * y);
return (t_0 + 1.0) + (y * (t_0 * (x * (y * (0.5 + (t_0 * 0.16666666666666666))))));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
t_0 = y * (x * y)
code = (t_0 + 1.0d0) + (y * (t_0 * (x * (y * (0.5d0 + (t_0 * 0.16666666666666666d0))))))
end function
public static double code(double x, double y) {
double t_0 = y * (x * y);
return (t_0 + 1.0) + (y * (t_0 * (x * (y * (0.5 + (t_0 * 0.16666666666666666))))));
}
def code(x, y): t_0 = y * (x * y) return (t_0 + 1.0) + (y * (t_0 * (x * (y * (0.5 + (t_0 * 0.16666666666666666))))))
function code(x, y) t_0 = Float64(y * Float64(x * y)) return Float64(Float64(t_0 + 1.0) + Float64(y * Float64(t_0 * Float64(x * Float64(y * Float64(0.5 + Float64(t_0 * 0.16666666666666666))))))) end
function tmp = code(x, y) t_0 = y * (x * y); tmp = (t_0 + 1.0) + (y * (t_0 * (x * (y * (0.5 + (t_0 * 0.16666666666666666)))))); end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(x * y), $MachinePrecision]), $MachinePrecision]}, N[(N[(t$95$0 + 1.0), $MachinePrecision] + N[(y * N[(t$95$0 * N[(x * N[(y * N[(0.5 + N[(t$95$0 * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(x \cdot y\right)\\
\left(t\_0 + 1\right) + y \cdot \left(t\_0 \cdot \left(x \cdot \left(y \cdot \left(0.5 + t\_0 \cdot 0.16666666666666666\right)\right)\right)\right)
\end{array}
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
Simplified69.5%
distribute-rgt-inN/A
*-lft-identityN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
Applied egg-rr69.9%
Final simplification69.9%
(FPCore (x y)
:precision binary64
(if (<= y 1.4e-133)
1.0
(if (<= y 7.8e+135)
(+ 1.0 (* (* y y) (* y (* y (* 0.5 (* x x))))))
(* y (* x (* 0.5 (* x (* y (* y y)))))))))
double code(double x, double y) {
double tmp;
if (y <= 1.4e-133) {
tmp = 1.0;
} else if (y <= 7.8e+135) {
tmp = 1.0 + ((y * y) * (y * (y * (0.5 * (x * x)))));
} else {
tmp = y * (x * (0.5 * (x * (y * (y * y)))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.4d-133) then
tmp = 1.0d0
else if (y <= 7.8d+135) then
tmp = 1.0d0 + ((y * y) * (y * (y * (0.5d0 * (x * x)))))
else
tmp = y * (x * (0.5d0 * (x * (y * (y * y)))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 1.4e-133) {
tmp = 1.0;
} else if (y <= 7.8e+135) {
tmp = 1.0 + ((y * y) * (y * (y * (0.5 * (x * x)))));
} else {
tmp = y * (x * (0.5 * (x * (y * (y * y)))));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 1.4e-133: tmp = 1.0 elif y <= 7.8e+135: tmp = 1.0 + ((y * y) * (y * (y * (0.5 * (x * x))))) else: tmp = y * (x * (0.5 * (x * (y * (y * y))))) return tmp
function code(x, y) tmp = 0.0 if (y <= 1.4e-133) tmp = 1.0; elseif (y <= 7.8e+135) tmp = Float64(1.0 + Float64(Float64(y * y) * Float64(y * Float64(y * Float64(0.5 * Float64(x * x)))))); else tmp = Float64(y * Float64(x * Float64(0.5 * Float64(x * Float64(y * Float64(y * y)))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 1.4e-133) tmp = 1.0; elseif (y <= 7.8e+135) tmp = 1.0 + ((y * y) * (y * (y * (0.5 * (x * x))))); else tmp = y * (x * (0.5 * (x * (y * (y * y))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 1.4e-133], 1.0, If[LessEqual[y, 7.8e+135], N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * N[(0.5 * N[(x * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(x * N[(0.5 * N[(x * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.4 \cdot 10^{-133}:\\
\;\;\;\;1\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{+135}:\\
\;\;\;\;1 + \left(y \cdot y\right) \cdot \left(y \cdot \left(y \cdot \left(0.5 \cdot \left(x \cdot x\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot \left(0.5 \cdot \left(x \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if y < 1.3999999999999999e-133Initial program 100.0%
Applied egg-rr60.0%
if 1.3999999999999999e-133 < y < 7.80000000000000064e135Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
fma-defineN/A
associate-*r*N/A
unpow2N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
fma-defineN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
Simplified63.8%
Taylor expanded in y around inf
associate-*r*N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6469.4%
Simplified69.4%
if 7.80000000000000064e135 < y Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
fma-defineN/A
associate-*r*N/A
unpow2N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
fma-defineN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
Simplified59.0%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6459.0%
Applied egg-rr59.0%
Taylor expanded in y around inf
associate-*r*N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Simplified59.0%
(FPCore (x y)
:precision binary64
(if (<= y 6.5e-79)
(+ (* y (* x y)) 1.0)
(if (<= y 1e+103)
(+ 1.0 (* x (* (* x x) (* (* y y) (* y 0.16666666666666666)))))
(* y (* x (* 0.5 (* x (* y (* y y)))))))))
double code(double x, double y) {
double tmp;
if (y <= 6.5e-79) {
tmp = (y * (x * y)) + 1.0;
} else if (y <= 1e+103) {
tmp = 1.0 + (x * ((x * x) * ((y * y) * (y * 0.16666666666666666))));
} else {
tmp = y * (x * (0.5 * (x * (y * (y * y)))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 6.5d-79) then
tmp = (y * (x * y)) + 1.0d0
else if (y <= 1d+103) then
tmp = 1.0d0 + (x * ((x * x) * ((y * y) * (y * 0.16666666666666666d0))))
else
tmp = y * (x * (0.5d0 * (x * (y * (y * y)))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 6.5e-79) {
tmp = (y * (x * y)) + 1.0;
} else if (y <= 1e+103) {
tmp = 1.0 + (x * ((x * x) * ((y * y) * (y * 0.16666666666666666))));
} else {
tmp = y * (x * (0.5 * (x * (y * (y * y)))));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 6.5e-79: tmp = (y * (x * y)) + 1.0 elif y <= 1e+103: tmp = 1.0 + (x * ((x * x) * ((y * y) * (y * 0.16666666666666666)))) else: tmp = y * (x * (0.5 * (x * (y * (y * y))))) return tmp
function code(x, y) tmp = 0.0 if (y <= 6.5e-79) tmp = Float64(Float64(y * Float64(x * y)) + 1.0); elseif (y <= 1e+103) tmp = Float64(1.0 + Float64(x * Float64(Float64(x * x) * Float64(Float64(y * y) * Float64(y * 0.16666666666666666))))); else tmp = Float64(y * Float64(x * Float64(0.5 * Float64(x * Float64(y * Float64(y * y)))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 6.5e-79) tmp = (y * (x * y)) + 1.0; elseif (y <= 1e+103) tmp = 1.0 + (x * ((x * x) * ((y * y) * (y * 0.16666666666666666)))); else tmp = y * (x * (0.5 * (x * (y * (y * y))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 6.5e-79], N[(N[(y * N[(x * y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], If[LessEqual[y, 1e+103], N[(1.0 + N[(x * N[(N[(x * x), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(x * N[(0.5 * N[(x * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.5 \cdot 10^{-79}:\\
\;\;\;\;y \cdot \left(x \cdot y\right) + 1\\
\mathbf{elif}\;y \leq 10^{+103}:\\
\;\;\;\;1 + x \cdot \left(\left(x \cdot x\right) \cdot \left(\left(y \cdot y\right) \cdot \left(y \cdot 0.16666666666666666\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot \left(0.5 \cdot \left(x \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if y < 6.5000000000000003e-79Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6469.4%
Simplified69.4%
if 6.5000000000000003e-79 < y < 1e103Initial program 100.0%
Applied egg-rr93.9%
Taylor expanded in x around 0
Simplified60.2%
Taylor expanded in y around inf
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow3N/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6460.2%
Simplified60.2%
if 1e103 < y Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
fma-defineN/A
associate-*r*N/A
unpow2N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
fma-defineN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
Simplified57.1%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6457.1%
Applied egg-rr57.1%
Taylor expanded in y around inf
associate-*r*N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Simplified60.0%
Final simplification67.1%
(FPCore (x y)
:precision binary64
(+
1.0
(*
x
(*
(* y y)
(* (* x (* y y)) (+ 0.5 (* y (* x (* y 0.16666666666666666)))))))))
double code(double x, double y) {
return 1.0 + (x * ((y * y) * ((x * (y * y)) * (0.5 + (y * (x * (y * 0.16666666666666666)))))));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + (x * ((y * y) * ((x * (y * y)) * (0.5d0 + (y * (x * (y * 0.16666666666666666d0)))))))
end function
public static double code(double x, double y) {
return 1.0 + (x * ((y * y) * ((x * (y * y)) * (0.5 + (y * (x * (y * 0.16666666666666666)))))));
}
def code(x, y): return 1.0 + (x * ((y * y) * ((x * (y * y)) * (0.5 + (y * (x * (y * 0.16666666666666666)))))))
function code(x, y) return Float64(1.0 + Float64(x * Float64(Float64(y * y) * Float64(Float64(x * Float64(y * y)) * Float64(0.5 + Float64(y * Float64(x * Float64(y * 0.16666666666666666)))))))) end
function tmp = code(x, y) tmp = 1.0 + (x * ((y * y) * ((x * (y * y)) * (0.5 + (y * (x * (y * 0.16666666666666666))))))); end
code[x_, y_] := N[(1.0 + N[(x * N[(N[(y * y), $MachinePrecision] * N[(N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision] * N[(0.5 + N[(y * N[(x * N[(y * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + x \cdot \left(\left(y \cdot y\right) \cdot \left(\left(x \cdot \left(y \cdot y\right)\right) \cdot \left(0.5 + y \cdot \left(x \cdot \left(y \cdot 0.16666666666666666\right)\right)\right)\right)\right)
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
Simplified69.5%
distribute-rgt-inN/A
*-lft-identityN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
Applied egg-rr69.9%
associate-*r*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Applied egg-rr69.9%
Taylor expanded in y around 0
Simplified69.5%
Final simplification69.5%
(FPCore (x y) :precision binary64 (let* ((t_0 (* y (* x y)))) (+ 1.0 (* y (* t_0 (* x (* y (+ 0.5 (* t_0 0.16666666666666666)))))))))
double code(double x, double y) {
double t_0 = y * (x * y);
return 1.0 + (y * (t_0 * (x * (y * (0.5 + (t_0 * 0.16666666666666666))))));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
t_0 = y * (x * y)
code = 1.0d0 + (y * (t_0 * (x * (y * (0.5d0 + (t_0 * 0.16666666666666666d0))))))
end function
public static double code(double x, double y) {
double t_0 = y * (x * y);
return 1.0 + (y * (t_0 * (x * (y * (0.5 + (t_0 * 0.16666666666666666))))));
}
def code(x, y): t_0 = y * (x * y) return 1.0 + (y * (t_0 * (x * (y * (0.5 + (t_0 * 0.16666666666666666))))))
function code(x, y) t_0 = Float64(y * Float64(x * y)) return Float64(1.0 + Float64(y * Float64(t_0 * Float64(x * Float64(y * Float64(0.5 + Float64(t_0 * 0.16666666666666666))))))) end
function tmp = code(x, y) t_0 = y * (x * y); tmp = 1.0 + (y * (t_0 * (x * (y * (0.5 + (t_0 * 0.16666666666666666)))))); end
code[x_, y_] := Block[{t$95$0 = N[(y * N[(x * y), $MachinePrecision]), $MachinePrecision]}, N[(1.0 + N[(y * N[(t$95$0 * N[(x * N[(y * N[(0.5 + N[(t$95$0 * 0.16666666666666666), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := y \cdot \left(x \cdot y\right)\\
1 + y \cdot \left(t\_0 \cdot \left(x \cdot \left(y \cdot \left(0.5 + t\_0 \cdot 0.16666666666666666\right)\right)\right)\right)
\end{array}
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
Simplified69.5%
distribute-rgt-inN/A
*-lft-identityN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
Applied egg-rr69.9%
Taylor expanded in y around 0
Simplified69.5%
Final simplification69.5%
(FPCore (x y) :precision binary64 (if (<= y 4.7e+104) (+ (* y (* x y)) 1.0) (* y (* x (* 0.5 (* x (* y (* y y))))))))
double code(double x, double y) {
double tmp;
if (y <= 4.7e+104) {
tmp = (y * (x * y)) + 1.0;
} else {
tmp = y * (x * (0.5 * (x * (y * (y * y)))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 4.7d+104) then
tmp = (y * (x * y)) + 1.0d0
else
tmp = y * (x * (0.5d0 * (x * (y * (y * y)))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 4.7e+104) {
tmp = (y * (x * y)) + 1.0;
} else {
tmp = y * (x * (0.5 * (x * (y * (y * y)))));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4.7e+104: tmp = (y * (x * y)) + 1.0 else: tmp = y * (x * (0.5 * (x * (y * (y * y))))) return tmp
function code(x, y) tmp = 0.0 if (y <= 4.7e+104) tmp = Float64(Float64(y * Float64(x * y)) + 1.0); else tmp = Float64(y * Float64(x * Float64(0.5 * Float64(x * Float64(y * Float64(y * y)))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 4.7e+104) tmp = (y * (x * y)) + 1.0; else tmp = y * (x * (0.5 * (x * (y * (y * y))))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4.7e+104], N[(N[(y * N[(x * y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision], N[(y * N[(x * N[(0.5 * N[(x * N[(y * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.7 \cdot 10^{+104}:\\
\;\;\;\;y \cdot \left(x \cdot y\right) + 1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(x \cdot \left(0.5 \cdot \left(x \cdot \left(y \cdot \left(y \cdot y\right)\right)\right)\right)\right)\\
\end{array}
\end{array}
if y < 4.70000000000000017e104Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6467.3%
Simplified67.3%
if 4.70000000000000017e104 < y Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
fma-defineN/A
associate-*r*N/A
unpow2N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
fma-defineN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
Simplified57.1%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6457.1%
Applied egg-rr57.1%
Taylor expanded in y around inf
associate-*r*N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
associate-*r*N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
unpow2N/A
unpow3N/A
*-lowering-*.f64N/A
*-commutativeN/A
unpow2N/A
associate-*l*N/A
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-lowering-*.f64N/A
Simplified60.0%
Final simplification66.4%
(FPCore (x y) :precision binary64 (+ 1.0 (* (* y y) (* x (+ 1.0 (* 0.5 (* x (* y y))))))))
double code(double x, double y) {
return 1.0 + ((y * y) * (x * (1.0 + (0.5 * (x * (y * y))))));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((y * y) * (x * (1.0d0 + (0.5d0 * (x * (y * y))))))
end function
public static double code(double x, double y) {
return 1.0 + ((y * y) * (x * (1.0 + (0.5 * (x * (y * y))))));
}
def code(x, y): return 1.0 + ((y * y) * (x * (1.0 + (0.5 * (x * (y * y))))))
function code(x, y) return Float64(1.0 + Float64(Float64(y * y) * Float64(x * Float64(1.0 + Float64(0.5 * Float64(x * Float64(y * y))))))) end
function tmp = code(x, y) tmp = 1.0 + ((y * y) * (x * (1.0 + (0.5 * (x * (y * y)))))); end
code[x_, y_] := N[(1.0 + N[(N[(y * y), $MachinePrecision] * N[(x * N[(1.0 + N[(0.5 * N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \left(y \cdot y\right) \cdot \left(x \cdot \left(1 + 0.5 \cdot \left(x \cdot \left(y \cdot y\right)\right)\right)\right)
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
fma-defineN/A
associate-*r*N/A
unpow2N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
fma-defineN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
Simplified68.3%
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6468.6%
Applied egg-rr68.6%
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6469.0%
Applied egg-rr69.0%
Final simplification69.0%
(FPCore (x y) :precision binary64 (+ 1.0 (* (* y (* x y)) (* y (* x (* y 0.5))))))
double code(double x, double y) {
return 1.0 + ((y * (x * y)) * (y * (x * (y * 0.5))));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 + ((y * (x * y)) * (y * (x * (y * 0.5d0))))
end function
public static double code(double x, double y) {
return 1.0 + ((y * (x * y)) * (y * (x * (y * 0.5))));
}
def code(x, y): return 1.0 + ((y * (x * y)) * (y * (x * (y * 0.5))))
function code(x, y) return Float64(1.0 + Float64(Float64(y * Float64(x * y)) * Float64(y * Float64(x * Float64(y * 0.5))))) end
function tmp = code(x, y) tmp = 1.0 + ((y * (x * y)) * (y * (x * (y * 0.5)))); end
code[x_, y_] := N[(1.0 + N[(N[(y * N[(x * y), $MachinePrecision]), $MachinePrecision] * N[(y * N[(x * N[(y * 0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
1 + \left(y \cdot \left(x \cdot y\right)\right) \cdot \left(y \cdot \left(x \cdot \left(y \cdot 0.5\right)\right)\right)
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
distribute-lft-inN/A
associate-+l+N/A
*-commutativeN/A
associate-*r*N/A
+-commutativeN/A
fma-defineN/A
associate-*r*N/A
unpow2N/A
metadata-evalN/A
pow-sqrN/A
associate-*l*N/A
*-commutativeN/A
fma-defineN/A
associate-*r*N/A
*-commutativeN/A
+-commutativeN/A
Simplified68.3%
Taylor expanded in y around inf
associate-*r*N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6468.0%
Simplified68.0%
(FPCore (x y) :precision binary64 (if (<= y 2.45e+91) 1.0 (* x (* y y))))
double code(double x, double y) {
double tmp;
if (y <= 2.45e+91) {
tmp = 1.0;
} else {
tmp = x * (y * y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.45d+91) then
tmp = 1.0d0
else
tmp = x * (y * y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.45e+91) {
tmp = 1.0;
} else {
tmp = x * (y * y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.45e+91: tmp = 1.0 else: tmp = x * (y * y) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.45e+91) tmp = 1.0; else tmp = Float64(x * Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.45e+91) tmp = 1.0; else tmp = x * (y * y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.45e+91], 1.0, N[(x * N[(y * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.45 \cdot 10^{+91}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(y \cdot y\right)\\
\end{array}
\end{array}
if y < 2.45000000000000015e91Initial program 100.0%
Applied egg-rr59.5%
if 2.45000000000000015e91 < y Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6443.0%
Simplified43.0%
Taylor expanded in y around inf
*-lowering-*.f64N/A
unpow2N/A
*-lowering-*.f6448.5%
Simplified48.5%
(FPCore (x y) :precision binary64 (if (<= y 7.5e+135) 1.0 (* x y)))
double code(double x, double y) {
double tmp;
if (y <= 7.5e+135) {
tmp = 1.0;
} else {
tmp = x * y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 7.5d+135) then
tmp = 1.0d0
else
tmp = x * y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 7.5e+135) {
tmp = 1.0;
} else {
tmp = x * y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 7.5e+135: tmp = 1.0 else: tmp = x * y return tmp
function code(x, y) tmp = 0.0 if (y <= 7.5e+135) tmp = 1.0; else tmp = Float64(x * y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 7.5e+135) tmp = 1.0; else tmp = x * y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 7.5e+135], 1.0, N[(x * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 7.5 \cdot 10^{+135}:\\
\;\;\;\;1\\
\mathbf{else}:\\
\;\;\;\;x \cdot y\\
\end{array}
\end{array}
if y < 7.49999999999999947e135Initial program 100.0%
Applied egg-rr57.5%
if 7.49999999999999947e135 < y Initial program 100.0%
Applied egg-rr83.9%
Taylor expanded in x around 0
distribute-rgt-inN/A
*-commutativeN/A
associate-+r+N/A
associate-*l*N/A
*-commutativeN/A
associate-*l*N/A
unpow2N/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
associate-+r+N/A
distribute-rgt-inN/A
+-lowering-+.f64N/A
distribute-rgt-inN/A
associate-*l*N/A
associate-*r*N/A
unpow2N/A
*-commutativeN/A
Simplified47.2%
Taylor expanded in x around inf
unpow2N/A
associate-*l*N/A
*-lowering-*.f64N/A
+-commutativeN/A
distribute-rgt-inN/A
associate-*l/N/A
associate-/l*N/A
*-rgt-identityN/A
associate-*r/N/A
rgt-mult-inverseN/A
*-rgt-identityN/A
associate-*r*N/A
*-commutativeN/A
*-lft-identityN/A
unpow2N/A
associate-*r*N/A
associate-*l*N/A
distribute-rgt-inN/A
*-lowering-*.f64N/A
+-lowering-+.f64N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6447.3%
Simplified47.3%
Taylor expanded in x around 0
*-lowering-*.f6427.8%
Simplified27.8%
(FPCore (x y) :precision binary64 (+ (* y (* x y)) 1.0))
double code(double x, double y) {
return (y * (x * y)) + 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (y * (x * y)) + 1.0d0
end function
public static double code(double x, double y) {
return (y * (x * y)) + 1.0;
}
def code(x, y): return (y * (x * y)) + 1.0
function code(x, y) return Float64(Float64(y * Float64(x * y)) + 1.0) end
function tmp = code(x, y) tmp = (y * (x * y)) + 1.0; end
code[x_, y_] := N[(N[(y * N[(x * y), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \left(x \cdot y\right) + 1
\end{array}
Initial program 100.0%
Taylor expanded in x around 0
+-lowering-+.f64N/A
unpow2N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6463.8%
Simplified63.8%
Final simplification63.8%
(FPCore (x y) :precision binary64 1.0)
double code(double x, double y) {
return 1.0;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0
end function
public static double code(double x, double y) {
return 1.0;
}
def code(x, y): return 1.0
function code(x, y) return 1.0 end
function tmp = code(x, y) tmp = 1.0; end
code[x_, y_] := 1.0
\begin{array}{l}
\\
1
\end{array}
Initial program 100.0%
Applied egg-rr52.4%
herbie shell --seed 2024161
(FPCore (x y)
:name "Data.Random.Distribution.Normal:normalF from random-fu-0.2.6.2"
:precision binary64
(exp (* (* x y) y)))