
(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 9 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 (- z (fma x -3.0 (* y -2.0))))
double code(double x, double y, double z) {
return z - fma(x, -3.0, (y * -2.0));
}
function code(x, y, z) return Float64(z - fma(x, -3.0, Float64(y * -2.0))) end
code[x_, y_, z_] := N[(z - N[(x * -3.0 + N[(y * -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
z - \mathsf{fma}\left(x, -3, y \cdot -2\right)
\end{array}
Initial program 100.0%
+-commutative100.0%
associate-+l+100.0%
remove-double-neg100.0%
unsub-neg100.0%
+-commutative100.0%
+-commutative100.0%
associate-+l+100.0%
associate-+r+100.0%
associate-+r+100.0%
distribute-neg-in100.0%
distribute-neg-out100.0%
neg-mul-1100.0%
count-2100.0%
distribute-lft-neg-in100.0%
metadata-eval100.0%
metadata-eval100.0%
distribute-rgt-out100.0%
distribute-neg-out100.0%
fma-define100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z)
:precision binary64
(if (<= z -7.1e+53)
z
(if (<= z 1.32e-213)
(* y 2.0)
(if (<= z 2e-106)
(* x 3.0)
(if (<= z 3.3e-51) (* y 2.0) (if (<= z 1.38e+29) (* x 3.0) z))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -7.1e+53) {
tmp = z;
} else if (z <= 1.32e-213) {
tmp = y * 2.0;
} else if (z <= 2e-106) {
tmp = x * 3.0;
} else if (z <= 3.3e-51) {
tmp = y * 2.0;
} else if (z <= 1.38e+29) {
tmp = x * 3.0;
} 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 (z <= (-7.1d+53)) then
tmp = z
else if (z <= 1.32d-213) then
tmp = y * 2.0d0
else if (z <= 2d-106) then
tmp = x * 3.0d0
else if (z <= 3.3d-51) then
tmp = y * 2.0d0
else if (z <= 1.38d+29) then
tmp = x * 3.0d0
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -7.1e+53) {
tmp = z;
} else if (z <= 1.32e-213) {
tmp = y * 2.0;
} else if (z <= 2e-106) {
tmp = x * 3.0;
} else if (z <= 3.3e-51) {
tmp = y * 2.0;
} else if (z <= 1.38e+29) {
tmp = x * 3.0;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -7.1e+53: tmp = z elif z <= 1.32e-213: tmp = y * 2.0 elif z <= 2e-106: tmp = x * 3.0 elif z <= 3.3e-51: tmp = y * 2.0 elif z <= 1.38e+29: tmp = x * 3.0 else: tmp = z return tmp
function code(x, y, z) tmp = 0.0 if (z <= -7.1e+53) tmp = z; elseif (z <= 1.32e-213) tmp = Float64(y * 2.0); elseif (z <= 2e-106) tmp = Float64(x * 3.0); elseif (z <= 3.3e-51) tmp = Float64(y * 2.0); elseif (z <= 1.38e+29) tmp = Float64(x * 3.0); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -7.1e+53) tmp = z; elseif (z <= 1.32e-213) tmp = y * 2.0; elseif (z <= 2e-106) tmp = x * 3.0; elseif (z <= 3.3e-51) tmp = y * 2.0; elseif (z <= 1.38e+29) tmp = x * 3.0; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -7.1e+53], z, If[LessEqual[z, 1.32e-213], N[(y * 2.0), $MachinePrecision], If[LessEqual[z, 2e-106], N[(x * 3.0), $MachinePrecision], If[LessEqual[z, 3.3e-51], N[(y * 2.0), $MachinePrecision], If[LessEqual[z, 1.38e+29], N[(x * 3.0), $MachinePrecision], z]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.1 \cdot 10^{+53}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 1.32 \cdot 10^{-213}:\\
\;\;\;\;y \cdot 2\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-106}:\\
\;\;\;\;x \cdot 3\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-51}:\\
\;\;\;\;y \cdot 2\\
\mathbf{elif}\;z \leq 1.38 \cdot 10^{+29}:\\
\;\;\;\;x \cdot 3\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -7.09999999999999974e53 or 1.38e29 < z 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 76.1%
if -7.09999999999999974e53 < z < 1.3199999999999999e-213 or 1.99999999999999988e-106 < z < 3.29999999999999973e-51Initial 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 60.4%
if 1.3199999999999999e-213 < z < 1.99999999999999988e-106 or 3.29999999999999973e-51 < z < 1.38e29Initial 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 56.7%
Final simplification65.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -3.2e+64) (not (<= z 1.9e+29))) (+ z (* y 2.0)) (+ x (* 2.0 (+ x y)))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -3.2e+64) || !(z <= 1.9e+29)) {
tmp = z + (y * 2.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) :: tmp
if ((z <= (-3.2d+64)) .or. (.not. (z <= 1.9d+29))) then
tmp = z + (y * 2.0d0)
else
tmp = x + (2.0d0 * (x + y))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -3.2e+64) || !(z <= 1.9e+29)) {
tmp = z + (y * 2.0);
} else {
tmp = x + (2.0 * (x + y));
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -3.2e+64) or not (z <= 1.9e+29): tmp = z + (y * 2.0) else: tmp = x + (2.0 * (x + y)) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -3.2e+64) || !(z <= 1.9e+29)) tmp = Float64(z + Float64(y * 2.0)); else tmp = Float64(x + Float64(2.0 * Float64(x + y))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -3.2e+64) || ~((z <= 1.9e+29))) tmp = z + (y * 2.0); else tmp = x + (2.0 * (x + y)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -3.2e+64], N[Not[LessEqual[z, 1.9e+29]], $MachinePrecision]], N[(z + N[(y * 2.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(2.0 * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+64} \lor \neg \left(z \leq 1.9 \cdot 10^{+29}\right):\\
\;\;\;\;z + y \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x + 2 \cdot \left(x + y\right)\\
\end{array}
\end{array}
if z < -3.20000000000000019e64 or 1.89999999999999985e29 < z 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 90.3%
if -3.20000000000000019e64 < z < 1.89999999999999985e29Initial 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 89.8%
Final simplification90.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -7.5e+53) (not (<= z 1.3e+29))) (+ z (* y 2.0)) (+ (* y 2.0) (* x 3.0))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -7.5e+53) || !(z <= 1.3e+29)) {
tmp = z + (y * 2.0);
} else {
tmp = (y * 2.0) + (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 ((z <= (-7.5d+53)) .or. (.not. (z <= 1.3d+29))) then
tmp = z + (y * 2.0d0)
else
tmp = (y * 2.0d0) + (x * 3.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -7.5e+53) || !(z <= 1.3e+29)) {
tmp = z + (y * 2.0);
} else {
tmp = (y * 2.0) + (x * 3.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -7.5e+53) or not (z <= 1.3e+29): tmp = z + (y * 2.0) else: tmp = (y * 2.0) + (x * 3.0) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -7.5e+53) || !(z <= 1.3e+29)) tmp = Float64(z + Float64(y * 2.0)); else tmp = Float64(Float64(y * 2.0) + Float64(x * 3.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -7.5e+53) || ~((z <= 1.3e+29))) tmp = z + (y * 2.0); else tmp = (y * 2.0) + (x * 3.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -7.5e+53], N[Not[LessEqual[z, 1.3e+29]], $MachinePrecision]], N[(z + N[(y * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(y * 2.0), $MachinePrecision] + N[(x * 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5 \cdot 10^{+53} \lor \neg \left(z \leq 1.3 \cdot 10^{+29}\right):\\
\;\;\;\;z + y \cdot 2\\
\mathbf{else}:\\
\;\;\;\;y \cdot 2 + x \cdot 3\\
\end{array}
\end{array}
if z < -7.4999999999999997e53 or 1.3e29 < z 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 90.3%
if -7.4999999999999997e53 < z < 1.3e29Initial 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 89.8%
Taylor expanded in x around 0 89.8%
Final simplification90.0%
(FPCore (x y z) :precision binary64 (if (or (<= x -6.8e+117) (not (<= x 3.6e+98))) (* x 3.0) (+ z (* y 2.0))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -6.8e+117) || !(x <= 3.6e+98)) {
tmp = x * 3.0;
} else {
tmp = z + (y * 2.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 <= (-6.8d+117)) .or. (.not. (x <= 3.6d+98))) then
tmp = x * 3.0d0
else
tmp = z + (y * 2.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -6.8e+117) || !(x <= 3.6e+98)) {
tmp = x * 3.0;
} else {
tmp = z + (y * 2.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -6.8e+117) or not (x <= 3.6e+98): tmp = x * 3.0 else: tmp = z + (y * 2.0) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -6.8e+117) || !(x <= 3.6e+98)) tmp = Float64(x * 3.0); else tmp = Float64(z + Float64(y * 2.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -6.8e+117) || ~((x <= 3.6e+98))) tmp = x * 3.0; else tmp = z + (y * 2.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -6.8e+117], N[Not[LessEqual[x, 3.6e+98]], $MachinePrecision]], N[(x * 3.0), $MachinePrecision], N[(z + N[(y * 2.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.8 \cdot 10^{+117} \lor \neg \left(x \leq 3.6 \cdot 10^{+98}\right):\\
\;\;\;\;x \cdot 3\\
\mathbf{else}:\\
\;\;\;\;z + y \cdot 2\\
\end{array}
\end{array}
if x < -6.8000000000000002e117 or 3.59999999999999981e98 < 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 63.1%
if -6.8000000000000002e117 < x < 3.59999999999999981e98Initial 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.1%
Final simplification79.3%
(FPCore (x y z) :precision binary64 (if (or (<= y -5.2e+42) (not (<= y 9e+69))) (+ z (* y 2.0)) (+ z (* x 3.0))))
double code(double x, double y, double z) {
double tmp;
if ((y <= -5.2e+42) || !(y <= 9e+69)) {
tmp = z + (y * 2.0);
} 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 <= (-5.2d+42)) .or. (.not. (y <= 9d+69))) then
tmp = z + (y * 2.0d0)
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 <= -5.2e+42) || !(y <= 9e+69)) {
tmp = z + (y * 2.0);
} else {
tmp = z + (x * 3.0);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (y <= -5.2e+42) or not (y <= 9e+69): tmp = z + (y * 2.0) else: tmp = z + (x * 3.0) return tmp
function code(x, y, z) tmp = 0.0 if ((y <= -5.2e+42) || !(y <= 9e+69)) tmp = Float64(z + Float64(y * 2.0)); else tmp = Float64(z + Float64(x * 3.0)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((y <= -5.2e+42) || ~((y <= 9e+69))) tmp = z + (y * 2.0); else tmp = z + (x * 3.0); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[y, -5.2e+42], N[Not[LessEqual[y, 9e+69]], $MachinePrecision]], N[(z + N[(y * 2.0), $MachinePrecision]), $MachinePrecision], N[(z + N[(x * 3.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+42} \lor \neg \left(y \leq 9 \cdot 10^{+69}\right):\\
\;\;\;\;z + y \cdot 2\\
\mathbf{else}:\\
\;\;\;\;z + x \cdot 3\\
\end{array}
\end{array}
if y < -5.1999999999999998e42 or 8.9999999999999999e69 < 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 88.0%
if -5.1999999999999998e42 < y < 8.9999999999999999e69Initial 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 87.4%
Final simplification87.7%
(FPCore (x y z) :precision binary64 (if (<= z -4.3e+58) z (if (<= z 7.5e-21) (* y 2.0) z)))
double code(double x, double y, double z) {
double tmp;
if (z <= -4.3e+58) {
tmp = z;
} else if (z <= 7.5e-21) {
tmp = y * 2.0;
} 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 (z <= (-4.3d+58)) then
tmp = z
else if (z <= 7.5d-21) then
tmp = y * 2.0d0
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -4.3e+58) {
tmp = z;
} else if (z <= 7.5e-21) {
tmp = y * 2.0;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -4.3e+58: tmp = z elif z <= 7.5e-21: tmp = y * 2.0 else: tmp = z return tmp
function code(x, y, z) tmp = 0.0 if (z <= -4.3e+58) tmp = z; elseif (z <= 7.5e-21) tmp = Float64(y * 2.0); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -4.3e+58) tmp = z; elseif (z <= 7.5e-21) tmp = y * 2.0; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -4.3e+58], z, If[LessEqual[z, 7.5e-21], N[(y * 2.0), $MachinePrecision], z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.3 \cdot 10^{+58}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-21}:\\
\;\;\;\;y \cdot 2\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -4.29999999999999991e58 or 7.50000000000000072e-21 < z 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 69.4%
if -4.29999999999999991e58 < z < 7.50000000000000072e-21Initial 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 53.6%
Final simplification60.2%
(FPCore (x y z) :precision binary64 (+ z (+ (* y 2.0) (* x 3.0))))
double code(double x, double y, double z) {
return z + ((y * 2.0) + (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 + ((y * 2.0d0) + (x * 3.0d0))
end function
public static double code(double x, double y, double z) {
return z + ((y * 2.0) + (x * 3.0));
}
def code(x, y, z): return z + ((y * 2.0) + (x * 3.0))
function code(x, y, z) return Float64(z + Float64(Float64(y * 2.0) + Float64(x * 3.0))) end
function tmp = code(x, y, z) tmp = z + ((y * 2.0) + (x * 3.0)); end
code[x_, y_, z_] := N[(z + N[(N[(y * 2.0), $MachinePrecision] + N[(x * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
z + \left(y \cdot 2 + 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 35.2%
Final simplification35.2%
herbie shell --seed 2024062
(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))