
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - 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 - z) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 10 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - 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 - z) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
(FPCore (x y z t) :precision binary64 (fma (- y z) (- t x) x))
double code(double x, double y, double z, double t) {
return fma((y - z), (t - x), x);
}
function code(x, y, z, t) return fma(Float64(y - z), Float64(t - x), x) end
code[x_, y_, z_, t_] := N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y - z, t - x, x\right)
\end{array}
Initial program 100.0%
+-commutative100.0%
fma-define100.0%
Simplified100.0%
(FPCore (x y z t) :precision binary64 (if (or (<= z -4.9e+24) (not (<= z 7.5e+65))) (* z (- x t)) (+ x (* y (- t x)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.9e+24) || !(z <= 7.5e+65)) {
tmp = z * (x - t);
} else {
tmp = x + (y * (t - 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 ((z <= (-4.9d+24)) .or. (.not. (z <= 7.5d+65))) then
tmp = z * (x - t)
else
tmp = x + (y * (t - x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -4.9e+24) || !(z <= 7.5e+65)) {
tmp = z * (x - t);
} else {
tmp = x + (y * (t - x));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -4.9e+24) or not (z <= 7.5e+65): tmp = z * (x - t) else: tmp = x + (y * (t - x)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -4.9e+24) || !(z <= 7.5e+65)) tmp = Float64(z * Float64(x - t)); else tmp = Float64(x + Float64(y * Float64(t - x))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -4.9e+24) || ~((z <= 7.5e+65))) tmp = z * (x - t); else tmp = x + (y * (t - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -4.9e+24], N[Not[LessEqual[z, 7.5e+65]], $MachinePrecision]], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], N[(x + N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.9 \cdot 10^{+24} \lor \neg \left(z \leq 7.5 \cdot 10^{+65}\right):\\
\;\;\;\;z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \left(t - x\right)\\
\end{array}
\end{array}
if z < -4.90000000000000029e24 or 7.50000000000000006e65 < z Initial program 100.0%
Taylor expanded in y around 0 85.2%
mul-1-neg85.2%
unsub-neg85.2%
Simplified85.2%
Taylor expanded in z around inf 85.2%
if -4.90000000000000029e24 < z < 7.50000000000000006e65Initial program 100.0%
Taylor expanded in y around inf 89.1%
*-commutative89.1%
Simplified89.1%
Final simplification87.4%
(FPCore (x y z t) :precision binary64 (if (or (<= t -1.32e-30) (not (<= t 55000000000.0))) (* (- y z) t) (+ x (* x (- z y)))))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.32e-30) || !(t <= 55000000000.0)) {
tmp = (y - z) * t;
} else {
tmp = x + (x * (z - 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 ((t <= (-1.32d-30)) .or. (.not. (t <= 55000000000.0d0))) then
tmp = (y - z) * t
else
tmp = x + (x * (z - y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -1.32e-30) || !(t <= 55000000000.0)) {
tmp = (y - z) * t;
} else {
tmp = x + (x * (z - y));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -1.32e-30) or not (t <= 55000000000.0): tmp = (y - z) * t else: tmp = x + (x * (z - y)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -1.32e-30) || !(t <= 55000000000.0)) tmp = Float64(Float64(y - z) * t); else tmp = Float64(x + Float64(x * Float64(z - y))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -1.32e-30) || ~((t <= 55000000000.0))) tmp = (y - z) * t; else tmp = x + (x * (z - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -1.32e-30], N[Not[LessEqual[t, 55000000000.0]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], N[(x + N[(x * N[(z - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.32 \cdot 10^{-30} \lor \neg \left(t \leq 55000000000\right):\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;x + x \cdot \left(z - y\right)\\
\end{array}
\end{array}
if t < -1.32e-30 or 5.5e10 < t Initial program 100.0%
Taylor expanded in t around inf 85.8%
Taylor expanded in t around inf 85.8%
Taylor expanded in x around 0 80.4%
if -1.32e-30 < t < 5.5e10Initial program 100.0%
Taylor expanded in t around 0 86.7%
mul-1-neg86.7%
distribute-rgt-neg-in86.7%
sub-neg86.7%
+-commutative86.7%
distribute-neg-in86.7%
remove-double-neg86.7%
sub-neg86.7%
Simplified86.7%
Final simplification83.5%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.9e+19) (not (<= z 4.1e+65))) (* z (- x t)) (* y (- t x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.9e+19) || !(z <= 4.1e+65)) {
tmp = z * (x - t);
} else {
tmp = y * (t - 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 ((z <= (-1.9d+19)) .or. (.not. (z <= 4.1d+65))) then
tmp = z * (x - t)
else
tmp = y * (t - x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.9e+19) || !(z <= 4.1e+65)) {
tmp = z * (x - t);
} else {
tmp = y * (t - x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.9e+19) or not (z <= 4.1e+65): tmp = z * (x - t) else: tmp = y * (t - x) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.9e+19) || !(z <= 4.1e+65)) tmp = Float64(z * Float64(x - t)); else tmp = Float64(y * Float64(t - x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.9e+19) || ~((z <= 4.1e+65))) tmp = z * (x - t); else tmp = y * (t - x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.9e+19], N[Not[LessEqual[z, 4.1e+65]], $MachinePrecision]], N[(z * N[(x - t), $MachinePrecision]), $MachinePrecision], N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.9 \cdot 10^{+19} \lor \neg \left(z \leq 4.1 \cdot 10^{+65}\right):\\
\;\;\;\;z \cdot \left(x - t\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(t - x\right)\\
\end{array}
\end{array}
if z < -1.9e19 or 4.1000000000000001e65 < z Initial program 100.0%
Taylor expanded in y around 0 85.2%
mul-1-neg85.2%
unsub-neg85.2%
Simplified85.2%
Taylor expanded in z around inf 85.2%
if -1.9e19 < z < 4.1000000000000001e65Initial program 100.0%
Taylor expanded in y around inf 89.1%
*-commutative89.1%
Simplified89.1%
Taylor expanded in y around inf 70.1%
Final simplification76.6%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.6e+38) (not (<= z 1.2e+67))) (* z x) (* y (- t x))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.6e+38) || !(z <= 1.2e+67)) {
tmp = z * x;
} else {
tmp = y * (t - 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 ((z <= (-1.6d+38)) .or. (.not. (z <= 1.2d+67))) then
tmp = z * x
else
tmp = y * (t - x)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.6e+38) || !(z <= 1.2e+67)) {
tmp = z * x;
} else {
tmp = y * (t - x);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.6e+38) or not (z <= 1.2e+67): tmp = z * x else: tmp = y * (t - x) return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.6e+38) || !(z <= 1.2e+67)) tmp = Float64(z * x); else tmp = Float64(y * Float64(t - x)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.6e+38) || ~((z <= 1.2e+67))) tmp = z * x; else tmp = y * (t - x); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.6e+38], N[Not[LessEqual[z, 1.2e+67]], $MachinePrecision]], N[(z * x), $MachinePrecision], N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+38} \lor \neg \left(z \leq 1.2 \cdot 10^{+67}\right):\\
\;\;\;\;z \cdot x\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(t - x\right)\\
\end{array}
\end{array}
if z < -1.59999999999999993e38 or 1.20000000000000001e67 < z Initial program 100.0%
Taylor expanded in t around 0 65.6%
mul-1-neg65.6%
distribute-rgt-neg-in65.6%
sub-neg65.6%
+-commutative65.6%
distribute-neg-in65.6%
remove-double-neg65.6%
sub-neg65.6%
Simplified65.6%
Taylor expanded in z around inf 57.5%
Taylor expanded in z around inf 57.5%
if -1.59999999999999993e38 < z < 1.20000000000000001e67Initial program 100.0%
Taylor expanded in y around inf 87.0%
*-commutative87.0%
Simplified87.0%
Taylor expanded in y around inf 68.7%
Final simplification64.2%
(FPCore (x y z t) :precision binary64 (if (or (<= t -2.9e-63) (not (<= t 1.18e-33))) (* (- y z) t) (* z x)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.9e-63) || !(t <= 1.18e-33)) {
tmp = (y - z) * t;
} else {
tmp = z * 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.9d-63)) .or. (.not. (t <= 1.18d-33))) then
tmp = (y - z) * t
else
tmp = z * x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -2.9e-63) || !(t <= 1.18e-33)) {
tmp = (y - z) * t;
} else {
tmp = z * x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -2.9e-63) or not (t <= 1.18e-33): tmp = (y - z) * t else: tmp = z * x return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -2.9e-63) || !(t <= 1.18e-33)) tmp = Float64(Float64(y - z) * t); else tmp = Float64(z * x); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((t <= -2.9e-63) || ~((t <= 1.18e-33))) tmp = (y - z) * t; else tmp = z * x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -2.9e-63], N[Not[LessEqual[t, 1.18e-33]], $MachinePrecision]], N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision], N[(z * x), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{-63} \lor \neg \left(t \leq 1.18 \cdot 10^{-33}\right):\\
\;\;\;\;\left(y - z\right) \cdot t\\
\mathbf{else}:\\
\;\;\;\;z \cdot x\\
\end{array}
\end{array}
if t < -2.89999999999999975e-63 or 1.18e-33 < t Initial program 100.0%
Taylor expanded in t around inf 82.6%
Taylor expanded in t around inf 82.6%
Taylor expanded in x around 0 74.9%
if -2.89999999999999975e-63 < t < 1.18e-33Initial program 100.0%
Taylor expanded in t around 0 89.8%
mul-1-neg89.8%
distribute-rgt-neg-in89.8%
sub-neg89.8%
+-commutative89.8%
distribute-neg-in89.8%
remove-double-neg89.8%
sub-neg89.8%
Simplified89.8%
Taylor expanded in z around inf 58.9%
Taylor expanded in z around inf 44.6%
Final simplification62.0%
(FPCore (x y z t) :precision binary64 (if (or (<= z -1.35e+38) (not (<= z 7.6e+65))) (* z x) (* y t)))
double code(double x, double y, double z, double t) {
double tmp;
if ((z <= -1.35e+38) || !(z <= 7.6e+65)) {
tmp = z * x;
} else {
tmp = 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.35d+38)) .or. (.not. (z <= 7.6d+65))) then
tmp = z * x
else
tmp = 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.35e+38) || !(z <= 7.6e+65)) {
tmp = z * x;
} else {
tmp = y * t;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z <= -1.35e+38) or not (z <= 7.6e+65): tmp = z * x else: tmp = y * t return tmp
function code(x, y, z, t) tmp = 0.0 if ((z <= -1.35e+38) || !(z <= 7.6e+65)) tmp = Float64(z * x); else tmp = Float64(y * t); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z <= -1.35e+38) || ~((z <= 7.6e+65))) tmp = z * x; else tmp = y * t; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[z, -1.35e+38], N[Not[LessEqual[z, 7.6e+65]], $MachinePrecision]], N[(z * x), $MachinePrecision], N[(y * t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{+38} \lor \neg \left(z \leq 7.6 \cdot 10^{+65}\right):\\
\;\;\;\;z \cdot x\\
\mathbf{else}:\\
\;\;\;\;y \cdot t\\
\end{array}
\end{array}
if z < -1.34999999999999998e38 or 7.60000000000000022e65 < z Initial program 100.0%
Taylor expanded in t around 0 65.6%
mul-1-neg65.6%
distribute-rgt-neg-in65.6%
sub-neg65.6%
+-commutative65.6%
distribute-neg-in65.6%
remove-double-neg65.6%
sub-neg65.6%
Simplified65.6%
Taylor expanded in z around inf 57.5%
Taylor expanded in z around inf 57.5%
if -1.34999999999999998e38 < z < 7.60000000000000022e65Initial program 100.0%
Taylor expanded in t around inf 70.2%
Taylor expanded in t around inf 68.9%
Taylor expanded in y around inf 41.1%
Final simplification47.8%
(FPCore (x y z t) :precision binary64 (if (or (<= y -8e-57) (not (<= y 1.2e-18))) (* y t) x))
double code(double x, double y, double z, double t) {
double tmp;
if ((y <= -8e-57) || !(y <= 1.2e-18)) {
tmp = 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 <= (-8d-57)) .or. (.not. (y <= 1.2d-18))) then
tmp = 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 <= -8e-57) || !(y <= 1.2e-18)) {
tmp = y * t;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (y <= -8e-57) or not (y <= 1.2e-18): tmp = y * t else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if ((y <= -8e-57) || !(y <= 1.2e-18)) tmp = Float64(y * t); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((y <= -8e-57) || ~((y <= 1.2e-18))) tmp = y * t; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[y, -8e-57], N[Not[LessEqual[y, 1.2e-18]], $MachinePrecision]], N[(y * t), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-57} \lor \neg \left(y \leq 1.2 \cdot 10^{-18}\right):\\
\;\;\;\;y \cdot t\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -7.99999999999999964e-57 or 1.19999999999999997e-18 < y Initial program 99.9%
Taylor expanded in t around inf 51.6%
Taylor expanded in t around inf 56.9%
Taylor expanded in y around inf 41.0%
if -7.99999999999999964e-57 < y < 1.19999999999999997e-18Initial program 100.0%
Taylor expanded in t around inf 69.3%
Taylor expanded in x around inf 29.0%
Final simplification36.3%
(FPCore (x y z t) :precision binary64 (+ x (* (- y z) (- t x))))
double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - 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 - z) * (t - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((y - z) * (t - x));
}
def code(x, y, z, t): return x + ((y - z) * (t - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(y - z) * Float64(t - x))) end
function tmp = code(x, y, z, t) tmp = x + ((y - z) * (t - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(y - z\right) \cdot \left(t - x\right)
\end{array}
Initial program 100.0%
(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 100.0%
Taylor expanded in t around inf 58.6%
Taylor expanded in x around inf 13.2%
(FPCore (x y z t) :precision binary64 (+ x (+ (* t (- y z)) (* (- x) (- y z)))))
double code(double x, double y, double z, double t) {
return x + ((t * (y - z)) + (-x * (y - z)));
}
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 + ((t * (y - z)) + (-x * (y - z)))
end function
public static double code(double x, double y, double z, double t) {
return x + ((t * (y - z)) + (-x * (y - z)));
}
def code(x, y, z, t): return x + ((t * (y - z)) + (-x * (y - z)))
function code(x, y, z, t) return Float64(x + Float64(Float64(t * Float64(y - z)) + Float64(Float64(-x) * Float64(y - z)))) end
function tmp = code(x, y, z, t) tmp = x + ((t * (y - z)) + (-x * (y - z))); end
code[x_, y_, z_, t_] := N[(x + N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] + N[((-x) * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \left(t \cdot \left(y - z\right) + \left(-x\right) \cdot \left(y - z\right)\right)
\end{array}
herbie shell --seed 2024150
(FPCore (x y z t)
:name "Data.Metrics.Snapshot:quantile from metrics-0.3.0.2"
:precision binary64
:alt
(! :herbie-platform default (+ x (+ (* t (- y z)) (* (- x) (- y z)))))
(+ x (* (- y z) (- t x))))