
(FPCore (x y z) :precision binary64 (+ (+ (+ (+ (+ x y) y) x) z) x))
double code(double x, double y, double z) {
return ((((x + y) + y) + x) + z) + x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x + y) + y) + x) + z) + x
end function
public static double code(double x, double y, double z) {
return ((((x + y) + y) + x) + z) + x;
}
def code(x, y, z): return ((((x + y) + y) + x) + z) + x
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x + y) + y) + x) + z) + x) end
function tmp = code(x, y, z) tmp = ((((x + y) + y) + x) + z) + x; end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] + y), $MachinePrecision] + x), $MachinePrecision] + z), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ (+ (+ (+ (+ x y) y) x) z) x))
double code(double x, double y, double z) {
return ((((x + y) + y) + x) + z) + x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((((x + y) + y) + x) + z) + x
end function
public static double code(double x, double y, double z) {
return ((((x + y) + y) + x) + z) + x;
}
def code(x, y, z): return ((((x + y) + y) + x) + z) + x
function code(x, y, z) return Float64(Float64(Float64(Float64(Float64(x + y) + y) + x) + z) + x) end
function tmp = code(x, y, z) tmp = ((((x + y) + y) + x) + z) + x; end
code[x_, y_, z_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] + y), $MachinePrecision] + x), $MachinePrecision] + z), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(\left(\left(x + y\right) + y\right) + x\right) + z\right) + x
\end{array}
(FPCore (x y z) :precision binary64 (+ (+ (* 2.0 y) (+ x z)) (* x 2.0)))
double code(double x, double y, double z) {
return ((2.0 * y) + (x + z)) + (x * 2.0);
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = ((2.0d0 * y) + (x + z)) + (x * 2.0d0)
end function
public static double code(double x, double y, double z) {
return ((2.0 * y) + (x + z)) + (x * 2.0);
}
def code(x, y, z): return ((2.0 * y) + (x + z)) + (x * 2.0)
function code(x, y, z) return Float64(Float64(Float64(2.0 * y) + Float64(x + z)) + Float64(x * 2.0)) end
function tmp = code(x, y, z) tmp = ((2.0 * y) + (x + z)) + (x * 2.0); end
code[x_, y_, z_] := N[(N[(N[(2.0 * y), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(2 \cdot y + \left(x + z\right)\right) + x \cdot 2
\end{array}
Initial program 99.9%
Taylor expanded in x around 0
distribute-lft-outN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6499.9%
Simplified99.9%
associate-+l+N/A
+-commutativeN/A
+-commutativeN/A
+-commutativeN/A
+-commutativeN/A
distribute-rgt-inN/A
*-commutativeN/A
associate-+r+N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
*-lowering-*.f6499.9%
Applied egg-rr99.9%
Final simplification99.9%
(FPCore (x y z)
:precision binary64
(if (<= x -1.02e+76)
(* x 3.0)
(if (<= x -1.06e-185)
(* 2.0 y)
(if (<= x 2.9e-200) z (if (<= x 1.06e+48) (* 2.0 y) (* x 3.0))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.02e+76) {
tmp = x * 3.0;
} else if (x <= -1.06e-185) {
tmp = 2.0 * y;
} else if (x <= 2.9e-200) {
tmp = z;
} else if (x <= 1.06e+48) {
tmp = 2.0 * y;
} else {
tmp = x * 3.0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-1.02d+76)) then
tmp = x * 3.0d0
else if (x <= (-1.06d-185)) then
tmp = 2.0d0 * y
else if (x <= 2.9d-200) then
tmp = z
else if (x <= 1.06d+48) then
tmp = 2.0d0 * y
else
tmp = x * 3.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.02e+76) {
tmp = x * 3.0;
} else if (x <= -1.06e-185) {
tmp = 2.0 * y;
} else if (x <= 2.9e-200) {
tmp = z;
} else if (x <= 1.06e+48) {
tmp = 2.0 * y;
} else {
tmp = x * 3.0;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.02e+76: tmp = x * 3.0 elif x <= -1.06e-185: tmp = 2.0 * y elif x <= 2.9e-200: tmp = z elif x <= 1.06e+48: tmp = 2.0 * y else: tmp = x * 3.0 return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.02e+76) tmp = Float64(x * 3.0); elseif (x <= -1.06e-185) tmp = Float64(2.0 * y); elseif (x <= 2.9e-200) tmp = z; elseif (x <= 1.06e+48) tmp = Float64(2.0 * y); else tmp = Float64(x * 3.0); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.02e+76) tmp = x * 3.0; elseif (x <= -1.06e-185) tmp = 2.0 * y; elseif (x <= 2.9e-200) tmp = z; elseif (x <= 1.06e+48) tmp = 2.0 * y; else tmp = x * 3.0; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.02e+76], N[(x * 3.0), $MachinePrecision], If[LessEqual[x, -1.06e-185], N[(2.0 * y), $MachinePrecision], If[LessEqual[x, 2.9e-200], z, If[LessEqual[x, 1.06e+48], N[(2.0 * y), $MachinePrecision], N[(x * 3.0), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.02 \cdot 10^{+76}:\\
\;\;\;\;x \cdot 3\\
\mathbf{elif}\;x \leq -1.06 \cdot 10^{-185}:\\
\;\;\;\;2 \cdot y\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-200}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 1.06 \cdot 10^{+48}:\\
\;\;\;\;2 \cdot y\\
\mathbf{else}:\\
\;\;\;\;x \cdot 3\\
\end{array}
\end{array}
if x < -1.02000000000000007e76 or 1.06e48 < x Initial program 99.8%
Taylor expanded in x around inf
*-commutativeN/A
*-lowering-*.f6468.4%
Simplified68.4%
if -1.02000000000000007e76 < x < -1.06000000000000004e-185 or 2.9e-200 < x < 1.06e48Initial program 99.9%
Taylor expanded in y around inf
*-lowering-*.f6454.2%
Simplified54.2%
if -1.06000000000000004e-185 < x < 2.9e-200Initial program 100.0%
Taylor expanded in z around inf
Simplified62.0%
(FPCore (x y z) :precision binary64 (let* ((t_0 (+ z (* 2.0 y)))) (if (<= y -2.8e+55) t_0 (if (<= y 3e+76) (+ z (* x 3.0)) t_0))))
double code(double x, double y, double z) {
double t_0 = z + (2.0 * y);
double tmp;
if (y <= -2.8e+55) {
tmp = t_0;
} else if (y <= 3e+76) {
tmp = z + (x * 3.0);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = z + (2.0d0 * y)
if (y <= (-2.8d+55)) then
tmp = t_0
else if (y <= 3d+76) then
tmp = z + (x * 3.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z + (2.0 * y);
double tmp;
if (y <= -2.8e+55) {
tmp = t_0;
} else if (y <= 3e+76) {
tmp = z + (x * 3.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z + (2.0 * y) tmp = 0 if y <= -2.8e+55: tmp = t_0 elif y <= 3e+76: tmp = z + (x * 3.0) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z + Float64(2.0 * y)) tmp = 0.0 if (y <= -2.8e+55) tmp = t_0; elseif (y <= 3e+76) tmp = Float64(z + Float64(x * 3.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z + (2.0 * y); tmp = 0.0; if (y <= -2.8e+55) tmp = t_0; elseif (y <= 3e+76) tmp = z + (x * 3.0); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z + N[(2.0 * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.8e+55], t$95$0, If[LessEqual[y, 3e+76], N[(z + N[(x * 3.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z + 2 \cdot y\\
\mathbf{if}\;y \leq -2.8 \cdot 10^{+55}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 3 \cdot 10^{+76}:\\
\;\;\;\;z + x \cdot 3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -2.8000000000000001e55 or 2.9999999999999998e76 < y Initial program 100.0%
Taylor expanded in x around 0
+-commutativeN/A
+-lowering-+.f64N/A
*-lowering-*.f6489.5%
Simplified89.5%
if -2.8000000000000001e55 < y < 2.9999999999999998e76Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
associate-+l+N/A
distribute-lft1-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6489.9%
Simplified89.9%
Final simplification89.8%
(FPCore (x y z) :precision binary64 (let* ((t_0 (+ x (* 2.0 y)))) (if (<= y -2.4e+56) t_0 (if (<= y 2.2e+78) (+ z (* x 3.0)) t_0))))
double code(double x, double y, double z) {
double t_0 = x + (2.0 * y);
double tmp;
if (y <= -2.4e+56) {
tmp = t_0;
} else if (y <= 2.2e+78) {
tmp = z + (x * 3.0);
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = x + (2.0d0 * y)
if (y <= (-2.4d+56)) then
tmp = t_0
else if (y <= 2.2d+78) then
tmp = z + (x * 3.0d0)
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x + (2.0 * y);
double tmp;
if (y <= -2.4e+56) {
tmp = t_0;
} else if (y <= 2.2e+78) {
tmp = z + (x * 3.0);
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x + (2.0 * y) tmp = 0 if y <= -2.4e+56: tmp = t_0 elif y <= 2.2e+78: tmp = z + (x * 3.0) else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x + Float64(2.0 * y)) tmp = 0.0 if (y <= -2.4e+56) tmp = t_0; elseif (y <= 2.2e+78) tmp = Float64(z + Float64(x * 3.0)); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x + (2.0 * y); tmp = 0.0; if (y <= -2.4e+56) tmp = t_0; elseif (y <= 2.2e+78) tmp = z + (x * 3.0); else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(2.0 * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.4e+56], t$95$0, If[LessEqual[y, 2.2e+78], N[(z + N[(x * 3.0), $MachinePrecision]), $MachinePrecision], t$95$0]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + 2 \cdot y\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+56}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+78}:\\
\;\;\;\;z + x \cdot 3\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -2.40000000000000013e56 or 2.20000000000000014e78 < y Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f6477.5%
Simplified77.5%
if -2.40000000000000013e56 < y < 2.20000000000000014e78Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
associate-+l+N/A
distribute-lft1-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6489.9%
Simplified89.9%
Final simplification85.3%
(FPCore (x y z) :precision binary64 (if (<= y -2.2e+76) (* 2.0 y) (if (<= y 7e+77) (+ z (* x 3.0)) (* 2.0 y))))
double code(double x, double y, double z) {
double tmp;
if (y <= -2.2e+76) {
tmp = 2.0 * y;
} else if (y <= 7e+77) {
tmp = z + (x * 3.0);
} else {
tmp = 2.0 * y;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= (-2.2d+76)) then
tmp = 2.0d0 * y
else if (y <= 7d+77) then
tmp = z + (x * 3.0d0)
else
tmp = 2.0d0 * y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -2.2e+76) {
tmp = 2.0 * y;
} else if (y <= 7e+77) {
tmp = z + (x * 3.0);
} else {
tmp = 2.0 * y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -2.2e+76: tmp = 2.0 * y elif y <= 7e+77: tmp = z + (x * 3.0) else: tmp = 2.0 * y return tmp
function code(x, y, z) tmp = 0.0 if (y <= -2.2e+76) tmp = Float64(2.0 * y); elseif (y <= 7e+77) tmp = Float64(z + Float64(x * 3.0)); else tmp = Float64(2.0 * y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -2.2e+76) tmp = 2.0 * y; elseif (y <= 7e+77) tmp = z + (x * 3.0); else tmp = 2.0 * y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -2.2e+76], N[(2.0 * y), $MachinePrecision], If[LessEqual[y, 7e+77], N[(z + N[(x * 3.0), $MachinePrecision]), $MachinePrecision], N[(2.0 * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.2 \cdot 10^{+76}:\\
\;\;\;\;2 \cdot y\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+77}:\\
\;\;\;\;z + x \cdot 3\\
\mathbf{else}:\\
\;\;\;\;2 \cdot y\\
\end{array}
\end{array}
if y < -2.2e76 or 7.0000000000000003e77 < y Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f6478.5%
Simplified78.5%
if -2.2e76 < y < 7.0000000000000003e77Initial program 99.9%
Taylor expanded in y around 0
+-commutativeN/A
associate-+l+N/A
distribute-lft1-inN/A
metadata-evalN/A
+-lowering-+.f64N/A
*-commutativeN/A
*-lowering-*.f6488.1%
Simplified88.1%
(FPCore (x y z) :precision binary64 (if (<= y -1.3e+53) (* 2.0 y) (if (<= y 4.1e+76) (+ x z) (* 2.0 y))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.3e+53) {
tmp = 2.0 * y;
} else if (y <= 4.1e+76) {
tmp = x + z;
} else {
tmp = 2.0 * y;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= (-1.3d+53)) then
tmp = 2.0d0 * y
else if (y <= 4.1d+76) then
tmp = x + z
else
tmp = 2.0d0 * y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -1.3e+53) {
tmp = 2.0 * y;
} else if (y <= 4.1e+76) {
tmp = x + z;
} else {
tmp = 2.0 * y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1.3e+53: tmp = 2.0 * y elif y <= 4.1e+76: tmp = x + z else: tmp = 2.0 * y return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1.3e+53) tmp = Float64(2.0 * y); elseif (y <= 4.1e+76) tmp = Float64(x + z); else tmp = Float64(2.0 * y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -1.3e+53) tmp = 2.0 * y; elseif (y <= 4.1e+76) tmp = x + z; else tmp = 2.0 * y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1.3e+53], N[(2.0 * y), $MachinePrecision], If[LessEqual[y, 4.1e+76], N[(x + z), $MachinePrecision], N[(2.0 * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+53}:\\
\;\;\;\;2 \cdot y\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{+76}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;2 \cdot y\\
\end{array}
\end{array}
if y < -1.29999999999999999e53 or 4.0999999999999998e76 < y Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f6476.1%
Simplified76.1%
if -1.29999999999999999e53 < y < 4.0999999999999998e76Initial program 99.9%
Taylor expanded in z around inf
Simplified51.5%
Final simplification60.7%
(FPCore (x y z) :precision binary64 (if (<= y -1.8e+55) (* 2.0 y) (if (<= y 1.3e+76) z (* 2.0 y))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.8e+55) {
tmp = 2.0 * y;
} else if (y <= 1.3e+76) {
tmp = z;
} else {
tmp = 2.0 * y;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= (-1.8d+55)) then
tmp = 2.0d0 * y
else if (y <= 1.3d+76) then
tmp = z
else
tmp = 2.0d0 * y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= -1.8e+55) {
tmp = 2.0 * y;
} else if (y <= 1.3e+76) {
tmp = z;
} else {
tmp = 2.0 * y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1.8e+55: tmp = 2.0 * y elif y <= 1.3e+76: tmp = z else: tmp = 2.0 * y return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1.8e+55) tmp = Float64(2.0 * y); elseif (y <= 1.3e+76) tmp = z; else tmp = Float64(2.0 * y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= -1.8e+55) tmp = 2.0 * y; elseif (y <= 1.3e+76) tmp = z; else tmp = 2.0 * y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1.8e+55], N[(2.0 * y), $MachinePrecision], If[LessEqual[y, 1.3e+76], z, N[(2.0 * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+55}:\\
\;\;\;\;2 \cdot y\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+76}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;2 \cdot y\\
\end{array}
\end{array}
if y < -1.79999999999999994e55 or 1.3e76 < y Initial program 100.0%
Taylor expanded in y around inf
*-lowering-*.f6475.4%
Simplified75.4%
if -1.79999999999999994e55 < y < 1.3e76Initial program 99.9%
Taylor expanded in z around inf
Simplified45.0%
(FPCore (x y z) :precision binary64 (+ x (+ z (* 2.0 (+ x y)))))
double code(double x, double y, double z) {
return x + (z + (2.0 * (x + y)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x + (z + (2.0d0 * (x + y)))
end function
public static double code(double x, double y, double z) {
return x + (z + (2.0 * (x + y)));
}
def code(x, y, z): return x + (z + (2.0 * (x + y)))
function code(x, y, z) return Float64(x + Float64(z + Float64(2.0 * Float64(x + y)))) end
function tmp = code(x, y, z) tmp = x + (z + (2.0 * (x + y))); end
code[x_, y_, z_] := N[(x + N[(z + N[(2.0 * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z + 2 \cdot \left(x + y\right)\right)
\end{array}
Initial program 99.9%
Taylor expanded in x around 0
distribute-lft-outN/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f6499.9%
Simplified99.9%
Final simplification99.9%
(FPCore (x y z) :precision binary64 z)
double code(double x, double y, double z) {
return z;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = z
end function
public static double code(double x, double y, double z) {
return z;
}
def code(x, y, z): return z
function code(x, y, z) return z end
function tmp = code(x, y, z) tmp = z; end
code[x_, y_, z_] := z
\begin{array}{l}
\\
z
\end{array}
Initial program 99.9%
Taylor expanded in z around inf
Simplified33.4%
(FPCore (x y z) :precision binary64 x)
double code(double x, double y, double z) {
return x;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = x
end function
public static double code(double x, double y, double z) {
return x;
}
def code(x, y, z): return x
function code(x, y, z) return x end
function tmp = code(x, y, z) tmp = x; end
code[x_, y_, z_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 99.9%
Taylor expanded in z around inf
Simplified38.3%
Taylor expanded in z around 0
Simplified7.6%
herbie shell --seed 2024185
(FPCore (x y z)
:name "Graphics.Rendering.Plot.Render.Plot.Legend:renderLegendInside from plot-0.2.3.4"
:precision binary64
(+ (+ (+ (+ (+ x y) y) x) z) x))