
(FPCore (x y z) :precision binary64 (+ x (/ (- y x) z)))
double code(double x, double y, double z) {
return 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 = x + ((y - x) / z)
end function
public static double code(double x, double y, double z) {
return x + ((y - x) / z);
}
def code(x, y, z): return x + ((y - x) / z)
function code(x, y, z) return Float64(x + Float64(Float64(y - x) / z)) end
function tmp = code(x, y, z) tmp = x + ((y - x) / z); end
code[x_, y_, z_] := N[(x + N[(N[(y - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y - x}{z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 7 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (+ x (/ (- y x) z)))
double code(double x, double y, double z) {
return 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 = x + ((y - x) / z)
end function
public static double code(double x, double y, double z) {
return x + ((y - x) / z);
}
def code(x, y, z): return x + ((y - x) / z)
function code(x, y, z) return Float64(x + Float64(Float64(y - x) / z)) end
function tmp = code(x, y, z) tmp = x + ((y - x) / z); end
code[x_, y_, z_] := N[(x + N[(N[(y - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y - x}{z}
\end{array}
(FPCore (x y z) :precision binary64 (+ x (/ (- y x) z)))
double code(double x, double y, double z) {
return 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 = x + ((y - x) / z)
end function
public static double code(double x, double y, double z) {
return x + ((y - x) / z);
}
def code(x, y, z): return x + ((y - x) / z)
function code(x, y, z) return Float64(x + Float64(Float64(y - x) / z)) end
function tmp = code(x, y, z) tmp = x + ((y - x) / z); end
code[x_, y_, z_] := N[(x + N[(N[(y - x), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y - x}{z}
\end{array}
Initial program 100.0%
Final simplification100.0%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (/ (- x) z)))
(if (<= z -1.4e+118)
x
(if (<= z -3.8e+86)
(/ y z)
(if (<= z -1.0)
x
(if (<= z -2.45e-119)
t_0
(if (<= z -9.8e-222)
(/ y z)
(if (<= z 3.1e-223)
t_0
(if (<= z 3.6e-86)
(/ y z)
(if (<= z 2.2e-39)
t_0
(if (<= z 36000000.0) (/ y z) x)))))))))))
double code(double x, double y, double z) {
double t_0 = -x / z;
double tmp;
if (z <= -1.4e+118) {
tmp = x;
} else if (z <= -3.8e+86) {
tmp = y / z;
} else if (z <= -1.0) {
tmp = x;
} else if (z <= -2.45e-119) {
tmp = t_0;
} else if (z <= -9.8e-222) {
tmp = y / z;
} else if (z <= 3.1e-223) {
tmp = t_0;
} else if (z <= 3.6e-86) {
tmp = y / z;
} else if (z <= 2.2e-39) {
tmp = t_0;
} else if (z <= 36000000.0) {
tmp = y / z;
} else {
tmp = 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) :: t_0
real(8) :: tmp
t_0 = -x / z
if (z <= (-1.4d+118)) then
tmp = x
else if (z <= (-3.8d+86)) then
tmp = y / z
else if (z <= (-1.0d0)) then
tmp = x
else if (z <= (-2.45d-119)) then
tmp = t_0
else if (z <= (-9.8d-222)) then
tmp = y / z
else if (z <= 3.1d-223) then
tmp = t_0
else if (z <= 3.6d-86) then
tmp = y / z
else if (z <= 2.2d-39) then
tmp = t_0
else if (z <= 36000000.0d0) then
tmp = y / z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = -x / z;
double tmp;
if (z <= -1.4e+118) {
tmp = x;
} else if (z <= -3.8e+86) {
tmp = y / z;
} else if (z <= -1.0) {
tmp = x;
} else if (z <= -2.45e-119) {
tmp = t_0;
} else if (z <= -9.8e-222) {
tmp = y / z;
} else if (z <= 3.1e-223) {
tmp = t_0;
} else if (z <= 3.6e-86) {
tmp = y / z;
} else if (z <= 2.2e-39) {
tmp = t_0;
} else if (z <= 36000000.0) {
tmp = y / z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): t_0 = -x / z tmp = 0 if z <= -1.4e+118: tmp = x elif z <= -3.8e+86: tmp = y / z elif z <= -1.0: tmp = x elif z <= -2.45e-119: tmp = t_0 elif z <= -9.8e-222: tmp = y / z elif z <= 3.1e-223: tmp = t_0 elif z <= 3.6e-86: tmp = y / z elif z <= 2.2e-39: tmp = t_0 elif z <= 36000000.0: tmp = y / z else: tmp = x return tmp
function code(x, y, z) t_0 = Float64(Float64(-x) / z) tmp = 0.0 if (z <= -1.4e+118) tmp = x; elseif (z <= -3.8e+86) tmp = Float64(y / z); elseif (z <= -1.0) tmp = x; elseif (z <= -2.45e-119) tmp = t_0; elseif (z <= -9.8e-222) tmp = Float64(y / z); elseif (z <= 3.1e-223) tmp = t_0; elseif (z <= 3.6e-86) tmp = Float64(y / z); elseif (z <= 2.2e-39) tmp = t_0; elseif (z <= 36000000.0) tmp = Float64(y / z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) t_0 = -x / z; tmp = 0.0; if (z <= -1.4e+118) tmp = x; elseif (z <= -3.8e+86) tmp = y / z; elseif (z <= -1.0) tmp = x; elseif (z <= -2.45e-119) tmp = t_0; elseif (z <= -9.8e-222) tmp = y / z; elseif (z <= 3.1e-223) tmp = t_0; elseif (z <= 3.6e-86) tmp = y / z; elseif (z <= 2.2e-39) tmp = t_0; elseif (z <= 36000000.0) tmp = y / z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[((-x) / z), $MachinePrecision]}, If[LessEqual[z, -1.4e+118], x, If[LessEqual[z, -3.8e+86], N[(y / z), $MachinePrecision], If[LessEqual[z, -1.0], x, If[LessEqual[z, -2.45e-119], t$95$0, If[LessEqual[z, -9.8e-222], N[(y / z), $MachinePrecision], If[LessEqual[z, 3.1e-223], t$95$0, If[LessEqual[z, 3.6e-86], N[(y / z), $MachinePrecision], If[LessEqual[z, 2.2e-39], t$95$0, If[LessEqual[z, 36000000.0], N[(y / z), $MachinePrecision], x]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{-x}{z}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+118}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -3.8 \cdot 10^{+86}:\\
\;\;\;\;\frac{y}{z}\\
\mathbf{elif}\;z \leq -1:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -2.45 \cdot 10^{-119}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -9.8 \cdot 10^{-222}:\\
\;\;\;\;\frac{y}{z}\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-223}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 3.6 \cdot 10^{-86}:\\
\;\;\;\;\frac{y}{z}\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-39}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 36000000:\\
\;\;\;\;\frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.39999999999999993e118 or -3.79999999999999978e86 < z < -1 or 3.6e7 < z Initial program 100.0%
Taylor expanded in z around inf 73.1%
if -1.39999999999999993e118 < z < -3.79999999999999978e86 or -2.45e-119 < z < -9.7999999999999999e-222 or 3.10000000000000018e-223 < z < 3.59999999999999966e-86 or 2.20000000000000001e-39 < z < 3.6e7Initial program 100.0%
+-commutative100.0%
clear-num99.8%
associate-/r/99.9%
fma-def99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 71.5%
if -1 < z < -2.45e-119 or -9.7999999999999999e-222 < z < 3.10000000000000018e-223 or 3.59999999999999966e-86 < z < 2.20000000000000001e-39Initial program 99.9%
Taylor expanded in y around 0 71.0%
Taylor expanded in z around 0 70.2%
neg-mul-170.2%
distribute-frac-neg70.2%
Simplified70.2%
Final simplification71.9%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ x (/ y z))) (t_1 (/ (- x) z)))
(if (<= z -4.6e-10)
t_0
(if (<= z -6e-101)
t_1
(if (<= z -5.5e-220)
t_0
(if (<= z 1.9e-222)
t_1
(if (<= z 2.45e-85) (/ y z) (if (<= z 4e-36) t_1 t_0))))))))
double code(double x, double y, double z) {
double t_0 = x + (y / z);
double t_1 = -x / z;
double tmp;
if (z <= -4.6e-10) {
tmp = t_0;
} else if (z <= -6e-101) {
tmp = t_1;
} else if (z <= -5.5e-220) {
tmp = t_0;
} else if (z <= 1.9e-222) {
tmp = t_1;
} else if (z <= 2.45e-85) {
tmp = y / z;
} else if (z <= 4e-36) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_0 = x + (y / z)
t_1 = -x / z
if (z <= (-4.6d-10)) then
tmp = t_0
else if (z <= (-6d-101)) then
tmp = t_1
else if (z <= (-5.5d-220)) then
tmp = t_0
else if (z <= 1.9d-222) then
tmp = t_1
else if (z <= 2.45d-85) then
tmp = y / z
else if (z <= 4d-36) then
tmp = t_1
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = x + (y / z);
double t_1 = -x / z;
double tmp;
if (z <= -4.6e-10) {
tmp = t_0;
} else if (z <= -6e-101) {
tmp = t_1;
} else if (z <= -5.5e-220) {
tmp = t_0;
} else if (z <= 1.9e-222) {
tmp = t_1;
} else if (z <= 2.45e-85) {
tmp = y / z;
} else if (z <= 4e-36) {
tmp = t_1;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y, z): t_0 = x + (y / z) t_1 = -x / z tmp = 0 if z <= -4.6e-10: tmp = t_0 elif z <= -6e-101: tmp = t_1 elif z <= -5.5e-220: tmp = t_0 elif z <= 1.9e-222: tmp = t_1 elif z <= 2.45e-85: tmp = y / z elif z <= 4e-36: tmp = t_1 else: tmp = t_0 return tmp
function code(x, y, z) t_0 = Float64(x + Float64(y / z)) t_1 = Float64(Float64(-x) / z) tmp = 0.0 if (z <= -4.6e-10) tmp = t_0; elseif (z <= -6e-101) tmp = t_1; elseif (z <= -5.5e-220) tmp = t_0; elseif (z <= 1.9e-222) tmp = t_1; elseif (z <= 2.45e-85) tmp = Float64(y / z); elseif (z <= 4e-36) tmp = t_1; else tmp = t_0; end return tmp end
function tmp_2 = code(x, y, z) t_0 = x + (y / z); t_1 = -x / z; tmp = 0.0; if (z <= -4.6e-10) tmp = t_0; elseif (z <= -6e-101) tmp = t_1; elseif (z <= -5.5e-220) tmp = t_0; elseif (z <= 1.9e-222) tmp = t_1; elseif (z <= 2.45e-85) tmp = y / z; elseif (z <= 4e-36) tmp = t_1; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(y / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[((-x) / z), $MachinePrecision]}, If[LessEqual[z, -4.6e-10], t$95$0, If[LessEqual[z, -6e-101], t$95$1, If[LessEqual[z, -5.5e-220], t$95$0, If[LessEqual[z, 1.9e-222], t$95$1, If[LessEqual[z, 2.45e-85], N[(y / z), $MachinePrecision], If[LessEqual[z, 4e-36], t$95$1, t$95$0]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \frac{y}{z}\\
t_1 := \frac{-x}{z}\\
\mathbf{if}\;z \leq -4.6 \cdot 10^{-10}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-101}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-220}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 1.9 \cdot 10^{-222}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 2.45 \cdot 10^{-85}:\\
\;\;\;\;\frac{y}{z}\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-36}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\end{array}
if z < -4.60000000000000014e-10 or -6.0000000000000006e-101 < z < -5.4999999999999999e-220 or 3.9999999999999998e-36 < z Initial program 100.0%
Taylor expanded in y around inf 92.6%
if -4.60000000000000014e-10 < z < -6.0000000000000006e-101 or -5.4999999999999999e-220 < z < 1.89999999999999998e-222 or 2.45000000000000007e-85 < z < 3.9999999999999998e-36Initial program 99.9%
Taylor expanded in y around 0 72.7%
Taylor expanded in z around 0 71.8%
neg-mul-171.8%
distribute-frac-neg71.8%
Simplified71.8%
if 1.89999999999999998e-222 < z < 2.45000000000000007e-85Initial program 100.0%
+-commutative100.0%
clear-num99.9%
associate-/r/99.9%
fma-def99.9%
Applied egg-rr99.9%
Taylor expanded in y around inf 63.5%
Final simplification84.5%
(FPCore (x y z)
:precision binary64
(if (<= z -1.2e+118)
x
(if (<= z -1.6e+87)
(/ y z)
(if (<= z -190000000000.0) x (if (<= z 65000000.0) (/ y z) x)))))
double code(double x, double y, double z) {
double tmp;
if (z <= -1.2e+118) {
tmp = x;
} else if (z <= -1.6e+87) {
tmp = y / z;
} else if (z <= -190000000000.0) {
tmp = x;
} else if (z <= 65000000.0) {
tmp = y / z;
} else {
tmp = 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 <= (-1.2d+118)) then
tmp = x
else if (z <= (-1.6d+87)) then
tmp = y / z
else if (z <= (-190000000000.0d0)) then
tmp = x
else if (z <= 65000000.0d0) then
tmp = y / z
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -1.2e+118) {
tmp = x;
} else if (z <= -1.6e+87) {
tmp = y / z;
} else if (z <= -190000000000.0) {
tmp = x;
} else if (z <= 65000000.0) {
tmp = y / z;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -1.2e+118: tmp = x elif z <= -1.6e+87: tmp = y / z elif z <= -190000000000.0: tmp = x elif z <= 65000000.0: tmp = y / z else: tmp = x return tmp
function code(x, y, z) tmp = 0.0 if (z <= -1.2e+118) tmp = x; elseif (z <= -1.6e+87) tmp = Float64(y / z); elseif (z <= -190000000000.0) tmp = x; elseif (z <= 65000000.0) tmp = Float64(y / z); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -1.2e+118) tmp = x; elseif (z <= -1.6e+87) tmp = y / z; elseif (z <= -190000000000.0) tmp = x; elseif (z <= 65000000.0) tmp = y / z; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -1.2e+118], x, If[LessEqual[z, -1.6e+87], N[(y / z), $MachinePrecision], If[LessEqual[z, -190000000000.0], x, If[LessEqual[z, 65000000.0], N[(y / z), $MachinePrecision], x]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+118}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq -1.6 \cdot 10^{+87}:\\
\;\;\;\;\frac{y}{z}\\
\mathbf{elif}\;z \leq -190000000000:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 65000000:\\
\;\;\;\;\frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if z < -1.2e118 or -1.6e87 < z < -1.9e11 or 6.5e7 < z Initial program 100.0%
Taylor expanded in z around inf 74.1%
if -1.2e118 < z < -1.6e87 or -1.9e11 < z < 6.5e7Initial program 100.0%
+-commutative100.0%
clear-num99.7%
associate-/r/99.8%
fma-def99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 50.7%
Final simplification61.5%
(FPCore (x y z) :precision binary64 (if (or (<= x -65000000000000.0) (not (<= x 7e-38))) (- x (/ x z)) (+ x (/ y z))))
double code(double x, double y, double z) {
double tmp;
if ((x <= -65000000000000.0) || !(x <= 7e-38)) {
tmp = x - (x / z);
} else {
tmp = x + (y / 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 <= (-65000000000000.0d0)) .or. (.not. (x <= 7d-38))) then
tmp = x - (x / z)
else
tmp = x + (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((x <= -65000000000000.0) || !(x <= 7e-38)) {
tmp = x - (x / z);
} else {
tmp = x + (y / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (x <= -65000000000000.0) or not (x <= 7e-38): tmp = x - (x / z) else: tmp = x + (y / z) return tmp
function code(x, y, z) tmp = 0.0 if ((x <= -65000000000000.0) || !(x <= 7e-38)) tmp = Float64(x - Float64(x / z)); else tmp = Float64(x + Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((x <= -65000000000000.0) || ~((x <= 7e-38))) tmp = x - (x / z); else tmp = x + (y / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[x, -65000000000000.0], N[Not[LessEqual[x, 7e-38]], $MachinePrecision]], N[(x - N[(x / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -65000000000000 \lor \neg \left(x \leq 7 \cdot 10^{-38}\right):\\
\;\;\;\;x - \frac{x}{z}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{z}\\
\end{array}
\end{array}
if x < -6.5e13 or 7.0000000000000003e-38 < x Initial program 100.0%
Taylor expanded in y around 0 88.7%
if -6.5e13 < x < 7.0000000000000003e-38Initial program 100.0%
Taylor expanded in y around inf 91.7%
Final simplification90.1%
(FPCore (x y z) :precision binary64 (if (or (<= z -1.0) (not (<= z 1.0))) (+ x (/ y z)) (/ (- y x) z)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -1.0) || !(z <= 1.0)) {
tmp = x + (y / z);
} else {
tmp = (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) :: tmp
if ((z <= (-1.0d0)) .or. (.not. (z <= 1.0d0))) then
tmp = x + (y / z)
else
tmp = (y - x) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -1.0) || !(z <= 1.0)) {
tmp = x + (y / z);
} else {
tmp = (y - x) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -1.0) or not (z <= 1.0): tmp = x + (y / z) else: tmp = (y - x) / z return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -1.0) || !(z <= 1.0)) tmp = Float64(x + Float64(y / z)); else tmp = Float64(Float64(y - x) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -1.0) || ~((z <= 1.0))) tmp = x + (y / z); else tmp = (y - x) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -1.0], N[Not[LessEqual[z, 1.0]], $MachinePrecision]], N[(x + N[(y / z), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \lor \neg \left(z \leq 1\right):\\
\;\;\;\;x + \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{y - x}{z}\\
\end{array}
\end{array}
if z < -1 or 1 < z Initial program 100.0%
Taylor expanded in y around inf 98.5%
if -1 < z < 1Initial program 100.0%
+-commutative100.0%
clear-num99.7%
associate-/r/99.8%
fma-def99.8%
Applied egg-rr99.8%
Taylor expanded in z around 0 99.5%
Final simplification99.0%
(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 100.0%
Taylor expanded in z around inf 36.2%
Final simplification36.2%
herbie shell --seed 2023238
(FPCore (x y z)
:name "Statistics.Sample:$swelfordMean from math-functions-0.1.5.2"
:precision binary64
(+ x (/ (- y x) z)))