
(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 (+ x (/ (- z x) (/ t y))))
double code(double x, double y, double z, double t) {
return x + ((z - x) / (t / y));
}
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 + ((z - x) / (t / y))
end function
public static double code(double x, double y, double z, double t) {
return x + ((z - x) / (t / y));
}
def code(x, y, z, t): return x + ((z - x) / (t / y))
function code(x, y, z, t) return Float64(x + Float64(Float64(z - x) / Float64(t / y))) end
function tmp = code(x, y, z, t) tmp = x + ((z - x) / (t / y)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(z - x), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{z - x}{\frac{t}{y}}
\end{array}
Initial program 92.6%
associate-*l/97.5%
Simplified97.5%
*-commutative97.5%
clear-num97.3%
un-div-inv97.5%
Applied egg-rr97.5%
Final simplification97.5%
(FPCore (x y z t) :precision binary64 (if (<= y -3.5e+32) (+ x (* z (/ y t))) (if (<= y 8.2e+180) (+ x (/ (* z y) t)) (* x (/ (- y) t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.5e+32) {
tmp = x + (z * (y / t));
} else if (y <= 8.2e+180) {
tmp = x + ((z * y) / t);
} else {
tmp = x * (-y / t);
}
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 <= (-3.5d+32)) then
tmp = x + (z * (y / t))
else if (y <= 8.2d+180) then
tmp = x + ((z * y) / t)
else
tmp = x * (-y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.5e+32) {
tmp = x + (z * (y / t));
} else if (y <= 8.2e+180) {
tmp = x + ((z * y) / t);
} else {
tmp = x * (-y / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.5e+32: tmp = x + (z * (y / t)) elif y <= 8.2e+180: tmp = x + ((z * y) / t) else: tmp = x * (-y / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.5e+32) tmp = Float64(x + Float64(z * Float64(y / t))); elseif (y <= 8.2e+180) tmp = Float64(x + Float64(Float64(z * y) / t)); else tmp = Float64(x * Float64(Float64(-y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.5e+32) tmp = x + (z * (y / t)); elseif (y <= 8.2e+180) tmp = x + ((z * y) / t); else tmp = x * (-y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.5e+32], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.2e+180], N[(x + N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(x * N[((-y) / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{+32}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+180}:\\
\;\;\;\;x + \frac{z \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-y}{t}\\
\end{array}
\end{array}
if y < -3.5000000000000001e32Initial program 81.7%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in z around inf 61.2%
associate-*l/73.1%
*-commutative73.1%
Simplified73.1%
if -3.5000000000000001e32 < y < 8.2e180Initial program 97.9%
associate-*l/97.5%
Simplified97.5%
Taylor expanded in z around inf 86.4%
if 8.2e180 < y Initial program 80.4%
associate-*l/94.5%
Simplified94.5%
Taylor expanded in x around inf 71.8%
*-commutative71.8%
distribute-lft-in71.8%
*-rgt-identity71.8%
mul-1-neg71.8%
distribute-rgt-neg-in71.8%
unsub-neg71.8%
Simplified71.8%
Taylor expanded in y around inf 66.3%
associate-*l/68.8%
associate-*r*68.8%
neg-mul-168.8%
Simplified68.8%
Final simplification81.6%
(FPCore (x y z t) :precision binary64 (if (<= z -2.5e-106) (+ x (* z (/ y t))) (if (<= z 3.4e-113) (- x (* x (/ y t))) (+ x (/ z (/ t y))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.5e-106) {
tmp = x + (z * (y / t));
} else if (z <= 3.4e-113) {
tmp = x - (x * (y / t));
} else {
tmp = x + (z / (t / y));
}
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 (z <= (-2.5d-106)) then
tmp = x + (z * (y / t))
else if (z <= 3.4d-113) then
tmp = x - (x * (y / t))
else
tmp = x + (z / (t / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -2.5e-106) {
tmp = x + (z * (y / t));
} else if (z <= 3.4e-113) {
tmp = x - (x * (y / t));
} else {
tmp = x + (z / (t / y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -2.5e-106: tmp = x + (z * (y / t)) elif z <= 3.4e-113: tmp = x - (x * (y / t)) else: tmp = x + (z / (t / y)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -2.5e-106) tmp = Float64(x + Float64(z * Float64(y / t))); elseif (z <= 3.4e-113) tmp = Float64(x - Float64(x * Float64(y / t))); else tmp = Float64(x + Float64(z / Float64(t / y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -2.5e-106) tmp = x + (z * (y / t)); elseif (z <= 3.4e-113) tmp = x - (x * (y / t)); else tmp = x + (z / (t / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -2.5e-106], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.4e-113], N[(x - N[(x * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{-106}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq 3.4 \cdot 10^{-113}:\\
\;\;\;\;x - x \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{t}{y}}\\
\end{array}
\end{array}
if z < -2.49999999999999991e-106Initial program 87.2%
associate-*l/99.8%
Simplified99.8%
Taylor expanded in z around inf 81.9%
associate-*l/88.7%
*-commutative88.7%
Simplified88.7%
if -2.49999999999999991e-106 < z < 3.4000000000000002e-113Initial program 95.8%
associate-*l/96.6%
Simplified96.6%
Taylor expanded in x around inf 94.2%
*-commutative94.2%
distribute-lft-in94.2%
*-rgt-identity94.2%
mul-1-neg94.2%
distribute-rgt-neg-in94.2%
unsub-neg94.2%
Simplified94.2%
if 3.4000000000000002e-113 < z Initial program 94.7%
associate-*l/96.2%
Simplified96.2%
Taylor expanded in z around inf 86.6%
associate-*l/88.2%
*-commutative88.2%
Simplified88.2%
clear-num87.8%
div-inv88.4%
Applied egg-rr88.4%
Final simplification90.4%
(FPCore (x y z t) :precision binary64 (if (or (<= y -700000000000.0) (not (<= y 1.08e+76))) (* y (/ (- x) t)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -700000000000.0) || !(y <= 1.08e+76)) {
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 <= (-700000000000.0d0)) .or. (.not. (y <= 1.08d+76))) 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 <= -700000000000.0) || !(y <= 1.08e+76)) {
tmp = y * (-x / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -700000000000.0) or not (y <= 1.08e+76): tmp = y * (-x / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -700000000000.0) || !(y <= 1.08e+76)) 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 <= -700000000000.0) || ~((y <= 1.08e+76))) tmp = y * (-x / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -700000000000.0], N[Not[LessEqual[y, 1.08e+76]], $MachinePrecision]], N[(y * N[((-x) / t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -700000000000 \lor \neg \left(y \leq 1.08 \cdot 10^{+76}\right):\\
\;\;\;\;y \cdot \frac{-x}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -7e11 or 1.07999999999999999e76 < y Initial program 84.0%
associate-*l/97.1%
Simplified97.1%
Taylor expanded in x around inf 61.2%
*-commutative61.2%
distribute-lft-in61.2%
*-rgt-identity61.2%
mul-1-neg61.2%
distribute-rgt-neg-in61.2%
unsub-neg61.2%
Simplified61.2%
Taylor expanded in y around inf 44.1%
associate-*r/44.1%
neg-mul-144.1%
distribute-rgt-neg-in44.1%
associate-*r/45.2%
Simplified45.2%
if -7e11 < y < 1.07999999999999999e76Initial program 98.3%
associate-*l/97.8%
Simplified97.8%
Taylor expanded in y around 0 56.2%
Final simplification51.9%
(FPCore (x y z t) :precision binary64 (if (or (<= y -2700000000000.0) (not (<= y 1.85e+79))) (* x (/ (- y) t)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -2700000000000.0) || !(y <= 1.85e+79)) {
tmp = x * (-y / 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 <= (-2700000000000.0d0)) .or. (.not. (y <= 1.85d+79))) then
tmp = x * (-y / 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 <= -2700000000000.0) || !(y <= 1.85e+79)) {
tmp = x * (-y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -2700000000000.0) or not (y <= 1.85e+79): tmp = x * (-y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -2700000000000.0) || !(y <= 1.85e+79)) tmp = Float64(x * Float64(Float64(-y) / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -2700000000000.0) || ~((y <= 1.85e+79))) tmp = x * (-y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -2700000000000.0], N[Not[LessEqual[y, 1.85e+79]], $MachinePrecision]], N[(x * N[((-y) / t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2700000000000 \lor \neg \left(y \leq 1.85 \cdot 10^{+79}\right):\\
\;\;\;\;x \cdot \frac{-y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -2.7e12 or 1.85000000000000005e79 < y Initial program 84.0%
associate-*l/97.1%
Simplified97.1%
Taylor expanded in x around inf 61.2%
*-commutative61.2%
distribute-lft-in61.2%
*-rgt-identity61.2%
mul-1-neg61.2%
distribute-rgt-neg-in61.2%
unsub-neg61.2%
Simplified61.2%
Taylor expanded in y around inf 44.1%
associate-*l/49.9%
associate-*r*49.9%
neg-mul-149.9%
Simplified49.9%
if -2.7e12 < y < 1.85000000000000005e79Initial program 98.3%
associate-*l/97.8%
Simplified97.8%
Taylor expanded in y around 0 56.2%
Final simplification53.7%
(FPCore (x y z t) :precision binary64 (if (<= y 1.55e+181) (+ x (* z (/ y t))) (* x (/ (- y) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 1.55e+181) {
tmp = x + (z * (y / t));
} else {
tmp = x * (-y / t);
}
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.55d+181) then
tmp = x + (z * (y / t))
else
tmp = x * (-y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 1.55e+181) {
tmp = x + (z * (y / t));
} else {
tmp = x * (-y / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 1.55e+181: tmp = x + (z * (y / t)) else: tmp = x * (-y / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 1.55e+181) tmp = Float64(x + Float64(z * Float64(y / t))); else tmp = Float64(x * Float64(Float64(-y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 1.55e+181) tmp = x + (z * (y / t)); else tmp = x * (-y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 1.55e+181], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[((-y) / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.55 \cdot 10^{+181}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-y}{t}\\
\end{array}
\end{array}
if y < 1.54999999999999995e181Initial program 94.5%
associate-*l/97.9%
Simplified97.9%
Taylor expanded in z around inf 81.1%
associate-*l/81.7%
*-commutative81.7%
Simplified81.7%
if 1.54999999999999995e181 < y Initial program 80.4%
associate-*l/94.5%
Simplified94.5%
Taylor expanded in x around inf 71.8%
*-commutative71.8%
distribute-lft-in71.8%
*-rgt-identity71.8%
mul-1-neg71.8%
distribute-rgt-neg-in71.8%
unsub-neg71.8%
Simplified71.8%
Taylor expanded in y around inf 66.3%
associate-*l/68.8%
associate-*r*68.8%
neg-mul-168.8%
Simplified68.8%
Final simplification80.0%
(FPCore (x y z t) :precision binary64 (if (<= y 2.9e+181) (+ x (/ z (/ t y))) (* x (/ (- y) t))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 2.9e+181) {
tmp = x + (z / (t / y));
} else {
tmp = x * (-y / t);
}
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 <= 2.9d+181) then
tmp = x + (z / (t / y))
else
tmp = x * (-y / t)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= 2.9e+181) {
tmp = x + (z / (t / y));
} else {
tmp = x * (-y / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= 2.9e+181: tmp = x + (z / (t / y)) else: tmp = x * (-y / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= 2.9e+181) tmp = Float64(x + Float64(z / Float64(t / y))); else tmp = Float64(x * Float64(Float64(-y) / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= 2.9e+181) tmp = x + (z / (t / y)); else tmp = x * (-y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, 2.9e+181], N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[((-y) / t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.9 \cdot 10^{+181}:\\
\;\;\;\;x + \frac{z}{\frac{t}{y}}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{-y}{t}\\
\end{array}
\end{array}
if y < 2.9e181Initial program 94.5%
associate-*l/97.9%
Simplified97.9%
Taylor expanded in z around inf 81.1%
associate-*l/81.7%
*-commutative81.7%
Simplified81.7%
clear-num81.5%
div-inv81.7%
Applied egg-rr81.7%
if 2.9e181 < y Initial program 80.4%
associate-*l/94.5%
Simplified94.5%
Taylor expanded in x around inf 71.8%
*-commutative71.8%
distribute-lft-in71.8%
*-rgt-identity71.8%
mul-1-neg71.8%
distribute-rgt-neg-in71.8%
unsub-neg71.8%
Simplified71.8%
Taylor expanded in y around inf 66.3%
associate-*l/68.8%
associate-*r*68.8%
neg-mul-168.8%
Simplified68.8%
Final simplification80.0%
(FPCore (x y z t) :precision binary64 (+ x (* (- z x) (/ y t))))
double code(double x, double y, double z, double t) {
return x + ((z - x) * (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 + ((z - x) * (y / t))
end function
public static double code(double x, double y, double z, double t) {
return x + ((z - x) * (y / t));
}
def code(x, y, z, t): return x + ((z - x) * (y / t))
function code(x, y, z, t) return Float64(x + Float64(Float64(z - x) * Float64(y / t))) end
function tmp = code(x, y, z, t) tmp = x + ((z - x) * (y / t)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(z - x), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(z - x\right) \cdot \frac{y}{t}
\end{array}
Initial program 92.6%
associate-*l/97.5%
Simplified97.5%
Final simplification97.5%
(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.6%
associate-*l/97.5%
Simplified97.5%
Taylor expanded in y around 0 39.4%
Final simplification39.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 2023200
(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)))