
(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 91.6%
Taylor expanded in z around 0 87.7%
mul-1-neg87.7%
associate-/l*90.2%
distribute-lft-neg-in90.2%
*-commutative90.2%
associate-*r/93.3%
distribute-rgt-in98.4%
+-commutative98.4%
sub-neg98.4%
Simplified98.4%
Taylor expanded in y around 0 91.6%
associate-*r/92.1%
*-commutative92.1%
associate-/r/99.3%
Simplified99.3%
(FPCore (x y z t)
:precision binary64
(if (<= z -9.5e+267)
(* z (/ y t))
(if (or (<= z -4.2e-50) (not (<= z 2.5e-59)))
(+ x (* y (/ z t)))
(* x (- 1.0 (/ y t))))))
double code(double x, double y, double z, double t) {
double tmp;
if (z <= -9.5e+267) {
tmp = z * (y / t);
} else if ((z <= -4.2e-50) || !(z <= 2.5e-59)) {
tmp = x + (y * (z / t));
} else {
tmp = x * (1.0 - (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 (z <= (-9.5d+267)) then
tmp = z * (y / t)
else if ((z <= (-4.2d-50)) .or. (.not. (z <= 2.5d-59))) then
tmp = x + (y * (z / t))
else
tmp = x * (1.0d0 - (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (z <= -9.5e+267) {
tmp = z * (y / t);
} else if ((z <= -4.2e-50) || !(z <= 2.5e-59)) {
tmp = x + (y * (z / t));
} else {
tmp = x * (1.0 - (y / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if z <= -9.5e+267: tmp = z * (y / t) elif (z <= -4.2e-50) or not (z <= 2.5e-59): tmp = x + (y * (z / t)) else: tmp = x * (1.0 - (y / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if (z <= -9.5e+267) tmp = Float64(z * Float64(y / t)); elseif ((z <= -4.2e-50) || !(z <= 2.5e-59)) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = Float64(x * Float64(1.0 - Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (z <= -9.5e+267) tmp = z * (y / t); elseif ((z <= -4.2e-50) || ~((z <= 2.5e-59))) tmp = x + (y * (z / t)); else tmp = x * (1.0 - (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[z, -9.5e+267], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -4.2e-50], N[Not[LessEqual[z, 2.5e-59]], $MachinePrecision]], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -9.5 \cdot 10^{+267}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-50} \lor \neg \left(z \leq 2.5 \cdot 10^{-59}\right):\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\end{array}
\end{array}
if z < -9.50000000000000066e267Initial program 85.4%
Taylor expanded in y around inf 49.5%
Taylor expanded in z around inf 57.2%
clear-num57.2%
un-div-inv61.3%
Applied egg-rr61.3%
associate-/r/99.8%
Applied egg-rr99.8%
if -9.50000000000000066e267 < z < -4.2000000000000002e-50 or 2.5000000000000001e-59 < z Initial program 93.8%
Taylor expanded in z around inf 89.2%
associate-/l*87.3%
Simplified87.3%
if -4.2000000000000002e-50 < z < 2.5000000000000001e-59Initial program 89.6%
Taylor expanded in x around inf 90.4%
mul-1-neg90.4%
unsub-neg90.4%
Simplified90.4%
Final simplification89.3%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2.6e-50) (not (<= z 1.4e-57))) (+ x (* z (/ y t))) (* x (- 1.0 (/ y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.6e-50) || !(z <= 1.4e-57)) {
tmp = x + (z * (y / t));
} else {
tmp = x * (1.0 - (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 ((z <= (-2.6d-50)) .or. (.not. (z <= 1.4d-57))) then
tmp = x + (z * (y / t))
else
tmp = x * (1.0d0 - (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.6e-50) || !(z <= 1.4e-57)) {
tmp = x + (z * (y / t));
} else {
tmp = x * (1.0 - (y / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -2.6e-50) or not (z <= 1.4e-57): tmp = x + (z * (y / t)) else: tmp = x * (1.0 - (y / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -2.6e-50) || !(z <= 1.4e-57)) tmp = Float64(x + Float64(z * Float64(y / t))); else tmp = Float64(x * Float64(1.0 - Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -2.6e-50) || ~((z <= 1.4e-57))) tmp = x + (z * (y / t)); else tmp = x * (1.0 - (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.6e-50], N[Not[LessEqual[z, 1.4e-57]], $MachinePrecision]], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{-50} \lor \neg \left(z \leq 1.4 \cdot 10^{-57}\right):\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\end{array}
\end{array}
if z < -2.6000000000000001e-50 or 1.4e-57 < z Initial program 93.1%
Taylor expanded in z around 0 86.3%
mul-1-neg86.3%
associate-/l*86.3%
distribute-lft-neg-in86.3%
*-commutative86.3%
associate-*r/91.7%
distribute-rgt-in99.2%
+-commutative99.2%
sub-neg99.2%
Simplified99.2%
Taylor expanded in z around inf 92.3%
if -2.6000000000000001e-50 < z < 1.4e-57Initial program 89.6%
Taylor expanded in x around inf 90.4%
mul-1-neg90.4%
unsub-neg90.4%
Simplified90.4%
Final simplification91.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.6e+197) (not (<= z 3400.0))) (* (- z x) (/ y t)) (* x (- 1.0 (/ y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.6e+197) || !(z <= 3400.0)) {
tmp = (z - x) * (y / t);
} else {
tmp = x * (1.0 - (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 ((z <= (-1.6d+197)) .or. (.not. (z <= 3400.0d0))) then
tmp = (z - x) * (y / t)
else
tmp = x * (1.0d0 - (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.6e+197) || !(z <= 3400.0)) {
tmp = (z - x) * (y / t);
} else {
tmp = x * (1.0 - (y / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.6e+197) or not (z <= 3400.0): tmp = (z - x) * (y / t) else: tmp = x * (1.0 - (y / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.6e+197) || !(z <= 3400.0)) tmp = Float64(Float64(z - x) * Float64(y / t)); else tmp = Float64(x * Float64(1.0 - Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.6e+197) || ~((z <= 3400.0))) tmp = (z - x) * (y / t); else tmp = x * (1.0 - (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.6e+197], N[Not[LessEqual[z, 3400.0]], $MachinePrecision]], N[(N[(z - x), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+197} \lor \neg \left(z \leq 3400\right):\\
\;\;\;\;\left(z - x\right) \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\end{array}
\end{array}
if z < -1.5999999999999999e197 or 3400 < z Initial program 92.9%
Taylor expanded in y around -inf 74.2%
Taylor expanded in z around 0 64.8%
mul-1-neg83.4%
associate-/l*81.3%
distribute-lft-neg-in81.3%
*-commutative81.3%
associate-*r/89.3%
distribute-rgt-in99.8%
+-commutative99.8%
sub-neg99.8%
Simplified80.1%
if -1.5999999999999999e197 < z < 3400Initial program 90.8%
Taylor expanded in x around inf 82.3%
mul-1-neg82.3%
unsub-neg82.3%
Simplified82.3%
Final simplification81.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -2.7e+199) (not (<= z 1e+35))) (* z (/ y t)) (* x (- 1.0 (/ y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.7e+199) || !(z <= 1e+35)) {
tmp = z * (y / t);
} else {
tmp = x * (1.0 - (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 ((z <= (-2.7d+199)) .or. (.not. (z <= 1d+35))) then
tmp = z * (y / t)
else
tmp = x * (1.0d0 - (y / t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -2.7e+199) || !(z <= 1e+35)) {
tmp = z * (y / t);
} else {
tmp = x * (1.0 - (y / t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -2.7e+199) or not (z <= 1e+35): tmp = z * (y / t) else: tmp = x * (1.0 - (y / t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -2.7e+199) || !(z <= 1e+35)) tmp = Float64(z * Float64(y / t)); else tmp = Float64(x * Float64(1.0 - Float64(y / t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -2.7e+199) || ~((z <= 1e+35))) tmp = z * (y / t); else tmp = x * (1.0 - (y / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -2.7e+199], N[Not[LessEqual[z, 1e+35]], $MachinePrecision]], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(x * N[(1.0 - N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.7 \cdot 10^{+199} \lor \neg \left(z \leq 10^{+35}\right):\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x \cdot \left(1 - \frac{y}{t}\right)\\
\end{array}
\end{array}
if z < -2.6999999999999999e199 or 9.9999999999999997e34 < z Initial program 92.2%
Taylor expanded in y around inf 66.2%
Taylor expanded in z around inf 62.8%
clear-num62.8%
un-div-inv63.5%
Applied egg-rr63.5%
associate-/r/76.9%
Applied egg-rr76.9%
if -2.6999999999999999e199 < z < 9.9999999999999997e34Initial program 91.3%
Taylor expanded in x around inf 81.0%
mul-1-neg81.0%
unsub-neg81.0%
Simplified81.0%
Final simplification79.6%
(FPCore (x y z t) :precision binary64 (if (or (<= y -8e-42) (not (<= y 7.8e-31))) (* y (/ z t)) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -8e-42) || !(y <= 7.8e-31)) {
tmp = y * (z / 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 <= (-8d-42)) .or. (.not. (y <= 7.8d-31))) then
tmp = y * (z / 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 <= -8e-42) || !(y <= 7.8e-31)) {
tmp = y * (z / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -8e-42) or not (y <= 7.8e-31): tmp = y * (z / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -8e-42) || !(y <= 7.8e-31)) tmp = Float64(y * Float64(z / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -8e-42) || ~((y <= 7.8e-31))) tmp = y * (z / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -8e-42], N[Not[LessEqual[y, 7.8e-31]], $MachinePrecision]], N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-42} \lor \neg \left(y \leq 7.8 \cdot 10^{-31}\right):\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -8.0000000000000003e-42 or 7.8000000000000003e-31 < y Initial program 86.6%
Taylor expanded in y around inf 80.6%
Taylor expanded in z around inf 50.8%
if -8.0000000000000003e-42 < y < 7.8000000000000003e-31Initial program 97.9%
Taylor expanded in y around 0 61.0%
Final simplification55.3%
(FPCore (x y z t) :precision binary64 (if (<= t -5.2e+140) x (if (<= t 3.7e+103) (* z (/ y t)) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -5.2e+140) {
tmp = x;
} else if (t <= 3.7e+103) {
tmp = z * (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 (t <= (-5.2d+140)) then
tmp = x
else if (t <= 3.7d+103) then
tmp = z * (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 (t <= -5.2e+140) {
tmp = x;
} else if (t <= 3.7e+103) {
tmp = z * (y / t);
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -5.2e+140: tmp = x elif t <= 3.7e+103: tmp = z * (y / t) else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -5.2e+140) tmp = x; elseif (t <= 3.7e+103) tmp = Float64(z * Float64(y / t)); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -5.2e+140) tmp = x; elseif (t <= 3.7e+103) tmp = z * (y / t); else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -5.2e+140], x, If[LessEqual[t, 3.7e+103], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{+140}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{+103}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -5.2000000000000002e140 or 3.70000000000000033e103 < t Initial program 81.3%
Taylor expanded in y around 0 74.5%
if -5.2000000000000002e140 < t < 3.70000000000000033e103Initial program 96.4%
Taylor expanded in y around inf 71.6%
Taylor expanded in z around inf 44.8%
clear-num44.8%
un-div-inv45.1%
Applied egg-rr45.1%
associate-/r/51.8%
Applied egg-rr51.8%
Final simplification59.1%
(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 91.6%
Taylor expanded in z around 0 87.7%
mul-1-neg87.7%
associate-/l*90.2%
distribute-lft-neg-in90.2%
*-commutative90.2%
associate-*r/93.3%
distribute-rgt-in98.4%
+-commutative98.4%
sub-neg98.4%
Simplified98.4%
Final simplification98.4%
(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 91.6%
Taylor expanded in y around 0 37.8%
(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 2024146
(FPCore (x y z t)
:name "Optimisation.CirclePacking:place from circle-packing-0.1.0.4, D"
:precision binary64
:alt
(! :herbie-platform default (- x (+ (* x (/ y t)) (* (- z) (/ y t)))))
(+ x (/ (* y (- z x)) t)))