
(FPCore (x y z t) :precision binary64 (/ x (- y (* z t))))
double code(double x, double y, double z, double t) {
return x / (y - (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 - (z * t))
end function
public static double code(double x, double y, double z, double t) {
return x / (y - (z * t));
}
def code(x, y, z, t): return x / (y - (z * t))
function code(x, y, z, t) return Float64(x / Float64(y - Float64(z * t))) end
function tmp = code(x, y, z, t) tmp = x / (y - (z * t)); end
code[x_, y_, z_, t_] := N[(x / N[(y - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y - z \cdot t}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 6 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t) :precision binary64 (/ x (- y (* z t))))
double code(double x, double y, double z, double t) {
return x / (y - (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 - (z * t))
end function
public static double code(double x, double y, double z, double t) {
return x / (y - (z * t));
}
def code(x, y, z, t): return x / (y - (z * t))
function code(x, y, z, t) return Float64(x / Float64(y - Float64(z * t))) end
function tmp = code(x, y, z, t) tmp = x / (y - (z * t)); end
code[x_, y_, z_, t_] := N[(x / N[(y - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y - z \cdot t}
\end{array}
(FPCore (x y z t) :precision binary64 (if (<= (* z t) 1e+297) (/ x (- y (* z t))) (/ (/ x t) (- z))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * t) <= 1e+297) {
tmp = x / (y - (z * t));
} else {
tmp = (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 ((z * t) <= 1d+297) then
tmp = x / (y - (z * t))
else
tmp = (x / t) / -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if ((z * t) <= 1e+297) {
tmp = x / (y - (z * t));
} else {
tmp = (x / t) / -z;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * t) <= 1e+297: tmp = x / (y - (z * t)) else: tmp = (x / t) / -z return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * t) <= 1e+297) tmp = Float64(x / Float64(y - Float64(z * t))); else tmp = Float64(Float64(x / t) / Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * t) <= 1e+297) tmp = x / (y - (z * t)); else tmp = (x / t) / -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * t), $MachinePrecision], 1e+297], N[(x / N[(y - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq 10^{+297}:\\
\;\;\;\;\frac{x}{y - z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\
\end{array}
\end{array}
if (*.f64 z t) < 1e297Initial program 98.2%
if 1e297 < (*.f64 z t) Initial program 64.4%
clear-num64.4%
associate-/r/64.4%
Applied egg-rr64.4%
Taylor expanded in y around 0 64.4%
mul-1-neg64.4%
associate-/r*99.9%
distribute-neg-frac299.9%
Simplified99.9%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* t (- z)))))
(if (<= (* z t) -5e-10)
t_1
(if (<= (* z t) 1e-56)
(/ x y)
(if (<= (* z t) 1e-11)
t_1
(if (<= (* z t) 2e+55) (/ x y) (/ -1.0 (* z (/ t x)))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (t * -z);
double tmp;
if ((z * t) <= -5e-10) {
tmp = t_1;
} else if ((z * t) <= 1e-56) {
tmp = x / y;
} else if ((z * t) <= 1e-11) {
tmp = t_1;
} else if ((z * t) <= 2e+55) {
tmp = x / y;
} else {
tmp = -1.0 / (z * (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) :: t_1
real(8) :: tmp
t_1 = x / (t * -z)
if ((z * t) <= (-5d-10)) then
tmp = t_1
else if ((z * t) <= 1d-56) then
tmp = x / y
else if ((z * t) <= 1d-11) then
tmp = t_1
else if ((z * t) <= 2d+55) then
tmp = x / y
else
tmp = (-1.0d0) / (z * (t / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (t * -z);
double tmp;
if ((z * t) <= -5e-10) {
tmp = t_1;
} else if ((z * t) <= 1e-56) {
tmp = x / y;
} else if ((z * t) <= 1e-11) {
tmp = t_1;
} else if ((z * t) <= 2e+55) {
tmp = x / y;
} else {
tmp = -1.0 / (z * (t / x));
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (t * -z) tmp = 0 if (z * t) <= -5e-10: tmp = t_1 elif (z * t) <= 1e-56: tmp = x / y elif (z * t) <= 1e-11: tmp = t_1 elif (z * t) <= 2e+55: tmp = x / y else: tmp = -1.0 / (z * (t / x)) return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(t * Float64(-z))) tmp = 0.0 if (Float64(z * t) <= -5e-10) tmp = t_1; elseif (Float64(z * t) <= 1e-56) tmp = Float64(x / y); elseif (Float64(z * t) <= 1e-11) tmp = t_1; elseif (Float64(z * t) <= 2e+55) tmp = Float64(x / y); else tmp = Float64(-1.0 / Float64(z * Float64(t / x))); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (t * -z); tmp = 0.0; if ((z * t) <= -5e-10) tmp = t_1; elseif ((z * t) <= 1e-56) tmp = x / y; elseif ((z * t) <= 1e-11) tmp = t_1; elseif ((z * t) <= 2e+55) tmp = x / y; else tmp = -1.0 / (z * (t / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(t * (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z * t), $MachinePrecision], -5e-10], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], 1e-56], N[(x / y), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 1e-11], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], 2e+55], N[(x / y), $MachinePrecision], N[(-1.0 / N[(z * N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{t \cdot \left(-z\right)}\\
\mathbf{if}\;z \cdot t \leq -5 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \cdot t \leq 10^{-56}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;z \cdot t \leq 10^{-11}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+55}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{z \cdot \frac{t}{x}}\\
\end{array}
\end{array}
if (*.f64 z t) < -5.00000000000000031e-10 or 1e-56 < (*.f64 z t) < 9.99999999999999939e-12Initial program 95.2%
Taylor expanded in y around 0 75.5%
associate-*r/75.5%
neg-mul-175.5%
Simplified75.5%
if -5.00000000000000031e-10 < (*.f64 z t) < 1e-56 or 9.99999999999999939e-12 < (*.f64 z t) < 2.00000000000000002e55Initial program 100.0%
Taylor expanded in y around inf 82.6%
if 2.00000000000000002e55 < (*.f64 z t) Initial program 87.6%
clear-num87.7%
associate-/r/87.6%
Applied egg-rr87.6%
Taylor expanded in y around 0 76.0%
mul-1-neg76.0%
associate-/r*84.1%
distribute-neg-frac284.1%
Simplified84.1%
div-inv84.1%
neg-mul-184.1%
times-frac76.1%
Applied egg-rr76.1%
frac-2neg76.1%
metadata-eval76.1%
frac-times84.1%
*-un-lft-identity84.1%
div-inv84.1%
associate-/r*76.0%
clear-num76.0%
frac-2neg76.0%
metadata-eval76.0%
add-sqr-sqrt32.3%
sqrt-unprod50.0%
sqr-neg50.0%
sqrt-unprod20.4%
add-sqr-sqrt44.5%
distribute-frac-neg244.5%
*-commutative44.5%
*-un-lft-identity44.5%
times-frac44.3%
/-rgt-identity44.3%
add-sqr-sqrt24.0%
sqrt-unprod58.8%
sqr-neg58.8%
sqrt-unprod45.5%
add-sqr-sqrt84.1%
Applied egg-rr84.1%
Final simplification80.5%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ x (* t (- z)))))
(if (<= (* z t) -5e-10)
t_1
(if (<= (* z t) 1e-56)
(/ x y)
(if (<= (* z t) 1e-11)
t_1
(if (<= (* z t) 2e+55) (/ x y) (/ (/ x t) (- z))))))))
double code(double x, double y, double z, double t) {
double t_1 = x / (t * -z);
double tmp;
if ((z * t) <= -5e-10) {
tmp = t_1;
} else if ((z * t) <= 1e-56) {
tmp = x / y;
} else if ((z * t) <= 1e-11) {
tmp = t_1;
} else if ((z * t) <= 2e+55) {
tmp = x / y;
} else {
tmp = (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) :: t_1
real(8) :: tmp
t_1 = x / (t * -z)
if ((z * t) <= (-5d-10)) then
tmp = t_1
else if ((z * t) <= 1d-56) then
tmp = x / y
else if ((z * t) <= 1d-11) then
tmp = t_1
else if ((z * t) <= 2d+55) then
tmp = x / y
else
tmp = (x / t) / -z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double t_1 = x / (t * -z);
double tmp;
if ((z * t) <= -5e-10) {
tmp = t_1;
} else if ((z * t) <= 1e-56) {
tmp = x / y;
} else if ((z * t) <= 1e-11) {
tmp = t_1;
} else if ((z * t) <= 2e+55) {
tmp = x / y;
} else {
tmp = (x / t) / -z;
}
return tmp;
}
def code(x, y, z, t): t_1 = x / (t * -z) tmp = 0 if (z * t) <= -5e-10: tmp = t_1 elif (z * t) <= 1e-56: tmp = x / y elif (z * t) <= 1e-11: tmp = t_1 elif (z * t) <= 2e+55: tmp = x / y else: tmp = (x / t) / -z return tmp
function code(x, y, z, t) t_1 = Float64(x / Float64(t * Float64(-z))) tmp = 0.0 if (Float64(z * t) <= -5e-10) tmp = t_1; elseif (Float64(z * t) <= 1e-56) tmp = Float64(x / y); elseif (Float64(z * t) <= 1e-11) tmp = t_1; elseif (Float64(z * t) <= 2e+55) tmp = Float64(x / y); else tmp = Float64(Float64(x / t) / Float64(-z)); end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = x / (t * -z); tmp = 0.0; if ((z * t) <= -5e-10) tmp = t_1; elseif ((z * t) <= 1e-56) tmp = x / y; elseif ((z * t) <= 1e-11) tmp = t_1; elseif ((z * t) <= 2e+55) tmp = x / y; else tmp = (x / t) / -z; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(x / N[(t * (-z)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(z * t), $MachinePrecision], -5e-10], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], 1e-56], N[(x / y), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 1e-11], t$95$1, If[LessEqual[N[(z * t), $MachinePrecision], 2e+55], N[(x / y), $MachinePrecision], N[(N[(x / t), $MachinePrecision] / (-z)), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{t \cdot \left(-z\right)}\\
\mathbf{if}\;z \cdot t \leq -5 \cdot 10^{-10}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \cdot t \leq 10^{-56}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;z \cdot t \leq 10^{-11}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+55}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{t}}{-z}\\
\end{array}
\end{array}
if (*.f64 z t) < -5.00000000000000031e-10 or 1e-56 < (*.f64 z t) < 9.99999999999999939e-12Initial program 95.2%
Taylor expanded in y around 0 75.5%
associate-*r/75.5%
neg-mul-175.5%
Simplified75.5%
if -5.00000000000000031e-10 < (*.f64 z t) < 1e-56 or 9.99999999999999939e-12 < (*.f64 z t) < 2.00000000000000002e55Initial program 100.0%
Taylor expanded in y around inf 82.6%
if 2.00000000000000002e55 < (*.f64 z t) Initial program 87.6%
clear-num87.7%
associate-/r/87.6%
Applied egg-rr87.6%
Taylor expanded in y around 0 76.0%
mul-1-neg76.0%
associate-/r*84.1%
distribute-neg-frac284.1%
Simplified84.1%
Final simplification80.5%
(FPCore (x y z t) :precision binary64 (if (or (<= (* z t) -5e-10) (not (<= (* z t) 1e-56))) (/ x (* t (- z))) (/ x y)))
double code(double x, double y, double z, double t) {
double tmp;
if (((z * t) <= -5e-10) || !((z * t) <= 1e-56)) {
tmp = x / (t * -z);
} else {
tmp = x / 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 (((z * t) <= (-5d-10)) .or. (.not. ((z * t) <= 1d-56))) then
tmp = x / (t * -z)
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z * t) <= -5e-10) || !((z * t) <= 1e-56)) {
tmp = x / (t * -z);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z * t) <= -5e-10) or not ((z * t) <= 1e-56): tmp = x / (t * -z) else: tmp = x / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z * t) <= -5e-10) || !(Float64(z * t) <= 1e-56)) tmp = Float64(x / Float64(t * Float64(-z))); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z * t) <= -5e-10) || ~(((z * t) <= 1e-56))) tmp = x / (t * -z); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z * t), $MachinePrecision], -5e-10], N[Not[LessEqual[N[(z * t), $MachinePrecision], 1e-56]], $MachinePrecision]], N[(x / N[(t * (-z)), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -5 \cdot 10^{-10} \lor \neg \left(z \cdot t \leq 10^{-56}\right):\\
\;\;\;\;\frac{x}{t \cdot \left(-z\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if (*.f64 z t) < -5.00000000000000031e-10 or 1e-56 < (*.f64 z t) Initial program 93.3%
Taylor expanded in y around 0 71.6%
associate-*r/71.6%
neg-mul-171.6%
Simplified71.6%
if -5.00000000000000031e-10 < (*.f64 z t) < 1e-56Initial program 100.0%
Taylor expanded in y around inf 85.4%
Final simplification77.3%
(FPCore (x y z t) :precision binary64 (if (or (<= (* z t) -5e+194) (not (<= (* z t) 2e+161))) (/ x (* z t)) (/ x y)))
double code(double x, double y, double z, double t) {
double tmp;
if (((z * t) <= -5e+194) || !((z * t) <= 2e+161)) {
tmp = x / (z * t);
} else {
tmp = x / 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 (((z * t) <= (-5d+194)) .or. (.not. ((z * t) <= 2d+161))) then
tmp = x / (z * t)
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z * t) <= -5e+194) || !((z * t) <= 2e+161)) {
tmp = x / (z * t);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z * t) <= -5e+194) or not ((z * t) <= 2e+161): tmp = x / (z * t) else: tmp = x / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z * t) <= -5e+194) || !(Float64(z * t) <= 2e+161)) tmp = Float64(x / Float64(z * t)); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z * t) <= -5e+194) || ~(((z * t) <= 2e+161))) tmp = x / (z * t); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z * t), $MachinePrecision], -5e+194], N[Not[LessEqual[N[(z * t), $MachinePrecision], 2e+161]], $MachinePrecision]], N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -5 \cdot 10^{+194} \lor \neg \left(z \cdot t \leq 2 \cdot 10^{+161}\right):\\
\;\;\;\;\frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if (*.f64 z t) < -4.99999999999999989e194 or 2.0000000000000001e161 < (*.f64 z t) Initial program 84.8%
clear-num83.9%
associate-/r/84.8%
Applied egg-rr84.8%
Taylor expanded in y around 0 80.7%
mul-1-neg80.7%
associate-/r*95.8%
distribute-neg-frac295.8%
Simplified95.8%
associate-/l/80.7%
*-un-lft-identity80.7%
add-sqr-sqrt45.9%
sqrt-unprod66.3%
sqr-neg66.3%
sqrt-unprod27.7%
add-sqr-sqrt60.0%
Applied egg-rr60.0%
*-lft-identity60.0%
*-commutative60.0%
Simplified60.0%
if -4.99999999999999989e194 < (*.f64 z t) < 2.0000000000000001e161Initial program 99.8%
Taylor expanded in y around inf 64.0%
Final simplification63.0%
(FPCore (x y z t) :precision binary64 (/ x y))
double code(double x, double y, double z, double t) {
return x / 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 / y
end function
public static double code(double x, double y, double z, double t) {
return x / y;
}
def code(x, y, z, t): return x / y
function code(x, y, z, t) return Float64(x / y) end
function tmp = code(x, y, z, t) tmp = x / y; end
code[x_, y_, z_, t_] := N[(x / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y}
\end{array}
Initial program 96.1%
Taylor expanded in y around inf 52.6%
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (/ 1.0 (- (/ y x) (* (/ z x) t)))))
(if (< x -1.618195973607049e+50)
t_1
(if (< x 2.1378306434876444e+131) (/ x (- y (* z t))) t_1))))
double code(double x, double y, double z, double t) {
double t_1 = 1.0 / ((y / x) - ((z / x) * t));
double tmp;
if (x < -1.618195973607049e+50) {
tmp = t_1;
} else if (x < 2.1378306434876444e+131) {
tmp = x / (y - (z * 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 = 1.0d0 / ((y / x) - ((z / x) * t))
if (x < (-1.618195973607049d+50)) then
tmp = t_1
else if (x < 2.1378306434876444d+131) then
tmp = x / (y - (z * 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 = 1.0 / ((y / x) - ((z / x) * t));
double tmp;
if (x < -1.618195973607049e+50) {
tmp = t_1;
} else if (x < 2.1378306434876444e+131) {
tmp = x / (y - (z * t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = 1.0 / ((y / x) - ((z / x) * t)) tmp = 0 if x < -1.618195973607049e+50: tmp = t_1 elif x < 2.1378306434876444e+131: tmp = x / (y - (z * t)) else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(1.0 / Float64(Float64(y / x) - Float64(Float64(z / x) * t))) tmp = 0.0 if (x < -1.618195973607049e+50) tmp = t_1; elseif (x < 2.1378306434876444e+131) tmp = Float64(x / Float64(y - Float64(z * t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = 1.0 / ((y / x) - ((z / x) * t)); tmp = 0.0; if (x < -1.618195973607049e+50) tmp = t_1; elseif (x < 2.1378306434876444e+131) tmp = x / (y - (z * t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(1.0 / N[(N[(y / x), $MachinePrecision] - N[(N[(z / x), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[x, -1.618195973607049e+50], t$95$1, If[Less[x, 2.1378306434876444e+131], N[(x / N[(y - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{\frac{y}{x} - \frac{z}{x} \cdot t}\\
\mathbf{if}\;x < -1.618195973607049 \cdot 10^{+50}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x < 2.1378306434876444 \cdot 10^{+131}:\\
\;\;\;\;\frac{x}{y - z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024092
(FPCore (x y z t)
:name "Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:alt
(if (< x -1.618195973607049e+50) (/ 1.0 (- (/ y x) (* (/ z x) t))) (if (< x 2.1378306434876444e+131) (/ x (- y (* z t))) (/ 1.0 (- (/ y x) (* (/ z x) t)))))
(/ x (- y (* z t))))