
(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 7 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 (+ x (* (/ z t) (- y x))))
double code(double x, double y, double z, double t) {
return x + ((z / t) * (y - 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 + ((z / t) * (y - x))
end function
public static double code(double x, double y, double z, double t) {
return x + ((z / t) * (y - x));
}
def code(x, y, z, t): return x + ((z / t) * (y - x))
function code(x, y, z, t) return Float64(x + Float64(Float64(z / t) * Float64(y - x))) end
function tmp = code(x, y, z, t) tmp = x + ((z / t) * (y - x)); end
code[x_, y_, z_, t_] := N[(x + N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
x + \frac{z}{t} \cdot \left(y - x\right)
\end{array}
Initial program 90.3%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.4%
Applied egg-rr99.4%
(FPCore (x y z t) :precision binary64 (if (<= t -1.45e+60) (* x (- 1.0 (/ z t))) (if (<= t 2.65e-152) (/ (- y x) (/ t z)) (+ x (/ y (/ t z))))))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.45e+60) {
tmp = x * (1.0 - (z / t));
} else if (t <= 2.65e-152) {
tmp = (y - x) / (t / z);
} else {
tmp = x + (y / (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 (t <= (-1.45d+60)) then
tmp = x * (1.0d0 - (z / t))
else if (t <= 2.65d-152) then
tmp = (y - x) / (t / z)
else
tmp = x + (y / (t / z))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (t <= -1.45e+60) {
tmp = x * (1.0 - (z / t));
} else if (t <= 2.65e-152) {
tmp = (y - x) / (t / z);
} else {
tmp = x + (y / (t / z));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -1.45e+60: tmp = x * (1.0 - (z / t)) elif t <= 2.65e-152: tmp = (y - x) / (t / z) else: tmp = x + (y / (t / z)) return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -1.45e+60) tmp = Float64(x * Float64(1.0 - Float64(z / t))); elseif (t <= 2.65e-152) tmp = Float64(Float64(y - x) / Float64(t / z)); else tmp = Float64(x + Float64(y / Float64(t / z))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (t <= -1.45e+60) tmp = x * (1.0 - (z / t)); elseif (t <= 2.65e-152) tmp = (y - x) / (t / z); else tmp = x + (y / (t / z)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -1.45e+60], N[(x * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.65e-152], N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{+60}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;t \leq 2.65 \cdot 10^{-152}:\\
\;\;\;\;\frac{y - x}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if t < -1.45e60Initial program 76.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6491.8%
Simplified91.8%
if -1.45e60 < t < 2.6500000000000001e-152Initial program 97.4%
Taylor expanded in z around inf
div-subN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6484.6%
Simplified84.6%
*-commutativeN/A
associate-/r/N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
/-lowering-/.f6491.7%
Applied egg-rr91.7%
if 2.6500000000000001e-152 < t Initial program 88.9%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-lowering-*.f6478.3%
Simplified78.3%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6485.3%
Applied egg-rr85.3%
(FPCore (x y z t) :precision binary64 (let* ((t_1 (* x (- 1.0 (/ z t))))) (if (<= x -7.2e+43) t_1 (if (<= x 3.4e+55) (+ x (/ y (/ t z))) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = x * (1.0 - (z / t));
double tmp;
if (x <= -7.2e+43) {
tmp = t_1;
} else if (x <= 3.4e+55) {
tmp = x + (y / (t / z));
} 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 * (1.0d0 - (z / t))
if (x <= (-7.2d+43)) then
tmp = t_1
else if (x <= 3.4d+55) then
tmp = x + (y / (t / z))
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 * (1.0 - (z / t));
double tmp;
if (x <= -7.2e+43) {
tmp = t_1;
} else if (x <= 3.4e+55) {
tmp = x + (y / (t / z));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = x * (1.0 - (z / t)) tmp = 0 if x <= -7.2e+43: tmp = t_1 elif x <= 3.4e+55: tmp = x + (y / (t / z)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(x * Float64(1.0 - Float64(z / t))) tmp = 0.0 if (x <= -7.2e+43) tmp = t_1; elseif (x <= 3.4e+55) tmp = Float64(x + Float64(y / Float64(t / z))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x * (1.0 - (z / t)); tmp = 0.0; if (x <= -7.2e+43) tmp = t_1; elseif (x <= 3.4e+55) tmp = x + (y / (t / z)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.2e+43], t$95$1, If[LessEqual[x, 3.4e+55], N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{if}\;x \leq -7.2 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{+55}:\\
\;\;\;\;x + \frac{y}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if x < -7.2000000000000002e43 or 3.3999999999999998e55 < x Initial program 89.1%
Taylor expanded in x around inf
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6491.6%
Simplified91.6%
if -7.2000000000000002e43 < x < 3.3999999999999998e55Initial program 91.1%
Taylor expanded in y around inf
/-lowering-/.f64N/A
*-lowering-*.f6480.3%
Simplified80.3%
associate-/l*N/A
clear-numN/A
un-div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6487.2%
Applied egg-rr87.2%
(FPCore (x y z t) :precision binary64 (if (<= y -7.5e+41) (* z (/ (- y x) t)) (if (<= y 1.65e+223) (* x (- 1.0 (/ z t))) (/ y (/ t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.5e+41) {
tmp = z * ((y - x) / t);
} else if (y <= 1.65e+223) {
tmp = x * (1.0 - (z / t));
} else {
tmp = y / (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 (y <= (-7.5d+41)) then
tmp = z * ((y - x) / t)
else if (y <= 1.65d+223) then
tmp = x * (1.0d0 - (z / t))
else
tmp = y / (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -7.5e+41) {
tmp = z * ((y - x) / t);
} else if (y <= 1.65e+223) {
tmp = x * (1.0 - (z / t));
} else {
tmp = y / (t / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -7.5e+41: tmp = z * ((y - x) / t) elif y <= 1.65e+223: tmp = x * (1.0 - (z / t)) else: tmp = y / (t / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -7.5e+41) tmp = Float64(z * Float64(Float64(y - x) / t)); elseif (y <= 1.65e+223) tmp = Float64(x * Float64(1.0 - Float64(z / t))); else tmp = Float64(y / Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -7.5e+41) tmp = z * ((y - x) / t); elseif (y <= 1.65e+223) tmp = x * (1.0 - (z / t)); else tmp = y / (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -7.5e+41], N[(z * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e+223], N[(x * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.5 \cdot 10^{+41}:\\
\;\;\;\;z \cdot \frac{y - x}{t}\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{+223}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if y < -7.50000000000000072e41Initial program 83.6%
Taylor expanded in z around inf
div-subN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6480.5%
Simplified80.5%
if -7.50000000000000072e41 < y < 1.65e223Initial program 92.8%
Taylor expanded in x around inf
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6480.1%
Simplified80.1%
if 1.65e223 < y Initial program 82.4%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.7%
Applied egg-rr99.7%
Taylor expanded in x around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6493.6%
Simplified93.6%
clear-numN/A
div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6493.8%
Applied egg-rr93.8%
(FPCore (x y z t) :precision binary64 (if (<= y -3.2e+115) (* (/ z t) y) (if (<= y 9e+224) (* x (- 1.0 (/ z t))) (/ y (/ t z)))))
double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.2e+115) {
tmp = (z / t) * y;
} else if (y <= 9e+224) {
tmp = x * (1.0 - (z / t));
} else {
tmp = y / (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 (y <= (-3.2d+115)) then
tmp = (z / t) * y
else if (y <= 9d+224) then
tmp = x * (1.0d0 - (z / t))
else
tmp = y / (t / z)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (y <= -3.2e+115) {
tmp = (z / t) * y;
} else if (y <= 9e+224) {
tmp = x * (1.0 - (z / t));
} else {
tmp = y / (t / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if y <= -3.2e+115: tmp = (z / t) * y elif y <= 9e+224: tmp = x * (1.0 - (z / t)) else: tmp = y / (t / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (y <= -3.2e+115) tmp = Float64(Float64(z / t) * y); elseif (y <= 9e+224) tmp = Float64(x * Float64(1.0 - Float64(z / t))); else tmp = Float64(y / Float64(t / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (y <= -3.2e+115) tmp = (z / t) * y; elseif (y <= 9e+224) tmp = x * (1.0 - (z / t)); else tmp = y / (t / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[y, -3.2e+115], N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 9e+224], N[(x * N[(1.0 - N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+115}:\\
\;\;\;\;\frac{z}{t} \cdot y\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+224}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\end{array}
\end{array}
if y < -3.2e115Initial program 86.8%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
Taylor expanded in x around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6487.7%
Simplified87.7%
if -3.2e115 < y < 8.9999999999999995e224Initial program 91.5%
Taylor expanded in x around inf
*-lowering-*.f64N/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6478.8%
Simplified78.8%
if 8.9999999999999995e224 < y Initial program 82.4%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.7%
Applied egg-rr99.7%
Taylor expanded in x around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6493.6%
Simplified93.6%
clear-numN/A
div-invN/A
/-lowering-/.f64N/A
/-lowering-/.f6493.8%
Applied egg-rr93.8%
Final simplification81.0%
(FPCore (x y z t) :precision binary64 (if (<= t -4.4e+55) x (if (<= t 1.46e+90) (* (/ z t) y) x)))
double code(double x, double y, double z, double t) {
double tmp;
if (t <= -4.4e+55) {
tmp = x;
} else if (t <= 1.46e+90) {
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 <= (-4.4d+55)) then
tmp = x
else if (t <= 1.46d+90) 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 <= -4.4e+55) {
tmp = x;
} else if (t <= 1.46e+90) {
tmp = (z / t) * y;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if t <= -4.4e+55: tmp = x elif t <= 1.46e+90: tmp = (z / t) * y else: tmp = x return tmp
function code(x, y, z, t) tmp = 0.0 if (t <= -4.4e+55) tmp = x; elseif (t <= 1.46e+90) 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 <= -4.4e+55) tmp = x; elseif (t <= 1.46e+90) tmp = (z / t) * y; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[t, -4.4e+55], x, If[LessEqual[t, 1.46e+90], N[(N[(z / t), $MachinePrecision] * y), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{+55}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.46 \cdot 10^{+90}:\\
\;\;\;\;\frac{z}{t} \cdot y\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -4.40000000000000021e55 or 1.45999999999999994e90 < t Initial program 78.3%
Taylor expanded in z around 0
Simplified72.0%
if -4.40000000000000021e55 < t < 1.45999999999999994e90Initial program 97.5%
associate-/l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f6499.9%
Applied egg-rr99.9%
Taylor expanded in x around 0
associate-/l*N/A
*-lowering-*.f64N/A
/-lowering-/.f6455.8%
Simplified55.8%
Final simplification61.9%
(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 90.3%
Taylor expanded in z around 0
Simplified38.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 2024161
(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)))