
(FPCore (x y z) :precision binary64 (+ (* x y) (* (- 1.0 x) z)))
double code(double x, double y, double z) {
return (x * y) + ((1.0 - 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 = (x * y) + ((1.0d0 - x) * z)
end function
public static double code(double x, double y, double z) {
return (x * y) + ((1.0 - x) * z);
}
def code(x, y, z): return (x * y) + ((1.0 - x) * z)
function code(x, y, z) return Float64(Float64(x * y) + Float64(Float64(1.0 - x) * z)) end
function tmp = code(x, y, z) tmp = (x * y) + ((1.0 - x) * z); end
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot y + \left(1 - x\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) (* (- 1.0 x) z)))
double code(double x, double y, double z) {
return (x * y) + ((1.0 - 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 = (x * y) + ((1.0d0 - x) * z)
end function
public static double code(double x, double y, double z) {
return (x * y) + ((1.0 - x) * z);
}
def code(x, y, z): return (x * y) + ((1.0 - x) * z)
function code(x, y, z) return Float64(Float64(x * y) + Float64(Float64(1.0 - x) * z)) end
function tmp = code(x, y, z) tmp = (x * y) + ((1.0 - x) * z); end
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] + N[(N[(1.0 - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot y + \left(1 - x\right) \cdot z
\end{array}
(FPCore (x y z) :precision binary64 (+ z (* (- y z) x)))
double code(double x, double y, double z) {
return z + ((y - 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 = z + ((y - z) * x)
end function
public static double code(double x, double y, double z) {
return z + ((y - z) * x);
}
def code(x, y, z): return z + ((y - z) * x)
function code(x, y, z) return Float64(z + Float64(Float64(y - z) * x)) end
function tmp = code(x, y, z) tmp = z + ((y - z) * x); end
code[x_, y_, z_] := N[(z + N[(N[(y - z), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
z + \left(y - z\right) \cdot x
\end{array}
Initial program 98.0%
sub-neg98.0%
+-commutative98.0%
distribute-lft1-in98.0%
associate-+r+98.0%
+-commutative98.0%
*-commutative98.0%
neg-mul-198.0%
associate-*r*98.0%
*-commutative98.0%
distribute-rgt-out100.0%
fma-def100.0%
+-commutative100.0%
*-commutative100.0%
neg-mul-1100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
Final simplification100.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (- x))))
(if (<= x -4.3e+43)
t_0
(if (<= x -1.15e-24)
(* y x)
(if (<= x 1.15e-65)
z
(if (<= x 1.8e-36)
(* y x)
(if (<= x 2.15e-11)
z
(if (or (<= x 3.5e+71)
(and (not (<= x 1.22e+182)) (<= x 1.85e+205)))
(* y x)
t_0))))))))
double code(double x, double y, double z) {
double t_0 = z * -x;
double tmp;
if (x <= -4.3e+43) {
tmp = t_0;
} else if (x <= -1.15e-24) {
tmp = y * x;
} else if (x <= 1.15e-65) {
tmp = z;
} else if (x <= 1.8e-36) {
tmp = y * x;
} else if (x <= 2.15e-11) {
tmp = z;
} else if ((x <= 3.5e+71) || (!(x <= 1.22e+182) && (x <= 1.85e+205))) {
tmp = y * x;
} 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 * -x
if (x <= (-4.3d+43)) then
tmp = t_0
else if (x <= (-1.15d-24)) then
tmp = y * x
else if (x <= 1.15d-65) then
tmp = z
else if (x <= 1.8d-36) then
tmp = y * x
else if (x <= 2.15d-11) then
tmp = z
else if ((x <= 3.5d+71) .or. (.not. (x <= 1.22d+182)) .and. (x <= 1.85d+205)) then
tmp = y * x
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = z * -x;
double tmp;
if (x <= -4.3e+43) {
tmp = t_0;
} else if (x <= -1.15e-24) {
tmp = y * x;
} else if (x <= 1.15e-65) {
tmp = z;
} else if (x <= 1.8e-36) {
tmp = y * x;
} else if (x <= 2.15e-11) {
tmp = z;
} else if ((x <= 3.5e+71) || (!(x <= 1.22e+182) && (x <= 1.85e+205))) {
tmp = y * x;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = z * -x tmp = 0 if x <= -4.3e+43: tmp = t_0 elif x <= -1.15e-24: tmp = y * x elif x <= 1.15e-65: tmp = z elif x <= 1.8e-36: tmp = y * x elif x <= 2.15e-11: tmp = z elif (x <= 3.5e+71) or (not (x <= 1.22e+182) and (x <= 1.85e+205)): tmp = y * x else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(z * Float64(-x)) tmp = 0.0 if (x <= -4.3e+43) tmp = t_0; elseif (x <= -1.15e-24) tmp = Float64(y * x); elseif (x <= 1.15e-65) tmp = z; elseif (x <= 1.8e-36) tmp = Float64(y * x); elseif (x <= 2.15e-11) tmp = z; elseif ((x <= 3.5e+71) || (!(x <= 1.22e+182) && (x <= 1.85e+205))) tmp = Float64(y * x); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = z * -x; tmp = 0.0; if (x <= -4.3e+43) tmp = t_0; elseif (x <= -1.15e-24) tmp = y * x; elseif (x <= 1.15e-65) tmp = z; elseif (x <= 1.8e-36) tmp = y * x; elseif (x <= 2.15e-11) tmp = z; elseif ((x <= 3.5e+71) || (~((x <= 1.22e+182)) && (x <= 1.85e+205))) tmp = y * x; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * (-x)), $MachinePrecision]}, If[LessEqual[x, -4.3e+43], t$95$0, If[LessEqual[x, -1.15e-24], N[(y * x), $MachinePrecision], If[LessEqual[x, 1.15e-65], z, If[LessEqual[x, 1.8e-36], N[(y * x), $MachinePrecision], If[LessEqual[x, 2.15e-11], z, If[Or[LessEqual[x, 3.5e+71], And[N[Not[LessEqual[x, 1.22e+182]], $MachinePrecision], LessEqual[x, 1.85e+205]]], N[(y * x), $MachinePrecision], t$95$0]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := z \cdot \left(-x\right)\\
\mathbf{if}\;x \leq -4.3 \cdot 10^{+43}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq -1.15 \cdot 10^{-24}:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;x \leq 1.15 \cdot 10^{-65}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-36}:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;x \leq 2.15 \cdot 10^{-11}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 3.5 \cdot 10^{+71} \lor \neg \left(x \leq 1.22 \cdot 10^{+182}\right) \land x \leq 1.85 \cdot 10^{+205}:\\
\;\;\;\;y \cdot x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -4.3e43 or 3.4999999999999999e71 < x < 1.22e182 or 1.8499999999999999e205 < x Initial program 95.5%
sub-neg95.5%
+-commutative95.5%
distribute-lft1-in95.5%
associate-+r+95.5%
+-commutative95.5%
*-commutative95.5%
neg-mul-195.5%
associate-*r*95.5%
*-commutative95.5%
distribute-rgt-out100.0%
fma-def100.0%
+-commutative100.0%
*-commutative100.0%
neg-mul-1100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around inf 100.0%
Taylor expanded in y around 0 67.1%
mul-1-neg67.1%
distribute-rgt-neg-in67.1%
Simplified67.1%
if -4.3e43 < x < -1.1500000000000001e-24 or 1.15e-65 < x < 1.80000000000000016e-36 or 2.15000000000000001e-11 < x < 3.4999999999999999e71 or 1.22e182 < x < 1.8499999999999999e205Initial program 97.8%
Taylor expanded in y around inf 72.6%
if -1.1500000000000001e-24 < x < 1.15e-65 or 1.80000000000000016e-36 < x < 2.15000000000000001e-11Initial program 100.0%
Taylor expanded in x around 0 78.3%
Final simplification73.4%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (- y z) x)))
(if (<= x -1.3e-24)
t_0
(if (<= x 4.8e-61)
(* z (- 1.0 x))
(if (<= x 7.6e-36) (* y x) (if (<= x 7.1e-12) z t_0))))))
double code(double x, double y, double z) {
double t_0 = (y - z) * x;
double tmp;
if (x <= -1.3e-24) {
tmp = t_0;
} else if (x <= 4.8e-61) {
tmp = z * (1.0 - x);
} else if (x <= 7.6e-36) {
tmp = y * x;
} else if (x <= 7.1e-12) {
tmp = z;
} 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 = (y - z) * x
if (x <= (-1.3d-24)) then
tmp = t_0
else if (x <= 4.8d-61) then
tmp = z * (1.0d0 - x)
else if (x <= 7.6d-36) then
tmp = y * x
else if (x <= 7.1d-12) then
tmp = z
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (y - z) * x;
double tmp;
if (x <= -1.3e-24) {
tmp = t_0;
} else if (x <= 4.8e-61) {
tmp = z * (1.0 - x);
} else if (x <= 7.6e-36) {
tmp = y * x;
} else if (x <= 7.1e-12) {
tmp = z;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = (y - z) * x tmp = 0 if x <= -1.3e-24: tmp = t_0 elif x <= 4.8e-61: tmp = z * (1.0 - x) elif x <= 7.6e-36: tmp = y * x elif x <= 7.1e-12: tmp = z else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(Float64(y - z) * x) tmp = 0.0 if (x <= -1.3e-24) tmp = t_0; elseif (x <= 4.8e-61) tmp = Float64(z * Float64(1.0 - x)); elseif (x <= 7.6e-36) tmp = Float64(y * x); elseif (x <= 7.1e-12) tmp = z; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = (y - z) * x; tmp = 0.0; if (x <= -1.3e-24) tmp = t_0; elseif (x <= 4.8e-61) tmp = z * (1.0 - x); elseif (x <= 7.6e-36) tmp = y * x; elseif (x <= 7.1e-12) tmp = z; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(y - z), $MachinePrecision] * x), $MachinePrecision]}, If[LessEqual[x, -1.3e-24], t$95$0, If[LessEqual[x, 4.8e-61], N[(z * N[(1.0 - x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 7.6e-36], N[(y * x), $MachinePrecision], If[LessEqual[x, 7.1e-12], z, t$95$0]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \left(y - z\right) \cdot x\\
\mathbf{if}\;x \leq -1.3 \cdot 10^{-24}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{-61}:\\
\;\;\;\;z \cdot \left(1 - x\right)\\
\mathbf{elif}\;x \leq 7.6 \cdot 10^{-36}:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;x \leq 7.1 \cdot 10^{-12}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if x < -1.3e-24 or 7.1e-12 < x Initial program 96.1%
sub-neg96.1%
+-commutative96.1%
distribute-lft1-in96.1%
associate-+r+96.1%
+-commutative96.1%
*-commutative96.1%
neg-mul-196.1%
associate-*r*96.1%
*-commutative96.1%
distribute-rgt-out100.0%
fma-def100.0%
+-commutative100.0%
*-commutative100.0%
neg-mul-1100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around inf 99.0%
if -1.3e-24 < x < 4.8000000000000002e-61Initial program 100.0%
Taylor expanded in y around 0 77.4%
if 4.8000000000000002e-61 < x < 7.59999999999999942e-36Initial program 100.0%
Taylor expanded in y around inf 85.4%
if 7.59999999999999942e-36 < x < 7.1e-12Initial program 100.0%
Taylor expanded in x around 0 100.0%
Final simplification88.9%
(FPCore (x y z)
:precision binary64
(if (<= x -3.6e-25)
(* y x)
(if (<= x 6.5e-61)
z
(if (<= x 1.8e-36) (* y x) (if (<= x 2.6e-18) z (* y x))))))
double code(double x, double y, double z) {
double tmp;
if (x <= -3.6e-25) {
tmp = y * x;
} else if (x <= 6.5e-61) {
tmp = z;
} else if (x <= 1.8e-36) {
tmp = y * x;
} else if (x <= 2.6e-18) {
tmp = z;
} else {
tmp = y * x;
}
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 <= (-3.6d-25)) then
tmp = y * x
else if (x <= 6.5d-61) then
tmp = z
else if (x <= 1.8d-36) then
tmp = y * x
else if (x <= 2.6d-18) then
tmp = z
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -3.6e-25) {
tmp = y * x;
} else if (x <= 6.5e-61) {
tmp = z;
} else if (x <= 1.8e-36) {
tmp = y * x;
} else if (x <= 2.6e-18) {
tmp = z;
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -3.6e-25: tmp = y * x elif x <= 6.5e-61: tmp = z elif x <= 1.8e-36: tmp = y * x elif x <= 2.6e-18: tmp = z else: tmp = y * x return tmp
function code(x, y, z) tmp = 0.0 if (x <= -3.6e-25) tmp = Float64(y * x); elseif (x <= 6.5e-61) tmp = z; elseif (x <= 1.8e-36) tmp = Float64(y * x); elseif (x <= 2.6e-18) tmp = z; else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -3.6e-25) tmp = y * x; elseif (x <= 6.5e-61) tmp = z; elseif (x <= 1.8e-36) tmp = y * x; elseif (x <= 2.6e-18) tmp = z; else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -3.6e-25], N[(y * x), $MachinePrecision], If[LessEqual[x, 6.5e-61], z, If[LessEqual[x, 1.8e-36], N[(y * x), $MachinePrecision], If[LessEqual[x, 2.6e-18], z, N[(y * x), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{-25}:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;x \leq 6.5 \cdot 10^{-61}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-36}:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{-18}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if x < -3.5999999999999999e-25 or 6.4999999999999994e-61 < x < 1.80000000000000016e-36 or 2.6e-18 < x Initial program 96.3%
Taylor expanded in y around inf 51.0%
if -3.5999999999999999e-25 < x < 6.4999999999999994e-61 or 1.80000000000000016e-36 < x < 2.6e-18Initial program 100.0%
Taylor expanded in x around 0 78.3%
Final simplification63.9%
(FPCore (x y z) :precision binary64 (if (or (<= z -7e-182) (not (<= z 1.2e-58))) (* z (- 1.0 x)) (* y x)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -7e-182) || !(z <= 1.2e-58)) {
tmp = z * (1.0 - x);
} else {
tmp = y * x;
}
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 <= (-7d-182)) .or. (.not. (z <= 1.2d-58))) then
tmp = z * (1.0d0 - x)
else
tmp = y * x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -7e-182) || !(z <= 1.2e-58)) {
tmp = z * (1.0 - x);
} else {
tmp = y * x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -7e-182) or not (z <= 1.2e-58): tmp = z * (1.0 - x) else: tmp = y * x return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -7e-182) || !(z <= 1.2e-58)) tmp = Float64(z * Float64(1.0 - x)); else tmp = Float64(y * x); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -7e-182) || ~((z <= 1.2e-58))) tmp = z * (1.0 - x); else tmp = y * x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -7e-182], N[Not[LessEqual[z, 1.2e-58]], $MachinePrecision]], N[(z * N[(1.0 - x), $MachinePrecision]), $MachinePrecision], N[(y * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7 \cdot 10^{-182} \lor \neg \left(z \leq 1.2 \cdot 10^{-58}\right):\\
\;\;\;\;z \cdot \left(1 - x\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot x\\
\end{array}
\end{array}
if z < -6.99999999999999966e-182 or 1.2e-58 < z Initial program 97.1%
Taylor expanded in y around 0 83.1%
if -6.99999999999999966e-182 < z < 1.2e-58Initial program 100.0%
Taylor expanded in y around inf 74.8%
Final simplification80.4%
(FPCore (x y z) :precision binary64 (if (or (<= x -3.35e+16) (not (<= x 0.43))) (* (- y z) x) (+ z (* y x))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -3.35e+16) || !(x <= 0.43)) {
tmp = (y - z) * x;
} else {
tmp = z + (y * x);
}
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 <= (-3.35d+16)) .or. (.not. (x <= 0.43d0))) then
tmp = (y - z) * x
else
tmp = z + (y * x)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -3.35e+16) || !(x <= 0.43)) {
tmp = (y - z) * x;
} else {
tmp = z + (y * x);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -3.35e+16) or not (x <= 0.43): tmp = (y - z) * x else: tmp = z + (y * x) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -3.35e+16) || !(x <= 0.43)) tmp = Float64(Float64(y - z) * x); else tmp = Float64(z + Float64(y * x)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -3.35e+16) || ~((x <= 0.43))) tmp = (y - z) * x; else tmp = z + (y * x); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -3.35e+16], N[Not[LessEqual[x, 0.43]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * x), $MachinePrecision], N[(z + N[(y * x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.35 \cdot 10^{+16} \lor \neg \left(x \leq 0.43\right):\\
\;\;\;\;\left(y - z\right) \cdot x\\
\mathbf{else}:\\
\;\;\;\;z + y \cdot x\\
\end{array}
\end{array}
if x < -3.35e16 or 0.429999999999999993 < x Initial program 95.9%
sub-neg95.9%
+-commutative95.9%
distribute-lft1-in95.9%
associate-+r+95.9%
+-commutative95.9%
*-commutative95.9%
neg-mul-195.9%
associate-*r*95.9%
*-commutative95.9%
distribute-rgt-out100.0%
fma-def100.0%
+-commutative100.0%
*-commutative100.0%
neg-mul-1100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around inf 99.7%
if -3.35e16 < x < 0.429999999999999993Initial program 100.0%
sub-neg100.0%
+-commutative100.0%
distribute-lft1-in100.0%
associate-+r+100.0%
+-commutative100.0%
*-commutative100.0%
neg-mul-1100.0%
associate-*r*100.0%
*-commutative100.0%
distribute-rgt-out100.0%
fma-def100.0%
+-commutative100.0%
*-commutative100.0%
neg-mul-1100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in y around inf 99.6%
Final simplification99.6%
(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 98.0%
Taylor expanded in x around 0 38.9%
Final simplification38.9%
herbie shell --seed 2023199
(FPCore (x y z)
:name "Diagrams.Backend.Rasterific:$crender from diagrams-rasterific-1.3.1.3"
:precision binary64
(+ (* x y) (* (- 1.0 x) z)))