
(FPCore (x y z) :precision binary64 (+ (* x y) (* (- x 1.0) z)))
double code(double x, double y, double z) {
return (x * y) + ((x - 1.0) * z);
}
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) + ((x - 1.0d0) * z)
end function
public static double code(double x, double y, double z) {
return (x * y) + ((x - 1.0) * z);
}
def code(x, y, z): return (x * y) + ((x - 1.0) * z)
function code(x, y, z) return Float64(Float64(x * y) + Float64(Float64(x - 1.0) * z)) end
function tmp = code(x, y, z) tmp = (x * y) + ((x - 1.0) * z); end
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] + N[(N[(x - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot y + \left(x - 1\right) \cdot z
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ (* x y) (* (- x 1.0) z)))
double code(double x, double y, double z) {
return (x * y) + ((x - 1.0) * z);
}
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) + ((x - 1.0d0) * z)
end function
public static double code(double x, double y, double z) {
return (x * y) + ((x - 1.0) * z);
}
def code(x, y, z): return (x * y) + ((x - 1.0) * z)
function code(x, y, z) return Float64(Float64(x * y) + Float64(Float64(x - 1.0) * z)) end
function tmp = code(x, y, z) tmp = (x * y) + ((x - 1.0) * z); end
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] + N[(N[(x - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot y + \left(x - 1\right) \cdot z
\end{array}
(FPCore (x y z) :precision binary64 (- (* x (+ z y)) z))
double code(double x, double y, double z) {
return (x * (z + y)) - z;
}
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 + y)) - z
end function
public static double code(double x, double y, double z) {
return (x * (z + y)) - z;
}
def code(x, y, z): return (x * (z + y)) - z
function code(x, y, z) return Float64(Float64(x * Float64(z + y)) - z) end
function tmp = code(x, y, z) tmp = (x * (z + y)) - z; end
code[x_, y_, z_] := N[(N[(x * N[(z + y), $MachinePrecision]), $MachinePrecision] - z), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(z + y\right) - z
\end{array}
Initial program 98.8%
*-commutative98.8%
distribute-rgt-out--98.8%
cancel-sign-sub-inv98.8%
metadata-eval98.8%
neg-mul-198.8%
associate-+r+98.8%
unsub-neg98.8%
+-commutative98.8%
distribute-lft-out100.0%
Simplified100.0%
Final simplification100.0%
(FPCore (x y z)
:precision binary64
(if (<= x -1.52e+159)
(* x z)
(if (<= x -1860.0)
(* x y)
(if (<= x -2.1e-79)
(- z)
(if (<= x -3.2e-135)
(* x y)
(if (<= x 5.7e-39)
(- z)
(if (or (<= x 2.35e+96) (not (<= x 2.8e+136)))
(* x y)
(* x z))))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -1.52e+159) {
tmp = x * z;
} else if (x <= -1860.0) {
tmp = x * y;
} else if (x <= -2.1e-79) {
tmp = -z;
} else if (x <= -3.2e-135) {
tmp = x * y;
} else if (x <= 5.7e-39) {
tmp = -z;
} else if ((x <= 2.35e+96) || !(x <= 2.8e+136)) {
tmp = x * y;
} else {
tmp = x * 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 (x <= (-1.52d+159)) then
tmp = x * z
else if (x <= (-1860.0d0)) then
tmp = x * y
else if (x <= (-2.1d-79)) then
tmp = -z
else if (x <= (-3.2d-135)) then
tmp = x * y
else if (x <= 5.7d-39) then
tmp = -z
else if ((x <= 2.35d+96) .or. (.not. (x <= 2.8d+136))) then
tmp = x * y
else
tmp = x * z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -1.52e+159) {
tmp = x * z;
} else if (x <= -1860.0) {
tmp = x * y;
} else if (x <= -2.1e-79) {
tmp = -z;
} else if (x <= -3.2e-135) {
tmp = x * y;
} else if (x <= 5.7e-39) {
tmp = -z;
} else if ((x <= 2.35e+96) || !(x <= 2.8e+136)) {
tmp = x * y;
} else {
tmp = x * z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -1.52e+159: tmp = x * z elif x <= -1860.0: tmp = x * y elif x <= -2.1e-79: tmp = -z elif x <= -3.2e-135: tmp = x * y elif x <= 5.7e-39: tmp = -z elif (x <= 2.35e+96) or not (x <= 2.8e+136): tmp = x * y else: tmp = x * z return tmp
function code(x, y, z) tmp = 0.0 if (x <= -1.52e+159) tmp = Float64(x * z); elseif (x <= -1860.0) tmp = Float64(x * y); elseif (x <= -2.1e-79) tmp = Float64(-z); elseif (x <= -3.2e-135) tmp = Float64(x * y); elseif (x <= 5.7e-39) tmp = Float64(-z); elseif ((x <= 2.35e+96) || !(x <= 2.8e+136)) tmp = Float64(x * y); else tmp = Float64(x * z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -1.52e+159) tmp = x * z; elseif (x <= -1860.0) tmp = x * y; elseif (x <= -2.1e-79) tmp = -z; elseif (x <= -3.2e-135) tmp = x * y; elseif (x <= 5.7e-39) tmp = -z; elseif ((x <= 2.35e+96) || ~((x <= 2.8e+136))) tmp = x * y; else tmp = x * z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -1.52e+159], N[(x * z), $MachinePrecision], If[LessEqual[x, -1860.0], N[(x * y), $MachinePrecision], If[LessEqual[x, -2.1e-79], (-z), If[LessEqual[x, -3.2e-135], N[(x * y), $MachinePrecision], If[LessEqual[x, 5.7e-39], (-z), If[Or[LessEqual[x, 2.35e+96], N[Not[LessEqual[x, 2.8e+136]], $MachinePrecision]], N[(x * y), $MachinePrecision], N[(x * z), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.52 \cdot 10^{+159}:\\
\;\;\;\;x \cdot z\\
\mathbf{elif}\;x \leq -1860:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \leq -2.1 \cdot 10^{-79}:\\
\;\;\;\;-z\\
\mathbf{elif}\;x \leq -3.2 \cdot 10^{-135}:\\
\;\;\;\;x \cdot y\\
\mathbf{elif}\;x \leq 5.7 \cdot 10^{-39}:\\
\;\;\;\;-z\\
\mathbf{elif}\;x \leq 2.35 \cdot 10^{+96} \lor \neg \left(x \leq 2.8 \cdot 10^{+136}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;x \cdot z\\
\end{array}
\end{array}
if x < -1.5199999999999999e159 or 2.35e96 < x < 2.8000000000000002e136Initial program 93.2%
Taylor expanded in y around 0 73.7%
Taylor expanded in x around inf 73.7%
*-commutative73.7%
Simplified73.7%
if -1.5199999999999999e159 < x < -1860 or -2.0999999999999999e-79 < x < -3.2e-135 or 5.6999999999999997e-39 < x < 2.35e96 or 2.8000000000000002e136 < x Initial program 100.0%
Taylor expanded in y around inf 70.3%
if -1860 < x < -2.0999999999999999e-79 or -3.2e-135 < x < 5.6999999999999997e-39Initial program 100.0%
Taylor expanded in x around 0 81.5%
mul-1-neg81.5%
Simplified81.5%
Final simplification75.2%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ z y))))
(if (<= x -1950.0)
t_0
(if (<= x -3e-77)
(* z (+ x -1.0))
(if (<= x -5.6e-135)
t_0
(if (<= x 1.8e-37) (- z) (+ (* x y) (* x z))))))))
double code(double x, double y, double z) {
double t_0 = x * (z + y);
double tmp;
if (x <= -1950.0) {
tmp = t_0;
} else if (x <= -3e-77) {
tmp = z * (x + -1.0);
} else if (x <= -5.6e-135) {
tmp = t_0;
} else if (x <= 1.8e-37) {
tmp = -z;
} else {
tmp = (x * y) + (x * 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) :: t_0
real(8) :: tmp
t_0 = x * (z + y)
if (x <= (-1950.0d0)) then
tmp = t_0
else if (x <= (-3d-77)) then
tmp = z * (x + (-1.0d0))
else if (x <= (-5.6d-135)) then
tmp = t_0
else if (x <= 1.8d-37) then
tmp = -z
else
tmp = (x * y) + (x * z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (z + y);
double tmp;
if (x <= -1950.0) {
tmp = t_0;
} else if (x <= -3e-77) {
tmp = z * (x + -1.0);
} else if (x <= -5.6e-135) {
tmp = t_0;
} else if (x <= 1.8e-37) {
tmp = -z;
} else {
tmp = (x * y) + (x * z);
}
return tmp;
}
def code(x, y, z): t_0 = x * (z + y) tmp = 0 if x <= -1950.0: tmp = t_0 elif x <= -3e-77: tmp = z * (x + -1.0) elif x <= -5.6e-135: tmp = t_0 elif x <= 1.8e-37: tmp = -z else: tmp = (x * y) + (x * z) return tmp
function code(x, y, z) t_0 = Float64(x * Float64(z + y)) tmp = 0.0 if (x <= -1950.0) tmp = t_0; elseif (x <= -3e-77) tmp = Float64(z * Float64(x + -1.0)); elseif (x <= -5.6e-135) tmp = t_0; elseif (x <= 1.8e-37) tmp = Float64(-z); else tmp = Float64(Float64(x * y) + Float64(x * z)); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (z + y); tmp = 0.0; if (x <= -1950.0) tmp = t_0; elseif (x <= -3e-77) tmp = z * (x + -1.0); elseif (x <= -5.6e-135) tmp = t_0; elseif (x <= 1.8e-37) tmp = -z; else tmp = (x * y) + (x * z); end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1950.0], t$95$0, If[LessEqual[x, -3e-77], N[(z * N[(x + -1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.6e-135], t$95$0, If[LessEqual[x, 1.8e-37], (-z), N[(N[(x * y), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(z + y\right)\\
\mathbf{if}\;x \leq -1950:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -3 \cdot 10^{-77}:\\
\;\;\;\;z \cdot \left(x + -1\right)\\
\mathbf{elif}\;x \leq -5.6 \cdot 10^{-135}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-37}:\\
\;\;\;\;-z\\
\mathbf{else}:\\
\;\;\;\;x \cdot y + x \cdot z\\
\end{array}
\end{array}
if x < -1950 or -3.00000000000000016e-77 < x < -5.60000000000000047e-135Initial program 96.3%
Taylor expanded in x around inf 96.4%
+-commutative96.4%
Simplified96.4%
if -1950 < x < -3.00000000000000016e-77Initial program 100.0%
Taylor expanded in y around 0 80.5%
if -5.60000000000000047e-135 < x < 1.80000000000000004e-37Initial program 100.0%
Taylor expanded in x around 0 83.4%
mul-1-neg83.4%
Simplified83.4%
if 1.80000000000000004e-37 < x Initial program 100.0%
Taylor expanded in x around inf 98.3%
*-commutative98.3%
Simplified98.3%
Final simplification91.9%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1.58e-9)
(not
(or (<= x -1.05e-79) (and (not (<= x -5.6e-135)) (<= x 1.35e-29)))))
(* x (+ z y))
(- z)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1.58e-9) || !((x <= -1.05e-79) || (!(x <= -5.6e-135) && (x <= 1.35e-29)))) {
tmp = x * (z + 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 ((x <= (-1.58d-9)) .or. (.not. (x <= (-1.05d-79)) .or. (.not. (x <= (-5.6d-135))) .and. (x <= 1.35d-29))) then
tmp = x * (z + y)
else
tmp = -z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1.58e-9) || !((x <= -1.05e-79) || (!(x <= -5.6e-135) && (x <= 1.35e-29)))) {
tmp = x * (z + y);
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1.58e-9) or not ((x <= -1.05e-79) or (not (x <= -5.6e-135) and (x <= 1.35e-29))): tmp = x * (z + y) else: tmp = -z return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1.58e-9) || !((x <= -1.05e-79) || (!(x <= -5.6e-135) && (x <= 1.35e-29)))) tmp = Float64(x * Float64(z + y)); else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1.58e-9) || ~(((x <= -1.05e-79) || (~((x <= -5.6e-135)) && (x <= 1.35e-29))))) tmp = x * (z + y); else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1.58e-9], N[Not[Or[LessEqual[x, -1.05e-79], And[N[Not[LessEqual[x, -5.6e-135]], $MachinePrecision], LessEqual[x, 1.35e-29]]]], $MachinePrecision]], N[(x * N[(z + y), $MachinePrecision]), $MachinePrecision], (-z)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.58 \cdot 10^{-9} \lor \neg \left(x \leq -1.05 \cdot 10^{-79} \lor \neg \left(x \leq -5.6 \cdot 10^{-135}\right) \land x \leq 1.35 \cdot 10^{-29}\right):\\
\;\;\;\;x \cdot \left(z + y\right)\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if x < -1.5799999999999999e-9 or -1.05e-79 < x < -5.60000000000000047e-135 or 1.35000000000000011e-29 < x Initial program 98.1%
Taylor expanded in x around inf 97.0%
+-commutative97.0%
Simplified97.0%
if -1.5799999999999999e-9 < x < -1.05e-79 or -5.60000000000000047e-135 < x < 1.35000000000000011e-29Initial program 100.0%
Taylor expanded in x around 0 82.2%
mul-1-neg82.2%
Simplified82.2%
Final simplification91.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* x (+ z y))))
(if (<= x -2550.0)
t_0
(if (<= x -1.1e-79)
(* z (+ x -1.0))
(if (or (<= x -5.6e-135) (not (<= x 2e-26))) t_0 (- z))))))
double code(double x, double y, double z) {
double t_0 = x * (z + y);
double tmp;
if (x <= -2550.0) {
tmp = t_0;
} else if (x <= -1.1e-79) {
tmp = z * (x + -1.0);
} else if ((x <= -5.6e-135) || !(x <= 2e-26)) {
tmp = t_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) :: t_0
real(8) :: tmp
t_0 = x * (z + y)
if (x <= (-2550.0d0)) then
tmp = t_0
else if (x <= (-1.1d-79)) then
tmp = z * (x + (-1.0d0))
else if ((x <= (-5.6d-135)) .or. (.not. (x <= 2d-26))) then
tmp = t_0
else
tmp = -z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x * (z + y);
double tmp;
if (x <= -2550.0) {
tmp = t_0;
} else if (x <= -1.1e-79) {
tmp = z * (x + -1.0);
} else if ((x <= -5.6e-135) || !(x <= 2e-26)) {
tmp = t_0;
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z): t_0 = x * (z + y) tmp = 0 if x <= -2550.0: tmp = t_0 elif x <= -1.1e-79: tmp = z * (x + -1.0) elif (x <= -5.6e-135) or not (x <= 2e-26): tmp = t_0 else: tmp = -z return tmp
function code(x, y, z) t_0 = Float64(x * Float64(z + y)) tmp = 0.0 if (x <= -2550.0) tmp = t_0; elseif (x <= -1.1e-79) tmp = Float64(z * Float64(x + -1.0)); elseif ((x <= -5.6e-135) || !(x <= 2e-26)) tmp = t_0; else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z) t_0 = x * (z + y); tmp = 0.0; if (x <= -2550.0) tmp = t_0; elseif (x <= -1.1e-79) tmp = z * (x + -1.0); elseif ((x <= -5.6e-135) || ~((x <= 2e-26))) tmp = t_0; else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x * N[(z + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2550.0], t$95$0, If[LessEqual[x, -1.1e-79], N[(z * N[(x + -1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -5.6e-135], N[Not[LessEqual[x, 2e-26]], $MachinePrecision]], t$95$0, (-z)]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x \cdot \left(z + y\right)\\
\mathbf{if}\;x \leq -2550:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{-79}:\\
\;\;\;\;z \cdot \left(x + -1\right)\\
\mathbf{elif}\;x \leq -5.6 \cdot 10^{-135} \lor \neg \left(x \leq 2 \cdot 10^{-26}\right):\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if x < -2550 or -1.0999999999999999e-79 < x < -5.60000000000000047e-135 or 2.0000000000000001e-26 < x Initial program 98.1%
Taylor expanded in x around inf 97.4%
+-commutative97.4%
Simplified97.4%
if -2550 < x < -1.0999999999999999e-79Initial program 100.0%
Taylor expanded in y around 0 80.5%
if -5.60000000000000047e-135 < x < 2.0000000000000001e-26Initial program 100.0%
Taylor expanded in x around 0 83.4%
mul-1-neg83.4%
Simplified83.4%
Final simplification91.9%
(FPCore (x y z)
:precision binary64
(if (or (<= x -1860.0)
(not
(or (<= x -1.55e-78) (and (not (<= x -5.5e-135)) (<= x 3.1e-28)))))
(* x y)
(- z)))
double code(double x, double y, double z) {
double tmp;
if ((x <= -1860.0) || !((x <= -1.55e-78) || (!(x <= -5.5e-135) && (x <= 3.1e-28)))) {
tmp = x * 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 ((x <= (-1860.0d0)) .or. (.not. (x <= (-1.55d-78)) .or. (.not. (x <= (-5.5d-135))) .and. (x <= 3.1d-28))) then
tmp = x * y
else
tmp = -z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -1860.0) || !((x <= -1.55e-78) || (!(x <= -5.5e-135) && (x <= 3.1e-28)))) {
tmp = x * y;
} else {
tmp = -z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -1860.0) or not ((x <= -1.55e-78) or (not (x <= -5.5e-135) and (x <= 3.1e-28))): tmp = x * y else: tmp = -z return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -1860.0) || !((x <= -1.55e-78) || (!(x <= -5.5e-135) && (x <= 3.1e-28)))) tmp = Float64(x * y); else tmp = Float64(-z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -1860.0) || ~(((x <= -1.55e-78) || (~((x <= -5.5e-135)) && (x <= 3.1e-28))))) tmp = x * y; else tmp = -z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -1860.0], N[Not[Or[LessEqual[x, -1.55e-78], And[N[Not[LessEqual[x, -5.5e-135]], $MachinePrecision], LessEqual[x, 3.1e-28]]]], $MachinePrecision]], N[(x * y), $MachinePrecision], (-z)]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1860 \lor \neg \left(x \leq -1.55 \cdot 10^{-78} \lor \neg \left(x \leq -5.5 \cdot 10^{-135}\right) \land x \leq 3.1 \cdot 10^{-28}\right):\\
\;\;\;\;x \cdot y\\
\mathbf{else}:\\
\;\;\;\;-z\\
\end{array}
\end{array}
if x < -1860 or -1.55000000000000009e-78 < x < -5.4999999999999999e-135 or 3.09999999999999992e-28 < x Initial program 98.1%
Taylor expanded in y around inf 58.8%
if -1860 < x < -1.55000000000000009e-78 or -5.4999999999999999e-135 < x < 3.09999999999999992e-28Initial program 100.0%
Taylor expanded in x around 0 81.5%
mul-1-neg81.5%
Simplified81.5%
Final simplification67.5%
(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 Float64(-z) end
function tmp = code(x, y, z) tmp = -z; end
code[x_, y_, z_] := (-z)
\begin{array}{l}
\\
-z
\end{array}
Initial program 98.8%
Taylor expanded in x around 0 34.4%
mul-1-neg34.4%
Simplified34.4%
Final simplification34.4%
herbie shell --seed 2024018
(FPCore (x y z)
:name "Graphics.Rendering.Chart.Drawing:drawTextsR from Chart-1.5.3"
:precision binary64
(+ (* x y) (* (- x 1.0) z)))