
(FPCore (x y z t) :precision binary64 (+ x (/ (* (- y x) z) t)))
double code(double x, double y, double z, double t) {
return x + (((y - x) * z) / 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 - x) * z) / t)
end function
public static double code(double x, double y, double z, double t) {
return x + (((y - x) * z) / t);
}
def code(x, y, z, t): return x + (((y - x) * z) / t)
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(y - x) * z) / t)) end
function tmp = code(x, y, z, t) tmp = x + (((y - x) * z) / t); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot z}{t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 9 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (+ x (/ (* (- y x) z) t)))
double code(double x, double y, double z, double t) {
return x + (((y - x) * z) / 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 - x) * z) / t)
end function
public static double code(double x, double y, double z, double t) {
return x + (((y - x) * z) / t);
}
def code(x, y, z, t): return x + (((y - x) * z) / t)
function code(x, y, z, t) return Float64(x + Float64(Float64(Float64(y - x) * z) / t)) end
function tmp = code(x, y, z, t) tmp = x + (((y - x) * z) / t); end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{\left(y - x\right) \cdot z}{t}
\end{array}
(FPCore (x y z t) :precision binary64 (fma (/ z t) (- y x) x))
double code(double x, double y, double z, double t) {
return fma((z / t), (y - x), x);
}
function code(x, y, z, t) return fma(Float64(z / t), Float64(y - x), x) end
code[x_, y_, z_, t_] := N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{z}{t}, y - x, x\right)
\end{array}
Initial program 93.0%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6497.8
Applied egg-rr97.8%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (fma z (/ y t) x))) (if (<= t -7.5e+60) t_1 (if (<= t 3.05e-52) (/ (* z (- y x)) t) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = fma(z, (y / t), x);
double tmp;
if (t <= -7.5e+60) {
tmp = t_1;
} else if (t <= 3.05e-52) {
tmp = (z * (y - x)) / t;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = fma(z, Float64(y / t), x) tmp = 0.0 if (t <= -7.5e+60) tmp = t_1; elseif (t <= 3.05e-52) tmp = Float64(Float64(z * Float64(y - x)) / t); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(y / t), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t, -7.5e+60], t$95$1, If[LessEqual[t, 3.05e-52], N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, \frac{y}{t}, x\right)\\
\mathbf{if}\;t \leq -7.5 \cdot 10^{+60}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.05 \cdot 10^{-52}:\\
\;\;\;\;\frac{z \cdot \left(y - x\right)}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.5e60 or 3.04999999999999995e-52 < t Initial program 85.9%
Taylor expanded in y around inf
Simplified81.3%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6489.5
Applied egg-rr89.5%
if -7.5e60 < t < 3.04999999999999995e-52Initial program 99.3%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6497.2
Applied egg-rr97.2%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6486.4
Simplified86.4%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* z (/ (- y x) t)))) (if (<= z -1.16e+40) t_1 (if (<= z 6.2e-30) (+ x (/ (* z y) t)) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = z * ((y - x) / t);
double tmp;
if (z <= -1.16e+40) {
tmp = t_1;
} else if (z <= 6.2e-30) {
tmp = x + ((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 = z * ((y - x) / t)
if (z <= (-1.16d+40)) then
tmp = t_1
else if (z <= 6.2d-30) then
tmp = x + ((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 = z * ((y - x) / t);
double tmp;
if (z <= -1.16e+40) {
tmp = t_1;
} else if (z <= 6.2e-30) {
tmp = x + ((z * y) / t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * ((y - x) / t) tmp = 0 if z <= -1.16e+40: tmp = t_1 elif z <= 6.2e-30: tmp = x + ((z * y) / t) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(Float64(y - x) / t)) tmp = 0.0 if (z <= -1.16e+40) tmp = t_1; elseif (z <= 6.2e-30) tmp = Float64(x + Float64(Float64(z * y) / t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * ((y - x) / t); tmp = 0.0; if (z <= -1.16e+40) tmp = t_1; elseif (z <= 6.2e-30) tmp = x + ((z * y) / t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.16e+40], t$95$1, If[LessEqual[z, 6.2e-30], N[(x + N[(N[(z * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y - x}{t}\\
\mathbf{if}\;z \leq -1.16 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-30}:\\
\;\;\;\;x + \frac{z \cdot y}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.16000000000000012e40 or 6.19999999999999982e-30 < z Initial program 87.2%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6497.1
Applied egg-rr97.1%
Taylor expanded in z around inf
div-subN/A
associate-/l*N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f6477.2
Simplified77.2%
associate-/l*N/A
*-commutativeN/A
div-invN/A
remove-double-divN/A
inv-powN/A
inv-powN/A
pow-prod-downN/A
*-commutativeN/A
pow-prod-downN/A
inv-powN/A
inv-powN/A
remove-double-divN/A
*-lowering-*.f64N/A
inv-powN/A
remove-double-divN/A
inv-powN/A
pow-prod-downN/A
*-commutativeN/A
pow-prod-downN/A
inv-powN/A
remove-double-divN/A
inv-powN/A
div-invN/A
/-lowering-/.f64N/A
--lowering--.f6486.5
Applied egg-rr86.5%
if -1.16000000000000012e40 < z < 6.19999999999999982e-30Initial program 99.2%
Taylor expanded in y around inf
Simplified88.7%
Final simplification87.6%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (fma (/ z t) y x))) (if (<= y -1.1e-64) t_1 (if (<= y 2.1e-135) (* x (- 1.0 (/ z t))) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = fma((z / t), y, x);
double tmp;
if (y <= -1.1e-64) {
tmp = t_1;
} else if (y <= 2.1e-135) {
tmp = x * (1.0 - (z / t));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = fma(Float64(z / t), y, x) tmp = 0.0 if (y <= -1.1e-64) tmp = t_1; elseif (y <= 2.1e-135) tmp = Float64(x * Float64(1.0 - Float64(z / t))); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z / t), $MachinePrecision] * y + x), $MachinePrecision]}, If[LessEqual[y, -1.1e-64], t$95$1, If[LessEqual[y, 2.1e-135], N[(x * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(\frac{z}{t}, y, x\right)\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{-64}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-135}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.1e-64 or 2.1e-135 < y Initial program 92.0%
Taylor expanded in y around inf
Simplified80.9%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6485.0
Applied egg-rr85.0%
if -1.1e-64 < y < 2.1e-135Initial program 95.2%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f64N/A
--lowering--.f6497.6
Applied egg-rr97.6%
Taylor expanded in y around 0
mul-1-negN/A
*-rgt-identityN/A
associate-/l*N/A
distribute-rgt-neg-inN/A
mul-1-negN/A
distribute-lft-inN/A
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6493.2
Simplified93.2%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (fma z (/ y t) x))) (if (<= t -2.7e-200) t_1 (if (<= t 7.5e-101) (* (/ z t) y) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = fma(z, (y / t), x);
double tmp;
if (t <= -2.7e-200) {
tmp = t_1;
} else if (t <= 7.5e-101) {
tmp = (z / t) * y;
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t) t_1 = fma(z, Float64(y / t), x) tmp = 0.0 if (t <= -2.7e-200) tmp = t_1; elseif (t <= 7.5e-101) tmp = Float64(Float64(z / t) * y); else tmp = t_1; end return tmp end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(y / t), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t, -2.7e-200], t$95$1, If[LessEqual[t, 7.5e-101], N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(z, \frac{y}{t}, x\right)\\
\mathbf{if}\;t \leq -2.7 \cdot 10^{-200}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 7.5 \cdot 10^{-101}:\\
\;\;\;\;\frac{z}{t} \cdot y\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.7000000000000001e-200 or 7.5000000000000001e-101 < t Initial program 91.0%
Taylor expanded in y around inf
Simplified74.2%
+-commutativeN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6478.4
Applied egg-rr78.4%
if -2.7000000000000001e-200 < t < 7.5000000000000001e-101Initial program 98.7%
Taylor expanded in x around 0
+-rgt-identityN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6451.3
Simplified51.3%
+-rgt-identityN/A
associate-*r/N/A
associate-*l/N/A
*-lowering-*.f64N/A
/-lowering-/.f6470.2
Applied egg-rr70.2%
(FPCore (x y z t) :precision binary64 (if (<= t -2.65e+45) x (if (<= t 1.55e+52) (* (/ z t) y) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -2.65e+45) {
tmp = x;
} else if (t <= 1.55e+52) {
tmp = (z / 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 <= (-2.65d+45)) then
tmp = x
else if (t <= 1.55d+52) then
tmp = (z / 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 <= -2.65e+45) {
tmp = x;
} else if (t <= 1.55e+52) {
tmp = (z / t) * y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -2.65e+45: tmp = x elif t <= 1.55e+52: tmp = (z / t) * y else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -2.65e+45) tmp = x; elseif (t <= 1.55e+52) tmp = Float64(Float64(z / t) * y); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -2.65e+45) tmp = x; elseif (t <= 1.55e+52) tmp = (z / t) * y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -2.65e+45], x, If[LessEqual[t, 1.55e+52], N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.65 \cdot 10^{+45}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{+52}:\\
\;\;\;\;\frac{z}{t} \cdot y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -2.64999999999999996e45 or 1.55e52 < t Initial program 84.0%
Taylor expanded in z around 0
Simplified68.8%
if -2.64999999999999996e45 < t < 1.55e52Initial program 98.7%
Taylor expanded in x around 0
+-rgt-identityN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6445.9
Simplified45.9%
+-rgt-identityN/A
associate-*r/N/A
associate-*l/N/A
*-lowering-*.f64N/A
/-lowering-/.f6454.3
Applied egg-rr54.3%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* z (/ y t)))) (if (<= z -1.2e-30) t_1 (if (<= z 8200000000.0) x t_1))))
double code(double x, double y, double z, double t) {
double t_1 = z * (y / t);
double tmp;
if (z <= -1.2e-30) {
tmp = t_1;
} else if (z <= 8200000000.0) {
tmp = x;
} 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 = z * (y / t)
if (z <= (-1.2d-30)) then
tmp = t_1
else if (z <= 8200000000.0d0) then
tmp = x
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 = z * (y / t);
double tmp;
if (z <= -1.2e-30) {
tmp = t_1;
} else if (z <= 8200000000.0) {
tmp = x;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = z * (y / t) tmp = 0 if z <= -1.2e-30: tmp = t_1 elif z <= 8200000000.0: tmp = x else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(z * Float64(y / t)) tmp = 0.0 if (z <= -1.2e-30) tmp = t_1; elseif (z <= 8200000000.0) tmp = x; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = z * (y / t); tmp = 0.0; if (z <= -1.2e-30) tmp = t_1; elseif (z <= 8200000000.0) tmp = x; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.2e-30], t$95$1, If[LessEqual[z, 8200000000.0], x, t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \frac{y}{t}\\
\mathbf{if}\;z \leq -1.2 \cdot 10^{-30}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8200000000:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.19999999999999992e-30 or 8.2e9 < z Initial program 87.7%
Taylor expanded in x around 0
+-rgt-identityN/A
*-commutativeN/A
associate-/l*N/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6454.3
Simplified54.3%
+-rgt-identityN/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f6454.3
Applied egg-rr54.3%
if -1.19999999999999992e-30 < z < 8.2e9Initial program 99.3%
Taylor expanded in z around 0
Simplified60.9%
Final simplification57.3%
(FPCore (x y z t) :precision binary64 (fma (/ z t) y x))
double code(double x, double y, double z, double t) {
return fma((z / t), y, x);
}
function code(x, y, z, t) return fma(Float64(z / t), y, x) end
code[x_, y_, z_, t_] := N[(N[(z / t), $MachinePrecision] * y + x), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(\frac{z}{t}, y, x\right)
\end{array}
Initial program 93.0%
Taylor expanded in y around inf
Simplified72.4%
+-commutativeN/A
associate-/l*N/A
*-commutativeN/A
accelerator-lowering-fma.f64N/A
/-lowering-/.f6477.1
Applied egg-rr77.1%
(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 93.0%
Taylor expanded in z around 0
Simplified37.3%
(FPCore (x y z t)
:precision binary64
(if (< x -9.025511195533005e-135)
(- x (* (/ z t) (- x y)))
(if (< x 4.275032163700715e-250)
(+ x (* (/ (- y x) t) z))
(+ x (/ (- y x) (/ t z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (x < -9.025511195533005e-135) {
tmp = x - ((z / t) * (x - y));
} else if (x < 4.275032163700715e-250) {
tmp = x + (((y - x) / t) * z);
} else {
tmp = x + ((y - x) / (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 < (-9.025511195533005d-135)) then
tmp = x - ((z / t) * (x - y))
else if (x < 4.275032163700715d-250) then
tmp = x + (((y - x) / t) * z)
else
tmp = x + ((y - x) / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (x < -9.025511195533005e-135) {
tmp = x - ((z / t) * (x - y));
} else if (x < 4.275032163700715e-250) {
tmp = x + (((y - x) / t) * z);
} else {
tmp = x + ((y - x) / (t / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if x < -9.025511195533005e-135: tmp = x - ((z / t) * (x - y)) elif x < 4.275032163700715e-250: tmp = x + (((y - x) / t) * z) else: tmp = x + ((y - x) / (t / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (x < -9.025511195533005e-135) tmp = Float64(x - Float64(Float64(z / t) * Float64(x - y))); elseif (x < 4.275032163700715e-250) tmp = Float64(x + Float64(Float64(Float64(y - x) / t) * z)); else tmp = Float64(x + Float64(Float64(y - x) / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (x < -9.025511195533005e-135) tmp = x - ((z / t) * (x - y)); elseif (x < 4.275032163700715e-250) tmp = x + (((y - x) / t) * z); else tmp = x + ((y - x) / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Less[x, -9.025511195533005e-135], N[(x - N[(N[(z / t), $MachinePrecision] * N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Less[x, 4.275032163700715e-250], N[(x + N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x < -9.025511195533005 \cdot 10^{-135}:\\
\;\;\;\;x - \frac{z}{t} \cdot \left(x - y\right)\\
\mathbf{elif}\;x < 4.275032163700715 \cdot 10^{-250}:\\
\;\;\;\;x + \frac{y - x}{t} \cdot z\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\
\end{array}
\end{array}
herbie shell --seed 2024198
(FPCore (x y z t)
:name "Numeric.Histogram:binBounds from Chart-1.5.3"
:precision binary64
:alt
(! :herbie-platform default (if (< x -1805102239106601/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- x (* (/ z t) (- x y))) (if (< x 855006432740143/2000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) t) z)) (+ x (/ (- y x) (/ t z))))))
(+ x (/ (* (- y x) z) t)))