
(FPCore (x y z t) :precision binary64 (+ x (/ (* y (- z x)) t)))
double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y * (z - x)) / t)
end function
public static double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
def code(x, y, z, t): return x + ((y * (z - x)) / t)
function code(x, y, z, t) return Float64(x + Float64(Float64(y * Float64(z - x)) / t)) end
function tmp = code(x, y, z, t) tmp = x + ((y * (z - x)) / t); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - x\right)}{t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (/ (* y (- z x)) t)))
double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y * (z - x)) / t)
end function
public static double code(double x, double y, double z, double t) {
return x + ((y * (z - x)) / t);
}
def code(x, y, z, t): return x + ((y * (z - x)) / t)
function code(x, y, z, t) return Float64(x + Float64(Float64(y * Float64(z - x)) / t)) end
function tmp = code(x, y, z, t) tmp = x + ((y * (z - x)) / t); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y * N[(z - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y \cdot \left(z - x\right)}{t}
\end{array}
(FPCore (x y z t) :precision binary64 (fma (/ y t) (- z x) x))
double code(double x, double y, double z, double t) {
return fma((y / t), (z - x), x);
}
function code(x, y, z, t) return fma(Float64(y / t), Float64(z - x), x) end
code[x_, y_, z_, t_] := N[(N[(y / t), $MachinePrecision] * N[(z - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{y}{t}, z - x, x\right)
\end{array}
Initial program 92.4%
+-commutative92.4%
associate-*l/96.5%
fma-def96.6%
Simplified96.6%
Final simplification96.6%
(FPCore (x y z t) :precision binary64 (if (or (<= x -1.5e-11) (not (<= x 0.0009))) (* x (- 1.0 (/ y t))) (+ x (* (/ y t) z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.5e-11) || !(x <= 0.0009)) {
tmp = x * (1.0 - (y / t));
} else {
tmp = x + ((y / t) * z);
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((x <= (-1.5d-11)) .or. (.not. (x <= 0.0009d0))) then
tmp = x * (1.0d0 - (y / t))
else
tmp = x + ((y / t) * z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((x <= -1.5e-11) || !(x <= 0.0009)) {
tmp = x * (1.0 - (y / t));
} else {
tmp = x + ((y / t) * z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (x <= -1.5e-11) or not (x <= 0.0009): tmp = x * (1.0 - (y / t)) else: tmp = x + ((y / t) * z) return tmp
function code(x, y, z, t) tmp = 0.0 if ((x <= -1.5e-11) || !(x <= 0.0009)) tmp = Float64(x * Float64(1.0 - Float64(y / t))); else tmp = Float64(x + Float64(Float64(y / t) * z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((x <= -1.5e-11) || ~((x <= 0.0009))) tmp = x * (1.0 - (y / t)); else tmp = x + ((y / t) * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[x, -1.5e-11], N[Not[LessEqual[x, 0.0009]], $MachinePrecision]], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.5 \cdot 10^{-11} \lor \neg \left(x \leq 0.0009\right):\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{t} \cdot z\\
\end{array}
\end{array}
if x < -1.5e-11 or 8.9999999999999998e-4 < x Initial program 89.6%
associate-*l/99.1%
Simplified99.1%
Taylor expanded in x around inf 89.2%
mul-1-neg89.2%
unsub-neg89.2%
Simplified89.2%
if -1.5e-11 < x < 8.9999999999999998e-4Initial program 94.9%
associate-*l/94.3%
Simplified94.3%
Taylor expanded in z around inf 86.4%
associate-*l/86.4%
*-commutative86.4%
Simplified86.4%
Final simplification87.7%
(FPCore (x y z t) :precision binary64 (if (or (<= y -1.95e+57) (not (<= y 3.9e+48))) (* y (/ (- x) t)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.95e+57) || !(y <= 3.9e+48)) {
tmp = y * (-x / t);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if ((y <= (-1.95d+57)) .or. (.not. (y <= 3.9d+48))) then
tmp = y * (-x / t)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -1.95e+57) || !(y <= 3.9e+48)) {
tmp = y * (-x / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -1.95e+57) or not (y <= 3.9e+48): tmp = y * (-x / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -1.95e+57) || !(y <= 3.9e+48)) tmp = Float64(y * Float64(Float64(-x) / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -1.95e+57) || ~((y <= 3.9e+48))) tmp = y * (-x / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -1.95e+57], N[Not[LessEqual[y, 3.9e+48]], $MachinePrecision]], N[(y * N[((-x) / t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.95 \cdot 10^{+57} \lor \neg \left(y \leq 3.9 \cdot 10^{+48}\right):\\
\;\;\;\;y \cdot \frac{-x}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.94999999999999984e57 or 3.9000000000000001e48 < y Initial program 86.6%
associate-*l/95.8%
Simplified95.8%
Taylor expanded in x around inf 55.2%
mul-1-neg55.2%
unsub-neg55.2%
Simplified55.2%
sub-neg55.2%
distribute-rgt-in55.2%
distribute-neg-frac55.2%
remove-double-neg55.2%
frac-2neg55.2%
associate-/r/55.9%
*-un-lft-identity55.9%
frac-2neg55.9%
div-inv55.9%
distribute-frac-neg55.9%
remove-double-neg55.9%
clear-num55.9%
add-sqr-sqrt32.3%
sqrt-unprod41.0%
sqr-neg41.0%
sqrt-unprod7.3%
add-sqr-sqrt19.3%
cancel-sign-sub-inv19.3%
add-sqr-sqrt7.3%
sqrt-unprod41.0%
Applied egg-rr55.9%
Taylor expanded in y around inf 39.4%
associate-*r/39.4%
*-commutative39.4%
neg-mul-139.4%
distribute-rgt-neg-in39.4%
associate-*r/42.5%
Simplified42.5%
if -1.94999999999999984e57 < y < 3.9000000000000001e48Initial program 97.2%
associate-*l/97.2%
Simplified97.2%
Taylor expanded in y around 0 61.5%
Final simplification52.9%
(FPCore (x y z t) :precision binary64 (if (<= t -2.3e-76) x (if (<= t 4.8e-61) (* (/ y t) (- x)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.3e-76) {
tmp = x;
} else if (t <= 4.8e-61) {
tmp = (y / t) * -x;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-2.3d-76)) then
tmp = x
else if (t <= 4.8d-61) then
tmp = (y / t) * -x
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.3e-76) {
tmp = x;
} else if (t <= 4.8e-61) {
tmp = (y / t) * -x;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -2.3e-76: tmp = x elif t <= 4.8e-61: tmp = (y / t) * -x else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -2.3e-76) tmp = x; elseif (t <= 4.8e-61) tmp = Float64(Float64(y / t) * Float64(-x)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -2.3e-76) tmp = x; elseif (t <= 4.8e-61) tmp = (y / t) * -x; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -2.3e-76], x, If[LessEqual[t, 4.8e-61], N[(N[(y / t), $MachinePrecision] * (-x)), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.3 \cdot 10^{-76}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-61}:\\
\;\;\;\;\frac{y}{t} \cdot \left(-x\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -2.30000000000000006e-76 or 4.8000000000000002e-61 < t Initial program 89.2%
associate-*l/97.5%
Simplified97.5%
Taylor expanded in y around 0 58.1%
if -2.30000000000000006e-76 < t < 4.8000000000000002e-61Initial program 97.9%
associate-*l/95.0%
Simplified95.0%
Taylor expanded in x around inf 53.2%
mul-1-neg53.2%
unsub-neg53.2%
Simplified53.2%
sub-neg53.2%
distribute-rgt-in53.2%
distribute-neg-frac53.2%
remove-double-neg53.2%
frac-2neg53.2%
associate-/r/50.7%
*-un-lft-identity50.7%
frac-2neg50.7%
div-inv50.3%
distribute-frac-neg50.3%
remove-double-neg50.3%
clear-num50.4%
add-sqr-sqrt30.8%
sqrt-unprod39.1%
sqr-neg39.1%
sqrt-unprod3.6%
add-sqr-sqrt14.4%
cancel-sign-sub-inv14.4%
add-sqr-sqrt3.6%
sqrt-unprod39.1%
Applied egg-rr50.4%
Taylor expanded in y around inf 43.9%
associate-*r/43.9%
*-commutative43.9%
neg-mul-143.9%
distribute-rgt-neg-in43.9%
associate-*r/43.8%
Simplified43.8%
Taylor expanded in y around 0 43.9%
mul-1-neg43.9%
associate-*l/43.8%
distribute-rgt-neg-in43.8%
associate-*l/43.9%
associate-*r/43.6%
Simplified43.6%
Final simplification52.8%
(FPCore (x y z t) :precision binary64 (if (<= t -8.8e-76) x (if (<= t 2.75e-61) (/ (- y) (/ t x)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -8.8e-76) {
tmp = x;
} else if (t <= 2.75e-61) {
tmp = -y / (t / x);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-8.8d-76)) then
tmp = x
else if (t <= 2.75d-61) then
tmp = -y / (t / x)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -8.8e-76) {
tmp = x;
} else if (t <= 2.75e-61) {
tmp = -y / (t / x);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -8.8e-76: tmp = x elif t <= 2.75e-61: tmp = -y / (t / x) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -8.8e-76) tmp = x; elseif (t <= 2.75e-61) tmp = Float64(Float64(-y) / Float64(t / x)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -8.8e-76) tmp = x; elseif (t <= 2.75e-61) tmp = -y / (t / x); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -8.8e-76], x, If[LessEqual[t, 2.75e-61], N[((-y) / N[(t / x), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.8 \cdot 10^{-76}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 2.75 \cdot 10^{-61}:\\
\;\;\;\;\frac{-y}{\frac{t}{x}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -8.79999999999999997e-76 or 2.7499999999999998e-61 < t Initial program 89.2%
associate-*l/97.5%
Simplified97.5%
Taylor expanded in y around 0 58.1%
if -8.79999999999999997e-76 < t < 2.7499999999999998e-61Initial program 97.9%
associate-*l/95.0%
Simplified95.0%
Taylor expanded in x around inf 53.2%
mul-1-neg53.2%
unsub-neg53.2%
Simplified53.2%
sub-neg53.2%
distribute-rgt-in53.2%
distribute-neg-frac53.2%
remove-double-neg53.2%
frac-2neg53.2%
associate-/r/50.7%
*-un-lft-identity50.7%
frac-2neg50.7%
div-inv50.3%
distribute-frac-neg50.3%
remove-double-neg50.3%
clear-num50.4%
add-sqr-sqrt30.8%
sqrt-unprod39.1%
sqr-neg39.1%
sqrt-unprod3.6%
add-sqr-sqrt14.4%
cancel-sign-sub-inv14.4%
add-sqr-sqrt3.6%
sqrt-unprod39.1%
Applied egg-rr50.4%
Taylor expanded in y around inf 43.9%
associate-*r/43.9%
*-commutative43.9%
neg-mul-143.9%
distribute-rgt-neg-in43.9%
associate-*r/43.8%
Simplified43.8%
distribute-frac-neg43.8%
distribute-rgt-neg-in43.8%
clear-num43.7%
div-inv44.0%
distribute-neg-frac44.0%
Applied egg-rr44.0%
Final simplification52.9%
(FPCore (x y z t) :precision binary64 (if (<= t -4.7e-129) x (if (<= t 3.7e-156) (/ x (/ t y)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.7e-129) {
tmp = x;
} else if (t <= 3.7e-156) {
tmp = x / (t / y);
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8) :: tmp
if (t <= (-4.7d-129)) then
tmp = x
else if (t <= 3.7d-156) then
tmp = x / (t / y)
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.7e-129) {
tmp = x;
} else if (t <= 3.7e-156) {
tmp = x / (t / y);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -4.7e-129: tmp = x elif t <= 3.7e-156: tmp = x / (t / y) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -4.7e-129) tmp = x; elseif (t <= 3.7e-156) tmp = Float64(x / Float64(t / y)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -4.7e-129) tmp = x; elseif (t <= 3.7e-156) tmp = x / (t / y); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -4.7e-129], x, If[LessEqual[t, 3.7e-156], N[(x / N[(t / y), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.7 \cdot 10^{-129}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{-156}:\\
\;\;\;\;\frac{x}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -4.7000000000000002e-129 or 3.7e-156 < t Initial program 90.9%
associate-*l/96.4%
Simplified96.4%
Taylor expanded in y around 0 52.5%
if -4.7000000000000002e-129 < t < 3.7e-156Initial program 97.0%
associate-*l/97.0%
Simplified97.0%
Taylor expanded in x around inf 49.2%
mul-1-neg49.2%
unsub-neg49.2%
Simplified49.2%
sub-neg49.2%
distribute-rgt-in49.2%
distribute-neg-frac49.2%
remove-double-neg49.2%
frac-2neg49.2%
associate-/r/45.6%
*-un-lft-identity45.6%
frac-2neg45.6%
div-inv45.2%
distribute-frac-neg45.2%
remove-double-neg45.2%
clear-num45.3%
add-sqr-sqrt23.1%
sqrt-unprod34.3%
sqr-neg34.3%
sqrt-unprod4.4%
add-sqr-sqrt11.3%
cancel-sign-sub-inv11.3%
add-sqr-sqrt4.4%
sqrt-unprod34.3%
Applied egg-rr45.3%
Taylor expanded in y around inf 44.4%
associate-*r/44.4%
*-commutative44.4%
neg-mul-144.4%
distribute-rgt-neg-in44.4%
associate-*r/44.3%
Simplified44.3%
frac-2neg44.3%
remove-double-neg44.3%
associate-*r/44.4%
associate-*l/45.4%
clear-num45.4%
associate-*l/43.9%
*-un-lft-identity43.9%
add-sqr-sqrt22.4%
sqrt-unprod31.7%
sqr-neg31.7%
sqrt-unprod6.7%
add-sqr-sqrt17.1%
Applied egg-rr17.1%
Final simplification43.6%
(FPCore (x y z t) :precision binary64 (+ x (* (/ y t) (- z x))))
double code(double x, double y, double z, double t) {
return x + ((y / t) * (z - x));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x + ((y / t) * (z - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y / t) * (z - x));
}
def code(x, y, z, t): return x + ((y / t) * (z - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y / t) * Float64(z - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y / t) * (z - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y / t), $MachinePrecision] * N[(z - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{y}{t} \cdot \left(z - x\right)
\end{array}
Initial program 92.4%
associate-*l/96.5%
Simplified96.5%
Final simplification96.5%
(FPCore (x y z t) :precision binary64 (* x (- 1.0 (/ y t))))
double code(double x, double y, double z, double t) {
return x * (1.0 - (y / t));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x * (1.0d0 - (y / t))
end function
public static double code(double x, double y, double z, double t) {
return x * (1.0 - (y / t));
}
def code(x, y, z, t): return x * (1.0 - (y / t))
function code(x, y, z, t) return Float64(x * Float64(1.0 - Float64(y / t))) end
function tmp = code(x, y, z, t) tmp = x * (1.0 - (y / t)); end
code[x_, y_, z_, t_] := N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x \cdot \left(1 - \frac{y}{t}\right)
\end{array}
Initial program 92.4%
associate-*l/96.5%
Simplified96.5%
Taylor expanded in x around inf 63.6%
mul-1-neg63.6%
unsub-neg63.6%
Simplified63.6%
Final simplification63.6%
(FPCore (x y z t) :precision binary64 x)
double code(double x, double y, double z, double t) {
return x;
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x
end function
public static double code(double x, double y, double z, double t) {
return x;
}
def code(x, y, z, t): return x
function code(x, y, z, t) return x end
function tmp = code(x, y, z, t) tmp = x; end
code[x_, y_, z_, t_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 92.4%
associate-*l/96.5%
Simplified96.5%
Taylor expanded in y around 0 40.4%
Final simplification40.4%
(FPCore (x y z t) :precision binary64 (- x (+ (* x (/ y t)) (* (- z) (/ y t)))))
double code(double x, double y, double z, double t) {
return x - ((x * (y / t)) + (-z * (y / t)));
}
real(8) function code(x, y, z, t)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
code = x - ((x * (y / t)) + (-z * (y / t)))
end function
public static double code(double x, double y, double z, double t) {
return x - ((x * (y / t)) + (-z * (y / t)));
}
def code(x, y, z, t): return x - ((x * (y / t)) + (-z * (y / t)))
function code(x, y, z, t) return Float64(x - Float64(Float64(x * Float64(y / t)) + Float64(Float64(-z) * Float64(y / t)))) end
function tmp = code(x, y, z, t) tmp = x - ((x * (y / t)) + (-z * (y / t))); end
code[x_, y_, z_, t_] := N[(x - N[(N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[((-z) * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x - \left(x \cdot \frac{y}{t} + \left(-z\right) \cdot \frac{y}{t}\right)
\end{array}
herbie shell --seed 2024017
(FPCore (x y z t)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
:precision binary64
:herbie-target
(- x (+ (* x (/ y t)) (* (- z) (/ y t))))
(+ x (/ (* y (- z x)) t)))