
(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 93.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6497.7
Applied rewrites97.7%
(FPCore (x y z t) :precision binary64 (if (<= (+ (/ (* (- z x) y) t) x) -1e+306) (* (/ z t) y) (/ (* z y) t)))
double code(double x, double y, double z, double t) {
double tmp;
if (((((z - x) * y) / t) + x) <= -1e+306) {
tmp = (z / t) * y;
} else {
tmp = (z * 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 - x) * y) / t) + x) <= (-1d+306)) then
tmp = (z / t) * y
else
tmp = (z * y) / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((((z - x) * y) / t) + x) <= -1e+306) {
tmp = (z / t) * y;
} else {
tmp = (z * y) / t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((((z - x) * y) / t) + x) <= -1e+306: tmp = (z / t) * y else: tmp = (z * y) / t return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(Float64(Float64(Float64(z - x) * y) / t) + x) <= -1e+306) tmp = Float64(Float64(z / t) * y); else tmp = Float64(Float64(z * y) / t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((((z - x) * y) / t) + x) <= -1e+306) tmp = (z / t) * y; else tmp = (z * y) / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(N[(N[(N[(z - x), $MachinePrecision] * y), $MachinePrecision] / t), $MachinePrecision] + x), $MachinePrecision], -1e+306], N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision], N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;\frac{\left(z - x\right) \cdot y}{t} + x \leq -1 \cdot 10^{+306}:\\
\;\;\;\;\frac{z}{t} \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot y}{t}\\
\end{array}
\end{array}
if (+.f64 x (/.f64 (*.f64 y (-.f64 z x)) t)) < -1.00000000000000002e306Initial program 85.8%
Taylor expanded in z around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f6451.5
Applied rewrites51.5%
Applied rewrites63.4%
if -1.00000000000000002e306 < (+.f64 x (/.f64 (*.f64 y (-.f64 z x)) t)) Initial program 94.5%
Taylor expanded in z around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f6433.6
Applied rewrites33.6%
Final simplification38.2%
(FPCore (x y z t) :precision binary64 (if (<= y -4.7e+123) (* (/ (- z x) t) y) (if (<= y 1.2e-52) (+ (/ (* z y) t) x) (* (- z x) (/ y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -4.7e+123) {
tmp = ((z - x) / t) * y;
} else if (y <= 1.2e-52) {
tmp = ((z * y) / t) + x;
} else {
tmp = (z - 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 <= (-4.7d+123)) then
tmp = ((z - x) / t) * y
else if (y <= 1.2d-52) then
tmp = ((z * y) / t) + x
else
tmp = (z - 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 <= -4.7e+123) {
tmp = ((z - x) / t) * y;
} else if (y <= 1.2e-52) {
tmp = ((z * y) / t) + x;
} else {
tmp = (z - x) * (y / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -4.7e+123: tmp = ((z - x) / t) * y elif y <= 1.2e-52: tmp = ((z * y) / t) + x else: tmp = (z - x) * (y / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -4.7e+123) tmp = Float64(Float64(Float64(z - x) / t) * y); elseif (y <= 1.2e-52) tmp = Float64(Float64(Float64(z * y) / t) + x); else tmp = Float64(Float64(z - x) * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -4.7e+123) tmp = ((z - x) / t) * y; elseif (y <= 1.2e-52) tmp = ((z * y) / t) + x; else tmp = (z - x) * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -4.7e+123], N[(N[(N[(z - x), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 1.2e-52], N[(N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision] + x), $MachinePrecision], N[(N[(z - x), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.7 \cdot 10^{+123}:\\
\;\;\;\;\frac{z - x}{t} \cdot y\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{-52}:\\
\;\;\;\;\frac{z \cdot y}{t} + x\\
\mathbf{else}:\\
\;\;\;\;\left(z - x\right) \cdot \frac{y}{t}\\
\end{array}
\end{array}
if y < -4.69999999999999979e123Initial program 81.7%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6474.5
Applied rewrites74.5%
Applied rewrites81.9%
if -4.69999999999999979e123 < y < 1.2000000000000001e-52Initial program 97.1%
Taylor expanded in z around inf
*-commutativeN/A
lower-*.f6492.9
Applied rewrites92.9%
if 1.2000000000000001e-52 < y Initial program 92.1%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6480.7
Applied rewrites80.7%
Applied rewrites85.0%
Final simplification88.9%
(FPCore (x y z t) :precision binary64 (if (<= y -2e-34) (* (/ (- z x) t) y) (if (<= y 5.8e-12) (- x (/ (* x y) t)) (* (- z x) (/ y t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -2e-34) {
tmp = ((z - x) / t) * y;
} else if (y <= 5.8e-12) {
tmp = x - ((x * y) / t);
} else {
tmp = (z - 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 <= (-2d-34)) then
tmp = ((z - x) / t) * y
else if (y <= 5.8d-12) then
tmp = x - ((x * y) / t)
else
tmp = (z - 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 <= -2e-34) {
tmp = ((z - x) / t) * y;
} else if (y <= 5.8e-12) {
tmp = x - ((x * y) / t);
} else {
tmp = (z - x) * (y / t);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -2e-34: tmp = ((z - x) / t) * y elif y <= 5.8e-12: tmp = x - ((x * y) / t) else: tmp = (z - x) * (y / t) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -2e-34) tmp = Float64(Float64(Float64(z - x) / t) * y); elseif (y <= 5.8e-12) tmp = Float64(x - Float64(Float64(x * y) / t)); else tmp = Float64(Float64(z - x) * Float64(y / t)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -2e-34) tmp = ((z - x) / t) * y; elseif (y <= 5.8e-12) tmp = x - ((x * y) / t); else tmp = (z - x) * (y / t); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -2e-34], N[(N[(N[(z - x), $MachinePrecision] / t), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 5.8e-12], N[(x - N[(N[(x * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(z - x), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-34}:\\
\;\;\;\;\frac{z - x}{t} \cdot y\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-12}:\\
\;\;\;\;x - \frac{x \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(z - x\right) \cdot \frac{y}{t}\\
\end{array}
\end{array}
if y < -1.99999999999999986e-34Initial program 88.0%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6472.4
Applied rewrites72.4%
Applied rewrites77.4%
if -1.99999999999999986e-34 < y < 5.8000000000000003e-12Initial program 98.1%
Taylor expanded in z around 0
mul-1-negN/A
unsub-negN/A
lower--.f64N/A
lower-/.f64N/A
lower-*.f6478.1
Applied rewrites78.1%
if 5.8000000000000003e-12 < y Initial program 91.3%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6481.7
Applied rewrites81.7%
Applied rewrites86.4%
Final simplification80.1%
(FPCore (x y z t) :precision binary64 (if (<= x -1.45e-30) (* (- x) (/ y t)) (if (<= x 2e+136) (* z (/ y t)) (* (/ (- x) t) y))))
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.45e-30) {
tmp = -x * (y / t);
} else if (x <= 2e+136) {
tmp = z * (y / t);
} else {
tmp = (-x / 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 (x <= (-1.45d-30)) then
tmp = -x * (y / t)
else if (x <= 2d+136) then
tmp = z * (y / t)
else
tmp = (-x / t) * y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x <= -1.45e-30) {
tmp = -x * (y / t);
} else if (x <= 2e+136) {
tmp = z * (y / t);
} else {
tmp = (-x / t) * y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x <= -1.45e-30: tmp = -x * (y / t) elif x <= 2e+136: tmp = z * (y / t) else: tmp = (-x / t) * y return tmp
function code(x, y, z, t) tmp = 0.0 if (x <= -1.45e-30) tmp = Float64(Float64(-x) * Float64(y / t)); elseif (x <= 2e+136) tmp = Float64(z * Float64(y / t)); else tmp = Float64(Float64(Float64(-x) / t) * y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x <= -1.45e-30) tmp = -x * (y / t); elseif (x <= 2e+136) tmp = z * (y / t); else tmp = (-x / t) * y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[x, -1.45e-30], N[((-x) * N[(y / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e+136], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], N[(N[((-x) / t), $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{-30}:\\
\;\;\;\;\left(-x\right) \cdot \frac{y}{t}\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+136}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{-x}{t} \cdot y\\
\end{array}
\end{array}
if x < -1.44999999999999995e-30Initial program 89.6%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6450.5
Applied rewrites50.5%
Applied rewrites56.8%
Taylor expanded in z around 0
Applied rewrites44.1%
if -1.44999999999999995e-30 < x < 2.00000000000000012e136Initial program 95.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6495.8
Applied rewrites95.8%
Taylor expanded in z around inf
associate-*l/N/A
lower-*.f64N/A
lower-/.f6453.2
Applied rewrites53.2%
if 2.00000000000000012e136 < x Initial program 93.3%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6443.0
Applied rewrites43.0%
Taylor expanded in z around 0
Applied rewrites43.6%
Final simplification49.0%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* (/ (- x) t) y))) (if (<= x -1.42e-30) t_1 (if (<= x 2e+136) (* z (/ y t)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = (-x / t) * y;
double tmp;
if (x <= -1.42e-30) {
tmp = t_1;
} else if (x <= 2e+136) {
tmp = z * (y / t);
} else {
tmp = t_1;
}
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) :: t_1
real(8) :: tmp
t_1 = (-x / t) * y
if (x <= (-1.42d-30)) then
tmp = t_1
else if (x <= 2d+136) then
tmp = z * (y / t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = (-x / t) * y;
double tmp;
if (x <= -1.42e-30) {
tmp = t_1;
} else if (x <= 2e+136) {
tmp = z * (y / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = (-x / t) * y tmp = 0 if x <= -1.42e-30: tmp = t_1 elif x <= 2e+136: tmp = z * (y / t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(Float64(Float64(-x) / t) * y) tmp = 0.0 if (x <= -1.42e-30) tmp = t_1; elseif (x <= 2e+136) tmp = Float64(z * Float64(y / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = (-x / t) * y; tmp = 0.0; if (x <= -1.42e-30) tmp = t_1; elseif (x <= 2e+136) tmp = z * (y / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[((-x) / t), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[x, -1.42e-30], t$95$1, If[LessEqual[x, 2e+136], N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{-x}{t} \cdot y\\
\mathbf{if}\;x \leq -1.42 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+136}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -1.42e-30 or 2.00000000000000012e136 < x Initial program 91.0%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6447.8
Applied rewrites47.8%
Taylor expanded in z around 0
Applied rewrites42.3%
if -1.42e-30 < x < 2.00000000000000012e136Initial program 95.0%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6495.8
Applied rewrites95.8%
Taylor expanded in z around inf
associate-*l/N/A
lower-*.f64N/A
lower-/.f6453.2
Applied rewrites53.2%
Final simplification48.2%
(FPCore (x y z t) :precision binary64 (* (- z x) (/ y t)))
double code(double x, double y, double z, double t) {
return (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 = (z - x) * (y / t)
end function
public static double code(double x, double y, double z, double t) {
return (z - x) * (y / t);
}
def code(x, y, z, t): return (z - x) * (y / t)
function code(x, y, z, t) return Float64(Float64(z - x) * Float64(y / t)) end
function tmp = code(x, y, z, t) tmp = (z - x) * (y / t); end
code[x_, y_, z_, t_] := N[(N[(z - x), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(z - x\right) \cdot \frac{y}{t}
\end{array}
Initial program 93.1%
Taylor expanded in t around 0
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lower--.f6456.5
Applied rewrites56.5%
Applied rewrites58.5%
Final simplification58.5%
(FPCore (x y z t) :precision binary64 (* z (/ y t)))
double code(double x, double y, double z, double t) {
return 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 = z * (y / t)
end function
public static double code(double x, double y, double z, double t) {
return z * (y / t);
}
def code(x, y, z, t): return z * (y / t)
function code(x, y, z, t) return Float64(z * Float64(y / t)) end
function tmp = code(x, y, z, t) tmp = z * (y / t); end
code[x_, y_, z_, t_] := N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
z \cdot \frac{y}{t}
\end{array}
Initial program 93.1%
lift-+.f64N/A
+-commutativeN/A
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
*-commutativeN/A
lower-fma.f64N/A
lower-/.f6497.7
Applied rewrites97.7%
Taylor expanded in z around inf
associate-*l/N/A
lower-*.f64N/A
lower-/.f6438.1
Applied rewrites38.1%
Final simplification38.1%
(FPCore (x y z t) :precision binary64 (* (/ z t) y))
double code(double x, double y, double z, double t) {
return (z / 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 = (z / t) * y
end function
public static double code(double x, double y, double z, double t) {
return (z / t) * y;
}
def code(x, y, z, t): return (z / t) * y
function code(x, y, z, t) return Float64(Float64(z / t) * y) end
function tmp = code(x, y, z, t) tmp = (z / t) * y; end
code[x_, y_, z_, t_] := N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision]
\begin{array}{l}
\\
\frac{z}{t} \cdot y
\end{array}
Initial program 93.1%
Taylor expanded in z around inf
lower-/.f64N/A
*-commutativeN/A
lower-*.f6436.4
Applied rewrites36.4%
Applied rewrites35.7%
Final simplification35.7%
(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 2024270
(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)))