
(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 8 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 (+ x y)) (+ x z)))
double code(double x, double y, double z) {
return (2.0 * (x + y)) + (x + z);
}
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 * (x + y)) + (x + z)
end function
public static double code(double x, double y, double z) {
return (2.0 * (x + y)) + (x + z);
}
def code(x, y, z): return (2.0 * (x + y)) + (x + z)
function code(x, y, z) return Float64(Float64(2.0 * Float64(x + y)) + Float64(x + z)) end
function tmp = code(x, y, z) tmp = (2.0 * (x + y)) + (x + z); end
code[x_, y_, z_] := N[(N[(2.0 * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
2 \cdot \left(x + y\right) + \left(x + z\right)
\end{array}
Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z)
:precision binary64
(if (<= y -1.14e+30)
(* 2.0 y)
(if (<= y -3.35e-147)
(* x 3.0)
(if (<= y -2.7e-298)
z
(if (<= y 2.2e-286)
(* x 3.0)
(if (<= y 5.2e-256)
z
(if (<= y 1.12e-148)
(* x 3.0)
(if (<= y 2.4e+59) z (* 2.0 y)))))))))
double code(double x, double y, double z) {
double tmp;
if (y <= -1.14e+30) {
tmp = 2.0 * y;
} else if (y <= -3.35e-147) {
tmp = x * 3.0;
} else if (y <= -2.7e-298) {
tmp = z;
} else if (y <= 2.2e-286) {
tmp = x * 3.0;
} else if (y <= 5.2e-256) {
tmp = z;
} else if (y <= 1.12e-148) {
tmp = x * 3.0;
} else if (y <= 2.4e+59) {
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.14d+30)) then
tmp = 2.0d0 * y
else if (y <= (-3.35d-147)) then
tmp = x * 3.0d0
else if (y <= (-2.7d-298)) then
tmp = z
else if (y <= 2.2d-286) then
tmp = x * 3.0d0
else if (y <= 5.2d-256) then
tmp = z
else if (y <= 1.12d-148) then
tmp = x * 3.0d0
else if (y <= 2.4d+59) 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.14e+30) {
tmp = 2.0 * y;
} else if (y <= -3.35e-147) {
tmp = x * 3.0;
} else if (y <= -2.7e-298) {
tmp = z;
} else if (y <= 2.2e-286) {
tmp = x * 3.0;
} else if (y <= 5.2e-256) {
tmp = z;
} else if (y <= 1.12e-148) {
tmp = x * 3.0;
} else if (y <= 2.4e+59) {
tmp = z;
} else {
tmp = 2.0 * y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= -1.14e+30: tmp = 2.0 * y elif y <= -3.35e-147: tmp = x * 3.0 elif y <= -2.7e-298: tmp = z elif y <= 2.2e-286: tmp = x * 3.0 elif y <= 5.2e-256: tmp = z elif y <= 1.12e-148: tmp = x * 3.0 elif y <= 2.4e+59: tmp = z else: tmp = 2.0 * y return tmp
function code(x, y, z) tmp = 0.0 if (y <= -1.14e+30) tmp = Float64(2.0 * y); elseif (y <= -3.35e-147) tmp = Float64(x * 3.0); elseif (y <= -2.7e-298) tmp = z; elseif (y <= 2.2e-286) tmp = Float64(x * 3.0); elseif (y <= 5.2e-256) tmp = z; elseif (y <= 1.12e-148) tmp = Float64(x * 3.0); elseif (y <= 2.4e+59) 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.14e+30) tmp = 2.0 * y; elseif (y <= -3.35e-147) tmp = x * 3.0; elseif (y <= -2.7e-298) tmp = z; elseif (y <= 2.2e-286) tmp = x * 3.0; elseif (y <= 5.2e-256) tmp = z; elseif (y <= 1.12e-148) tmp = x * 3.0; elseif (y <= 2.4e+59) tmp = z; else tmp = 2.0 * y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, -1.14e+30], N[(2.0 * y), $MachinePrecision], If[LessEqual[y, -3.35e-147], N[(x * 3.0), $MachinePrecision], If[LessEqual[y, -2.7e-298], z, If[LessEqual[y, 2.2e-286], N[(x * 3.0), $MachinePrecision], If[LessEqual[y, 5.2e-256], z, If[LessEqual[y, 1.12e-148], N[(x * 3.0), $MachinePrecision], If[LessEqual[y, 2.4e+59], z, N[(2.0 * y), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.14 \cdot 10^{+30}:\\
\;\;\;\;2 \cdot y\\
\mathbf{elif}\;y \leq -3.35 \cdot 10^{-147}:\\
\;\;\;\;x \cdot 3\\
\mathbf{elif}\;y \leq -2.7 \cdot 10^{-298}:\\
\;\;\;\;z\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-286}:\\
\;\;\;\;x \cdot 3\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-256}:\\
\;\;\;\;z\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{-148}:\\
\;\;\;\;x \cdot 3\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+59}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;2 \cdot y\\
\end{array}
\end{array}
if y < -1.14e30 or 2.4000000000000002e59 < y Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in y around inf 71.2%
if -1.14e30 < y < -3.34999999999999991e-147 or -2.7000000000000001e-298 < y < 2.1999999999999999e-286 or 5.2000000000000002e-256 < y < 1.1199999999999999e-148Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 61.1%
if -3.34999999999999991e-147 < y < -2.7000000000000001e-298 or 2.1999999999999999e-286 < y < 5.2000000000000002e-256 or 1.1199999999999999e-148 < y < 2.4000000000000002e59Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in z around inf 65.8%
Final simplification67.1%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ z (* 2.0 y))))
(if (<= y -2.4e+27)
t_0
(if (<= y 1.25e-16)
(+ z (* x 3.0))
(if (<= y 2.1e+49) t_0 (+ x (* 2.0 (+ x y))))))))
double code(double x, double y, double z) {
double t_0 = z + (2.0 * y);
double tmp;
if (y <= -2.4e+27) {
tmp = t_0;
} else if (y <= 1.25e-16) {
tmp = z + (x * 3.0);
} else if (y <= 2.1e+49) {
tmp = t_0;
} else {
tmp = x + (2.0 * (x + 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) :: t_0
real(8) :: tmp
t_0 = z + (2.0d0 * y)
if (y <= (-2.4d+27)) then
tmp = t_0
else if (y <= 1.25d-16) then
tmp = z + (x * 3.0d0)
else if (y <= 2.1d+49) then
tmp = t_0
else
tmp = x + (2.0d0 * (x + y))
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.4e+27) {
tmp = t_0;
} else if (y <= 1.25e-16) {
tmp = z + (x * 3.0);
} else if (y <= 2.1e+49) {
tmp = t_0;
} else {
tmp = x + (2.0 * (x + y));
}
return tmp;
}
def code(x, y, z): t_0 = z + (2.0 * y) tmp = 0 if y <= -2.4e+27: tmp = t_0 elif y <= 1.25e-16: tmp = z + (x * 3.0) elif y <= 2.1e+49: tmp = t_0 else: tmp = x + (2.0 * (x + y)) return tmp
function code(x, y, z) t_0 = Float64(z + Float64(2.0 * y)) tmp = 0.0 if (y <= -2.4e+27) tmp = t_0; elseif (y <= 1.25e-16) tmp = Float64(z + Float64(x * 3.0)); elseif (y <= 2.1e+49) tmp = t_0; else tmp = Float64(x + Float64(2.0 * Float64(x + y))); end return tmp end
function tmp_2 = code(x, y, z) t_0 = z + (2.0 * y); tmp = 0.0; if (y <= -2.4e+27) tmp = t_0; elseif (y <= 1.25e-16) tmp = z + (x * 3.0); elseif (y <= 2.1e+49) tmp = t_0; else tmp = x + (2.0 * (x + y)); 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.4e+27], t$95$0, If[LessEqual[y, 1.25e-16], N[(z + N[(x * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e+49], t$95$0, N[(x + N[(2.0 * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z + 2 \cdot y\\
\mathbf{if}\;y \leq -2.4 \cdot 10^{+27}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-16}:\\
\;\;\;\;z + x \cdot 3\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{+49}:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;x + 2 \cdot \left(x + y\right)\\
\end{array}
\end{array}
if y < -2.39999999999999998e27 or 1.2500000000000001e-16 < y < 2.10000000000000011e49Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 92.5%
if -2.39999999999999998e27 < y < 1.2500000000000001e-16Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in y around 0 93.7%
if 2.10000000000000011e49 < y Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in z around 0 87.5%
Final simplification91.9%
(FPCore (x y z) :precision binary64 (if (or (<= x -2e+160) (not (<= x 4e+119))) (* x 3.0) (+ z (* 2.0 y))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -2e+160) || !(x <= 4e+119)) {
tmp = x * 3.0;
} else {
tmp = z + (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 ((x <= (-2d+160)) .or. (.not. (x <= 4d+119))) then
tmp = x * 3.0d0
else
tmp = z + (2.0d0 * y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -2e+160) || !(x <= 4e+119)) {
tmp = x * 3.0;
} else {
tmp = z + (2.0 * y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -2e+160) or not (x <= 4e+119): tmp = x * 3.0 else: tmp = z + (2.0 * y) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -2e+160) || !(x <= 4e+119)) tmp = Float64(x * 3.0); else tmp = Float64(z + Float64(2.0 * y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -2e+160) || ~((x <= 4e+119))) tmp = x * 3.0; else tmp = z + (2.0 * y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -2e+160], N[Not[LessEqual[x, 4e+119]], $MachinePrecision]], N[(x * 3.0), $MachinePrecision], N[(z + N[(2.0 * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+160} \lor \neg \left(x \leq 4 \cdot 10^{+119}\right):\\
\;\;\;\;x \cdot 3\\
\mathbf{else}:\\
\;\;\;\;z + 2 \cdot y\\
\end{array}
\end{array}
if x < -2.00000000000000001e160 or 3.99999999999999978e119 < x Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around inf 69.2%
if -2.00000000000000001e160 < x < 3.99999999999999978e119Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 85.7%
Final simplification81.6%
(FPCore (x y z) :precision binary64 (if (or (<= y -2e+29) (not (<= y 3.05e-16))) (+ z (* 2.0 y)) (+ z (* x 3.0))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -2e+29) || !(y <= 3.05e-16)) {
tmp = z + (2.0 * y);
} else {
tmp = z + (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 ((y <= (-2d+29)) .or. (.not. (y <= 3.05d-16))) then
tmp = z + (2.0d0 * y)
else
tmp = z + (x * 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -2e+29) || !(y <= 3.05e-16)) {
tmp = z + (2.0 * y);
} else {
tmp = z + (x * 3.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -2e+29) or not (y <= 3.05e-16): tmp = z + (2.0 * y) else: tmp = z + (x * 3.0) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -2e+29) || !(y <= 3.05e-16)) tmp = Float64(z + Float64(2.0 * y)); else tmp = Float64(z + Float64(x * 3.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -2e+29) || ~((y <= 3.05e-16))) tmp = z + (2.0 * y); else tmp = z + (x * 3.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -2e+29], N[Not[LessEqual[y, 3.05e-16]], $MachinePrecision]], N[(z + N[(2.0 * y), $MachinePrecision]), $MachinePrecision], N[(z + N[(x * 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+29} \lor \neg \left(y \leq 3.05 \cdot 10^{-16}\right):\\
\;\;\;\;z + 2 \cdot y\\
\mathbf{else}:\\
\;\;\;\;z + x \cdot 3\\
\end{array}
\end{array}
if y < -1.99999999999999983e29 or 3.04999999999999976e-16 < y Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 86.8%
if -1.99999999999999983e29 < y < 3.04999999999999976e-16Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in y around 0 93.7%
Final simplification90.0%
(FPCore (x y z) :precision binary64 (if (or (<= y -6.2e+84) (not (<= y 2.85e+57))) (* 2.0 y) z))
double code(double x, double y, double z) {
double tmp;
if ((y <= -6.2e+84) || !(y <= 2.85e+57)) {
tmp = 2.0 * y;
} else {
tmp = z;
}
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 <= (-6.2d+84)) .or. (.not. (y <= 2.85d+57))) then
tmp = 2.0d0 * y
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((y <= -6.2e+84) || !(y <= 2.85e+57)) {
tmp = 2.0 * y;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -6.2e+84) or not (y <= 2.85e+57): tmp = 2.0 * y else: tmp = z return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -6.2e+84) || !(y <= 2.85e+57)) tmp = Float64(2.0 * y); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -6.2e+84) || ~((y <= 2.85e+57))) tmp = 2.0 * y; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -6.2e+84], N[Not[LessEqual[y, 2.85e+57]], $MachinePrecision]], N[(2.0 * y), $MachinePrecision], z]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+84} \lor \neg \left(y \leq 2.85 \cdot 10^{+57}\right):\\
\;\;\;\;2 \cdot y\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if y < -6.20000000000000006e84 or 2.8499999999999999e57 < y Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in y around inf 74.6%
if -6.20000000000000006e84 < y < 2.8499999999999999e57Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in z around inf 49.1%
Final simplification59.7%
(FPCore (x y z) :precision binary64 (+ z (+ (* 2.0 y) (* x 3.0))))
double code(double x, double y, double z) {
return z + ((2.0 * y) + (x * 3.0));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = z + ((2.0d0 * y) + (x * 3.0d0))
end function
public static double code(double x, double y, double z) {
return z + ((2.0 * y) + (x * 3.0));
}
def code(x, y, z): return z + ((2.0 * y) + (x * 3.0))
function code(x, y, z) return Float64(z + Float64(Float64(2.0 * y) + Float64(x * 3.0))) end
function tmp = code(x, y, z) tmp = z + ((2.0 * y) + (x * 3.0)); end
code[x_, y_, z_] := N[(z + N[(N[(2.0 * y), $MachinePrecision] + N[(x * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
z + \left(2 \cdot y + x \cdot 3\right)
\end{array}
Initial program 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
Final simplification100.0%
(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 100.0%
associate-+l+100.0%
associate-+l+100.0%
+-commutative100.0%
count-2100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in z around inf 33.9%
Final simplification33.9%
herbie shell --seed 2024031
(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))