
(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 8 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) -2e+197)
(- (/ (/ x t) z))
(if (<= (* z t) 2e+265)
(/ x (fma z (- t) y))
(expm1 (log1p (* (/ x t) (/ -1.0 z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * t) <= -2e+197) {
tmp = -((x / t) / z);
} else if ((z * t) <= 2e+265) {
tmp = x / fma(z, -t, y);
} else {
tmp = expm1(log1p(((x / t) * (-1.0 / z))));
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if (Float64(z * t) <= -2e+197) tmp = Float64(-Float64(Float64(x / t) / z)); elseif (Float64(z * t) <= 2e+265) tmp = Float64(x / fma(z, Float64(-t), y)); else tmp = expm1(log1p(Float64(Float64(x / t) * Float64(-1.0 / z)))); end return tmp end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * t), $MachinePrecision], -2e+197], (-N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision]), If[LessEqual[N[(z * t), $MachinePrecision], 2e+265], N[(x / N[(z * (-t) + y), $MachinePrecision]), $MachinePrecision], N[(Exp[N[Log[1 + N[(N[(x / t), $MachinePrecision] * N[(-1.0 / z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]] - 1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+197}:\\
\;\;\;\;-\frac{\frac{x}{t}}{z}\\
\mathbf{elif}\;z \cdot t \leq 2 \cdot 10^{+265}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(z, -t, y\right)}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{x}{t} \cdot \frac{-1}{z}\right)\right)\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= (* z t) -2e+197) (not (<= (* z t) 1e+185))) (- (/ (/ x t) z)) (/ x (fma z (- t) y))))
double code(double x, double y, double z, double t) {
double tmp;
if (((z * t) <= -2e+197) || !((z * t) <= 1e+185)) {
tmp = -((x / t) / z);
} else {
tmp = x / fma(z, -t, y);
}
return tmp;
}
function code(x, y, z, t) tmp = 0.0 if ((Float64(z * t) <= -2e+197) || !(Float64(z * t) <= 1e+185)) tmp = Float64(-Float64(Float64(x / t) / z)); else tmp = Float64(x / fma(z, Float64(-t), y)); end return tmp end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z * t), $MachinePrecision], -2e+197], N[Not[LessEqual[N[(z * t), $MachinePrecision], 1e+185]], $MachinePrecision]], (-N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision]), N[(x / N[(z * (-t) + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+197} \lor \neg \left(z \cdot t \leq 10^{+185}\right):\\
\;\;\;\;-\frac{\frac{x}{t}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(z, -t, y\right)}\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(if (<= (* z t) -4e+133)
(/ (/ x z) (- t))
(if (<= (* z t) 1000.0)
(/ x y)
(if (<= (* z t) 1e+74)
(/ (- x) (* z t))
(if (<= (* z t) 5e+100) (/ x y) (- (/ (/ x t) z)))))))
double code(double x, double y, double z, double t) {
double tmp;
if ((z * t) <= -4e+133) {
tmp = (x / z) / -t;
} else if ((z * t) <= 1000.0) {
tmp = x / y;
} else if ((z * t) <= 1e+74) {
tmp = -x / (z * t);
} else if ((z * t) <= 5e+100) {
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) :: tmp
if ((z * t) <= (-4d+133)) then
tmp = (x / z) / -t
else if ((z * t) <= 1000.0d0) then
tmp = x / y
else if ((z * t) <= 1d+74) then
tmp = -x / (z * t)
else if ((z * t) <= 5d+100) 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 tmp;
if ((z * t) <= -4e+133) {
tmp = (x / z) / -t;
} else if ((z * t) <= 1000.0) {
tmp = x / y;
} else if ((z * t) <= 1e+74) {
tmp = -x / (z * t);
} else if ((z * t) <= 5e+100) {
tmp = x / y;
} else {
tmp = -((x / t) / z);
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (z * t) <= -4e+133: tmp = (x / z) / -t elif (z * t) <= 1000.0: tmp = x / y elif (z * t) <= 1e+74: tmp = -x / (z * t) elif (z * t) <= 5e+100: tmp = x / y else: tmp = -((x / t) / z) return tmp
function code(x, y, z, t) tmp = 0.0 if (Float64(z * t) <= -4e+133) tmp = Float64(Float64(x / z) / Float64(-t)); elseif (Float64(z * t) <= 1000.0) tmp = Float64(x / y); elseif (Float64(z * t) <= 1e+74) tmp = Float64(Float64(-x) / Float64(z * t)); elseif (Float64(z * t) <= 5e+100) tmp = Float64(x / y); else tmp = Float64(-Float64(Float64(x / t) / z)); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if ((z * t) <= -4e+133) tmp = (x / z) / -t; elseif ((z * t) <= 1000.0) tmp = x / y; elseif ((z * t) <= 1e+74) tmp = -x / (z * t); elseif ((z * t) <= 5e+100) tmp = x / y; else tmp = -((x / t) / z); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[LessEqual[N[(z * t), $MachinePrecision], -4e+133], N[(N[(x / z), $MachinePrecision] / (-t)), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 1000.0], N[(x / y), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 1e+74], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(z * t), $MachinePrecision], 5e+100], N[(x / y), $MachinePrecision], (-N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision])]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -4 \cdot 10^{+133}:\\
\;\;\;\;\frac{\frac{x}{z}}{-t}\\
\mathbf{elif}\;z \cdot t \leq 1000:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;z \cdot t \leq 10^{+74}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{elif}\;z \cdot t \leq 5 \cdot 10^{+100}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;-\frac{\frac{x}{t}}{z}\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= (* z t) -2e+197) (not (<= (* z t) 1e+185))) (- (/ (/ x t) z)) (/ x (- y (* z t)))))
double code(double x, double y, double z, double t) {
double tmp;
if (((z * t) <= -2e+197) || !((z * t) <= 1e+185)) {
tmp = -((x / t) / z);
} else {
tmp = x / (y - (z * 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 * t) <= (-2d+197)) .or. (.not. ((z * t) <= 1d+185))) then
tmp = -((x / t) / z)
else
tmp = x / (y - (z * t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t) {
double tmp;
if (((z * t) <= -2e+197) || !((z * t) <= 1e+185)) {
tmp = -((x / t) / z);
} else {
tmp = x / (y - (z * t));
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z * t) <= -2e+197) or not ((z * t) <= 1e+185): tmp = -((x / t) / z) else: tmp = x / (y - (z * t)) return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z * t) <= -2e+197) || !(Float64(z * t) <= 1e+185)) tmp = Float64(-Float64(Float64(x / t) / z)); else tmp = Float64(x / Float64(y - Float64(z * t))); end return tmp end
function tmp_2 = code(x, y, z, t) tmp = 0.0; if (((z * t) <= -2e+197) || ~(((z * t) <= 1e+185))) tmp = -((x / t) / z); else tmp = x / (y - (z * t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[N[(z * t), $MachinePrecision], -2e+197], N[Not[LessEqual[N[(z * t), $MachinePrecision], 1e+185]], $MachinePrecision]], (-N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision]), N[(x / N[(y - N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -2 \cdot 10^{+197} \lor \neg \left(z \cdot t \leq 10^{+185}\right):\\
\;\;\;\;-\frac{\frac{x}{t}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y - z \cdot t}\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(if (or (<= t -9.2e-77)
(and (not (<= t 290.0)) (or (<= t 3.4e+42) (not (<= t 1.42e+86)))))
(/ (- x) (* z t))
(/ x y)))
double code(double x, double y, double z, double t) {
double tmp;
if ((t <= -9.2e-77) || (!(t <= 290.0) && ((t <= 3.4e+42) || !(t <= 1.42e+86)))) {
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 ((t <= (-9.2d-77)) .or. (.not. (t <= 290.0d0)) .and. (t <= 3.4d+42) .or. (.not. (t <= 1.42d+86))) 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 ((t <= -9.2e-77) || (!(t <= 290.0) && ((t <= 3.4e+42) || !(t <= 1.42e+86)))) {
tmp = -x / (z * t);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if (t <= -9.2e-77) or (not (t <= 290.0) and ((t <= 3.4e+42) or not (t <= 1.42e+86))): tmp = -x / (z * t) else: tmp = x / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((t <= -9.2e-77) || (!(t <= 290.0) && ((t <= 3.4e+42) || !(t <= 1.42e+86)))) tmp = Float64(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 ((t <= -9.2e-77) || (~((t <= 290.0)) && ((t <= 3.4e+42) || ~((t <= 1.42e+86))))) tmp = -x / (z * t); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := If[Or[LessEqual[t, -9.2e-77], And[N[Not[LessEqual[t, 290.0]], $MachinePrecision], Or[LessEqual[t, 3.4e+42], N[Not[LessEqual[t, 1.42e+86]], $MachinePrecision]]]], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.2 \cdot 10^{-77} \lor \neg \left(t \leq 290\right) \land \left(t \leq 3.4 \cdot 10^{+42} \lor \neg \left(t \leq 1.42 \cdot 10^{+86}\right)\right):\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (/ (/ x t) z))))
(if (<= t -4.5e-76)
t_1
(if (<= t 3.5)
(/ x y)
(if (<= t 1.8e+42)
(/ (- x) (* z t))
(if (<= t 1.18e+86) (/ x y) t_1))))))
double code(double x, double y, double z, double t) {
double t_1 = -((x / t) / z);
double tmp;
if (t <= -4.5e-76) {
tmp = t_1;
} else if (t <= 3.5) {
tmp = x / y;
} else if (t <= 1.8e+42) {
tmp = -x / (z * t);
} else if (t <= 1.18e+86) {
tmp = x / y;
} 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) / z)
if (t <= (-4.5d-76)) then
tmp = t_1
else if (t <= 3.5d0) then
tmp = x / y
else if (t <= 1.8d+42) then
tmp = -x / (z * t)
else if (t <= 1.18d+86) then
tmp = x / y
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) / z);
double tmp;
if (t <= -4.5e-76) {
tmp = t_1;
} else if (t <= 3.5) {
tmp = x / y;
} else if (t <= 1.8e+42) {
tmp = -x / (z * t);
} else if (t <= 1.18e+86) {
tmp = x / y;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t): t_1 = -((x / t) / z) tmp = 0 if t <= -4.5e-76: tmp = t_1 elif t <= 3.5: tmp = x / y elif t <= 1.8e+42: tmp = -x / (z * t) elif t <= 1.18e+86: tmp = x / y else: tmp = t_1 return tmp
function code(x, y, z, t) t_1 = Float64(-Float64(Float64(x / t) / z)) tmp = 0.0 if (t <= -4.5e-76) tmp = t_1; elseif (t <= 3.5) tmp = Float64(x / y); elseif (t <= 1.8e+42) tmp = Float64(Float64(-x) / Float64(z * t)); elseif (t <= 1.18e+86) tmp = Float64(x / y); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t) t_1 = -((x / t) / z); tmp = 0.0; if (t <= -4.5e-76) tmp = t_1; elseif (t <= 3.5) tmp = x / y; elseif (t <= 1.8e+42) tmp = -x / (z * t); elseif (t <= 1.18e+86) tmp = x / y; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_] := Block[{t$95$1 = (-N[(N[(x / t), $MachinePrecision] / z), $MachinePrecision])}, If[LessEqual[t, -4.5e-76], t$95$1, If[LessEqual[t, 3.5], N[(x / y), $MachinePrecision], If[LessEqual[t, 1.8e+42], N[((-x) / N[(z * t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.18e+86], N[(x / y), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := -\frac{\frac{x}{t}}{z}\\
\mathbf{if}\;t \leq -4.5 \cdot 10^{-76}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 3.5:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+42}:\\
\;\;\;\;\frac{-x}{z \cdot t}\\
\mathbf{elif}\;t \leq 1.18 \cdot 10^{+86}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
(FPCore (x y z t) :precision binary64 (if (or (<= (* z t) -4e+181) (not (<= (* z t) 1e+185))) (/ x (* z t)) (/ x y)))
double code(double x, double y, double z, double t) {
double tmp;
if (((z * t) <= -4e+181) || !((z * t) <= 1e+185)) {
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) <= (-4d+181)) .or. (.not. ((z * t) <= 1d+185))) 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) <= -4e+181) || !((z * t) <= 1e+185)) {
tmp = x / (z * t);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y, z, t): tmp = 0 if ((z * t) <= -4e+181) or not ((z * t) <= 1e+185): tmp = x / (z * t) else: tmp = x / y return tmp
function code(x, y, z, t) tmp = 0.0 if ((Float64(z * t) <= -4e+181) || !(Float64(z * t) <= 1e+185)) 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) <= -4e+181) || ~(((z * t) <= 1e+185))) 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], -4e+181], N[Not[LessEqual[N[(z * t), $MachinePrecision], 1e+185]], $MachinePrecision]], N[(x / N[(z * t), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \cdot t \leq -4 \cdot 10^{+181} \lor \neg \left(z \cdot t \leq 10^{+185}\right):\\
\;\;\;\;\frac{x}{z \cdot t}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
(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}
(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 2024008
(FPCore (x y z t)
:name "Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:herbie-target
(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))))