
(FPCore (x y z t a) :precision binary64 (/ (- x (* y z)) (- t (* a z))))
double code(double x, double y, double z, double t, double a) {
return (x - (y * z)) / (t - (a * z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x - (y * z)) / (t - (a * z))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x - (y * z)) / (t - (a * z));
}
def code(x, y, z, t, a): return (x - (y * z)) / (t - (a * z))
function code(x, y, z, t, a) return Float64(Float64(x - Float64(y * z)) / Float64(t - Float64(a * z))) end
function tmp = code(x, y, z, t, a) tmp = (x - (y * z)) / (t - (a * z)); end
code[x_, y_, z_, t_, a_] := N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y \cdot z}{t - a \cdot z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a) :precision binary64 (/ (- x (* y z)) (- t (* a z))))
double code(double x, double y, double z, double t, double a) {
return (x - (y * z)) / (t - (a * z));
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = (x - (y * z)) / (t - (a * z))
end function
public static double code(double x, double y, double z, double t, double a) {
return (x - (y * z)) / (t - (a * z));
}
def code(x, y, z, t, a): return (x - (y * z)) / (t - (a * z))
function code(x, y, z, t, a) return Float64(Float64(x - Float64(y * z)) / Float64(t - Float64(a * z))) end
function tmp = code(x, y, z, t, a) tmp = (x - (y * z)) / (t - (a * z)); end
code[x_, y_, z_, t_, a_] := N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x - y \cdot z}{t - a \cdot z}
\end{array}
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* z a))) (t_2 (/ (- x (* y z)) t_1)))
(if (<= t_2 -1e-155)
(- (/ x t_1) (/ y (/ t_1 z)))
(if (<= t_2 5e+305) t_2 (/ (- y (/ x z)) a)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (z * a);
double t_2 = (x - (y * z)) / t_1;
double tmp;
if (t_2 <= -1e-155) {
tmp = (x / t_1) - (y / (t_1 / z));
} else if (t_2 <= 5e+305) {
tmp = t_2;
} else {
tmp = (y - (x / z)) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t - (z * a)
t_2 = (x - (y * z)) / t_1
if (t_2 <= (-1d-155)) then
tmp = (x / t_1) - (y / (t_1 / z))
else if (t_2 <= 5d+305) then
tmp = t_2
else
tmp = (y - (x / z)) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - (z * a);
double t_2 = (x - (y * z)) / t_1;
double tmp;
if (t_2 <= -1e-155) {
tmp = (x / t_1) - (y / (t_1 / z));
} else if (t_2 <= 5e+305) {
tmp = t_2;
} else {
tmp = (y - (x / z)) / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (z * a) t_2 = (x - (y * z)) / t_1 tmp = 0 if t_2 <= -1e-155: tmp = (x / t_1) - (y / (t_1 / z)) elif t_2 <= 5e+305: tmp = t_2 else: tmp = (y - (x / z)) / a return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(z * a)) t_2 = Float64(Float64(x - Float64(y * z)) / t_1) tmp = 0.0 if (t_2 <= -1e-155) tmp = Float64(Float64(x / t_1) - Float64(y / Float64(t_1 / z))); elseif (t_2 <= 5e+305) tmp = t_2; else tmp = Float64(Float64(y - Float64(x / z)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (z * a); t_2 = (x - (y * z)) / t_1; tmp = 0.0; if (t_2 <= -1e-155) tmp = (x / t_1) - (y / (t_1 / z)); elseif (t_2 <= 5e+305) tmp = t_2; else tmp = (y - (x / z)) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-155], N[(N[(x / t$95$1), $MachinePrecision] - N[(y / N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+305], t$95$2, N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - z \cdot a\\
t_2 := \frac{x - y \cdot z}{t_1}\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{-155}:\\
\;\;\;\;\frac{x}{t_1} - \frac{y}{\frac{t_1}{z}}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+305}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -1.00000000000000001e-155Initial program 95.1%
*-commutative95.1%
Simplified95.1%
Taylor expanded in x around 0 95.1%
fma-def95.1%
associate-/l*99.9%
*-commutative99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in y around 0 95.1%
+-commutative95.1%
sub-neg95.1%
mul-1-neg95.1%
mul-1-neg95.1%
sub-neg95.1%
mul-1-neg95.1%
unsub-neg95.1%
mul-1-neg95.1%
sub-neg95.1%
associate-/l*99.9%
mul-1-neg99.9%
sub-neg99.9%
Simplified99.9%
if -1.00000000000000001e-155 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 5.00000000000000009e305Initial program 91.5%
if 5.00000000000000009e305 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) Initial program 30.8%
*-commutative30.8%
Simplified30.8%
Taylor expanded in x around 0 30.8%
fma-def30.8%
associate-/l*51.5%
*-commutative51.5%
*-commutative51.5%
Simplified51.5%
Taylor expanded in a around inf 90.0%
neg-mul-190.0%
unsub-neg90.0%
Simplified90.0%
Final simplification94.6%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -4.2e+80) (not (<= z 6.8e+173))) (/ (- y (/ x z)) a) (/ (- x (* y z)) (- t (* z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.2e+80) || !(z <= 6.8e+173)) {
tmp = (y - (x / z)) / a;
} else {
tmp = (x - (y * z)) / (t - (z * a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-4.2d+80)) .or. (.not. (z <= 6.8d+173))) then
tmp = (y - (x / z)) / a
else
tmp = (x - (y * z)) / (t - (z * a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -4.2e+80) || !(z <= 6.8e+173)) {
tmp = (y - (x / z)) / a;
} else {
tmp = (x - (y * z)) / (t - (z * a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -4.2e+80) or not (z <= 6.8e+173): tmp = (y - (x / z)) / a else: tmp = (x - (y * z)) / (t - (z * a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -4.2e+80) || !(z <= 6.8e+173)) tmp = Float64(Float64(y - Float64(x / z)) / a); else tmp = Float64(Float64(x - Float64(y * z)) / Float64(t - Float64(z * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -4.2e+80) || ~((z <= 6.8e+173))) tmp = (y - (x / z)) / a; else tmp = (x - (y * z)) / (t - (z * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.2e+80], N[Not[LessEqual[z, 6.8e+173]], $MachinePrecision]], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+80} \lor \neg \left(z \leq 6.8 \cdot 10^{+173}\right):\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x - y \cdot z}{t - z \cdot a}\\
\end{array}
\end{array}
if z < -4.20000000000000003e80 or 6.80000000000000042e173 < z Initial program 62.1%
*-commutative62.1%
Simplified62.1%
Taylor expanded in x around 0 62.1%
fma-def62.1%
associate-/l*73.5%
*-commutative73.5%
*-commutative73.5%
Simplified73.5%
Taylor expanded in a around inf 83.3%
neg-mul-183.3%
unsub-neg83.3%
Simplified83.3%
if -4.20000000000000003e80 < z < 6.80000000000000042e173Initial program 97.8%
Final simplification93.9%
(FPCore (x y z t a)
:precision binary64
(if (<= z -6e+36)
(/ (- y (/ x z)) a)
(if (<= z -4.85e-82)
(/ x (- t (* z a)))
(if (<= z 1.65e-7) (/ (- x (* y z)) t) (/ (- y) (- (/ t z) a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e+36) {
tmp = (y - (x / z)) / a;
} else if (z <= -4.85e-82) {
tmp = x / (t - (z * a));
} else if (z <= 1.65e-7) {
tmp = (x - (y * z)) / t;
} else {
tmp = -y / ((t / z) - a);
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-6d+36)) then
tmp = (y - (x / z)) / a
else if (z <= (-4.85d-82)) then
tmp = x / (t - (z * a))
else if (z <= 1.65d-7) then
tmp = (x - (y * z)) / t
else
tmp = -y / ((t / z) - a)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -6e+36) {
tmp = (y - (x / z)) / a;
} else if (z <= -4.85e-82) {
tmp = x / (t - (z * a));
} else if (z <= 1.65e-7) {
tmp = (x - (y * z)) / t;
} else {
tmp = -y / ((t / z) - a);
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -6e+36: tmp = (y - (x / z)) / a elif z <= -4.85e-82: tmp = x / (t - (z * a)) elif z <= 1.65e-7: tmp = (x - (y * z)) / t else: tmp = -y / ((t / z) - a) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -6e+36) tmp = Float64(Float64(y - Float64(x / z)) / a); elseif (z <= -4.85e-82) tmp = Float64(x / Float64(t - Float64(z * a))); elseif (z <= 1.65e-7) tmp = Float64(Float64(x - Float64(y * z)) / t); else tmp = Float64(Float64(-y) / Float64(Float64(t / z) - a)); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -6e+36) tmp = (y - (x / z)) / a; elseif (z <= -4.85e-82) tmp = x / (t - (z * a)); elseif (z <= 1.65e-7) tmp = (x - (y * z)) / t; else tmp = -y / ((t / z) - a); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6e+36], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[z, -4.85e-82], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.65e-7], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[((-y) / N[(N[(t / z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+36}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\mathbf{elif}\;z \leq -4.85 \cdot 10^{-82}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{elif}\;z \leq 1.65 \cdot 10^{-7}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{-y}{\frac{t}{z} - a}\\
\end{array}
\end{array}
if z < -6e36Initial program 72.0%
*-commutative72.0%
Simplified72.0%
Taylor expanded in x around 0 72.0%
fma-def72.0%
associate-/l*83.3%
*-commutative83.3%
*-commutative83.3%
Simplified83.3%
Taylor expanded in a around inf 78.0%
neg-mul-178.0%
unsub-neg78.0%
Simplified78.0%
if -6e36 < z < -4.84999999999999993e-82Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 72.7%
*-commutative72.7%
Simplified72.7%
if -4.84999999999999993e-82 < z < 1.6500000000000001e-7Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around inf 78.5%
if 1.6500000000000001e-7 < z Initial program 72.7%
*-commutative72.7%
Simplified72.7%
Taylor expanded in x around 0 72.7%
fma-def72.7%
associate-/l*78.0%
*-commutative78.0%
*-commutative78.0%
Simplified78.0%
Taylor expanded in y around 0 72.7%
+-commutative72.7%
sub-neg72.7%
mul-1-neg72.7%
mul-1-neg72.7%
sub-neg72.7%
mul-1-neg72.7%
unsub-neg72.7%
mul-1-neg72.7%
sub-neg72.7%
associate-/l*78.0%
mul-1-neg78.0%
sub-neg78.0%
Simplified78.0%
Taylor expanded in x around 0 57.5%
mul-1-neg57.5%
associate-/l*62.8%
distribute-neg-frac62.8%
div-sub62.8%
associate-/l*76.4%
*-inverses76.4%
Simplified76.4%
Taylor expanded in y around 0 76.4%
mul-1-neg76.4%
distribute-neg-frac76.4%
Simplified76.4%
Final simplification77.4%
(FPCore (x y z t a)
:precision binary64
(if (<= z -1.75e+49)
(/ y a)
(if (<= z -5.5e-83)
(/ x (- t (* z a)))
(if (<= z 1.55e+100) (/ (- x (* y z)) t) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.75e+49) {
tmp = y / a;
} else if (z <= -5.5e-83) {
tmp = x / (t - (z * a));
} else if (z <= 1.55e+100) {
tmp = (x - (y * z)) / t;
} else {
tmp = y / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-1.75d+49)) then
tmp = y / a
else if (z <= (-5.5d-83)) then
tmp = x / (t - (z * a))
else if (z <= 1.55d+100) then
tmp = (x - (y * z)) / t
else
tmp = y / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.75e+49) {
tmp = y / a;
} else if (z <= -5.5e-83) {
tmp = x / (t - (z * a));
} else if (z <= 1.55e+100) {
tmp = (x - (y * z)) / t;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.75e+49: tmp = y / a elif z <= -5.5e-83: tmp = x / (t - (z * a)) elif z <= 1.55e+100: tmp = (x - (y * z)) / t else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.75e+49) tmp = Float64(y / a); elseif (z <= -5.5e-83) tmp = Float64(x / Float64(t - Float64(z * a))); elseif (z <= 1.55e+100) tmp = Float64(Float64(x - Float64(y * z)) / t); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.75e+49) tmp = y / a; elseif (z <= -5.5e-83) tmp = x / (t - (z * a)); elseif (z <= 1.55e+100) tmp = (x - (y * z)) / t; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.75e+49], N[(y / a), $MachinePrecision], If[LessEqual[z, -5.5e-83], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e+100], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+49}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-83}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{+100}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -1.74999999999999987e49 or 1.55000000000000003e100 < z Initial program 67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in z around inf 60.2%
if -1.74999999999999987e49 < z < -5.49999999999999964e-83Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 71.1%
*-commutative71.1%
Simplified71.1%
if -5.49999999999999964e-83 < z < 1.55000000000000003e100Initial program 99.2%
*-commutative99.2%
Simplified99.2%
Taylor expanded in t around inf 75.0%
Final simplification69.5%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- y (/ x z)) a)))
(if (<= z -6.5e+34)
t_1
(if (<= z -4.7e-84)
(/ x (- t (* z a)))
(if (<= z 6.8e+21) (/ (- x (* y z)) t) t_1)))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (y - (x / z)) / a;
double tmp;
if (z <= -6.5e+34) {
tmp = t_1;
} else if (z <= -4.7e-84) {
tmp = x / (t - (z * a));
} else if (z <= 6.8e+21) {
tmp = (x - (y * z)) / t;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: tmp
t_1 = (y - (x / z)) / a
if (z <= (-6.5d+34)) then
tmp = t_1
else if (z <= (-4.7d-84)) then
tmp = x / (t - (z * a))
else if (z <= 6.8d+21) 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 a) {
double t_1 = (y - (x / z)) / a;
double tmp;
if (z <= -6.5e+34) {
tmp = t_1;
} else if (z <= -4.7e-84) {
tmp = x / (t - (z * a));
} else if (z <= 6.8e+21) {
tmp = (x - (y * z)) / t;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (y - (x / z)) / a tmp = 0 if z <= -6.5e+34: tmp = t_1 elif z <= -4.7e-84: tmp = x / (t - (z * a)) elif z <= 6.8e+21: tmp = (x - (y * z)) / t else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(y - Float64(x / z)) / a) tmp = 0.0 if (z <= -6.5e+34) tmp = t_1; elseif (z <= -4.7e-84) tmp = Float64(x / Float64(t - Float64(z * a))); elseif (z <= 6.8e+21) tmp = Float64(Float64(x - Float64(y * z)) / t); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (y - (x / z)) / a; tmp = 0.0; if (z <= -6.5e+34) tmp = t_1; elseif (z <= -4.7e-84) tmp = x / (t - (z * a)); elseif (z <= 6.8e+21) tmp = (x - (y * z)) / t; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[z, -6.5e+34], t$95$1, If[LessEqual[z, -4.7e-84], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+21], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y - \frac{x}{z}}{a}\\
\mathbf{if}\;z \leq -6.5 \cdot 10^{+34}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -4.7 \cdot 10^{-84}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{+21}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if z < -6.50000000000000017e34 or 6.8e21 < z Initial program 71.6%
*-commutative71.6%
Simplified71.6%
Taylor expanded in x around 0 71.6%
fma-def71.6%
associate-/l*80.0%
*-commutative80.0%
*-commutative80.0%
Simplified80.0%
Taylor expanded in a around inf 76.5%
neg-mul-176.5%
unsub-neg76.5%
Simplified76.5%
if -6.50000000000000017e34 < z < -4.7e-84Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around inf 72.7%
*-commutative72.7%
Simplified72.7%
if -4.7e-84 < z < 6.8e21Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in t around inf 78.2%
Final simplification77.0%
(FPCore (x y z t a)
:precision binary64
(if (<= z -2.3e+36)
(/ y a)
(if (<= z 2e-155)
(/ x t)
(if (<= z 1.6e-82)
(/ (/ (- x) a) z)
(if (<= z 3.5e-8) (/ x t) (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e+36) {
tmp = y / a;
} else if (z <= 2e-155) {
tmp = x / t;
} else if (z <= 1.6e-82) {
tmp = (-x / a) / z;
} else if (z <= 3.5e-8) {
tmp = x / t;
} else {
tmp = y / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-2.3d+36)) then
tmp = y / a
else if (z <= 2d-155) then
tmp = x / t
else if (z <= 1.6d-82) then
tmp = (-x / a) / z
else if (z <= 3.5d-8) then
tmp = x / t
else
tmp = y / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.3e+36) {
tmp = y / a;
} else if (z <= 2e-155) {
tmp = x / t;
} else if (z <= 1.6e-82) {
tmp = (-x / a) / z;
} else if (z <= 3.5e-8) {
tmp = x / t;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.3e+36: tmp = y / a elif z <= 2e-155: tmp = x / t elif z <= 1.6e-82: tmp = (-x / a) / z elif z <= 3.5e-8: tmp = x / t else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.3e+36) tmp = Float64(y / a); elseif (z <= 2e-155) tmp = Float64(x / t); elseif (z <= 1.6e-82) tmp = Float64(Float64(Float64(-x) / a) / z); elseif (z <= 3.5e-8) tmp = Float64(x / t); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.3e+36) tmp = y / a; elseif (z <= 2e-155) tmp = x / t; elseif (z <= 1.6e-82) tmp = (-x / a) / z; elseif (z <= 3.5e-8) tmp = x / t; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e+36], N[(y / a), $MachinePrecision], If[LessEqual[z, 2e-155], N[(x / t), $MachinePrecision], If[LessEqual[z, 1.6e-82], N[(N[((-x) / a), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 3.5e-8], N[(x / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.3 \cdot 10^{+36}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 2 \cdot 10^{-155}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-82}:\\
\;\;\;\;\frac{\frac{-x}{a}}{z}\\
\mathbf{elif}\;z \leq 3.5 \cdot 10^{-8}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -2.29999999999999996e36 or 3.50000000000000024e-8 < z Initial program 72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in z around inf 56.9%
if -2.29999999999999996e36 < z < 2.00000000000000003e-155 or 1.6000000000000001e-82 < z < 3.50000000000000024e-8Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around 0 61.6%
if 2.00000000000000003e-155 < z < 1.6000000000000001e-82Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in x around 0 99.9%
fma-def99.9%
associate-/l*99.7%
*-commutative99.7%
*-commutative99.7%
Simplified99.7%
Taylor expanded in a around inf 43.8%
neg-mul-143.8%
unsub-neg43.8%
Simplified43.8%
Taylor expanded in y around 0 51.5%
mul-1-neg51.5%
associate-/r*51.7%
Simplified51.7%
Final simplification59.1%
(FPCore (x y z t a)
:precision binary64
(if (<= z -8e+36)
(/ y a)
(if (<= z 4.9e-170)
(/ x t)
(if (<= z 4.5e-74)
(* (/ y t) (- z))
(if (<= z 2.15e-8) (/ x t) (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8e+36) {
tmp = y / a;
} else if (z <= 4.9e-170) {
tmp = x / t;
} else if (z <= 4.5e-74) {
tmp = (y / t) * -z;
} else if (z <= 2.15e-8) {
tmp = x / t;
} else {
tmp = y / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-8d+36)) then
tmp = y / a
else if (z <= 4.9d-170) then
tmp = x / t
else if (z <= 4.5d-74) then
tmp = (y / t) * -z
else if (z <= 2.15d-8) then
tmp = x / t
else
tmp = y / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -8e+36) {
tmp = y / a;
} else if (z <= 4.9e-170) {
tmp = x / t;
} else if (z <= 4.5e-74) {
tmp = (y / t) * -z;
} else if (z <= 2.15e-8) {
tmp = x / t;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -8e+36: tmp = y / a elif z <= 4.9e-170: tmp = x / t elif z <= 4.5e-74: tmp = (y / t) * -z elif z <= 2.15e-8: tmp = x / t else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -8e+36) tmp = Float64(y / a); elseif (z <= 4.9e-170) tmp = Float64(x / t); elseif (z <= 4.5e-74) tmp = Float64(Float64(y / t) * Float64(-z)); elseif (z <= 2.15e-8) tmp = Float64(x / t); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -8e+36) tmp = y / a; elseif (z <= 4.9e-170) tmp = x / t; elseif (z <= 4.5e-74) tmp = (y / t) * -z; elseif (z <= 2.15e-8) tmp = x / t; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -8e+36], N[(y / a), $MachinePrecision], If[LessEqual[z, 4.9e-170], N[(x / t), $MachinePrecision], If[LessEqual[z, 4.5e-74], N[(N[(y / t), $MachinePrecision] * (-z)), $MachinePrecision], If[LessEqual[z, 2.15e-8], N[(x / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -8 \cdot 10^{+36}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{-170}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 4.5 \cdot 10^{-74}:\\
\;\;\;\;\frac{y}{t} \cdot \left(-z\right)\\
\mathbf{elif}\;z \leq 2.15 \cdot 10^{-8}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -8.00000000000000034e36 or 2.1500000000000001e-8 < z Initial program 72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in z around inf 56.9%
if -8.00000000000000034e36 < z < 4.8999999999999996e-170 or 4.4999999999999999e-74 < z < 2.1500000000000001e-8Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around 0 62.3%
if 4.8999999999999996e-170 < z < 4.4999999999999999e-74Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 55.3%
mul-1-neg55.3%
sub-neg55.3%
+-commutative55.3%
distribute-rgt-neg-in55.3%
fma-udef55.3%
associate-*l/55.3%
distribute-rgt-neg-in55.3%
fma-udef55.3%
distribute-rgt-neg-in55.3%
+-commutative55.3%
sub-neg55.3%
*-commutative55.3%
Simplified55.3%
Taylor expanded in t around inf 54.9%
Final simplification59.5%
(FPCore (x y z t a)
:precision binary64
(if (<= z -3.2e+36)
(/ y a)
(if (<= z 4.9e-170)
(/ x t)
(if (<= z 7.5e-74)
(/ (* y (- z)) t)
(if (<= z 3.9e-8) (/ x t) (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+36) {
tmp = y / a;
} else if (z <= 4.9e-170) {
tmp = x / t;
} else if (z <= 7.5e-74) {
tmp = (y * -z) / t;
} else if (z <= 3.9e-8) {
tmp = x / t;
} else {
tmp = y / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if (z <= (-3.2d+36)) then
tmp = y / a
else if (z <= 4.9d-170) then
tmp = x / t
else if (z <= 7.5d-74) then
tmp = (y * -z) / t
else if (z <= 3.9d-8) then
tmp = x / t
else
tmp = y / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -3.2e+36) {
tmp = y / a;
} else if (z <= 4.9e-170) {
tmp = x / t;
} else if (z <= 7.5e-74) {
tmp = (y * -z) / t;
} else if (z <= 3.9e-8) {
tmp = x / t;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -3.2e+36: tmp = y / a elif z <= 4.9e-170: tmp = x / t elif z <= 7.5e-74: tmp = (y * -z) / t elif z <= 3.9e-8: tmp = x / t else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -3.2e+36) tmp = Float64(y / a); elseif (z <= 4.9e-170) tmp = Float64(x / t); elseif (z <= 7.5e-74) tmp = Float64(Float64(y * Float64(-z)) / t); elseif (z <= 3.9e-8) tmp = Float64(x / t); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -3.2e+36) tmp = y / a; elseif (z <= 4.9e-170) tmp = x / t; elseif (z <= 7.5e-74) tmp = (y * -z) / t; elseif (z <= 3.9e-8) tmp = x / t; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+36], N[(y / a), $MachinePrecision], If[LessEqual[z, 4.9e-170], N[(x / t), $MachinePrecision], If[LessEqual[z, 7.5e-74], N[(N[(y * (-z)), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 3.9e-8], N[(x / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.2 \cdot 10^{+36}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 4.9 \cdot 10^{-170}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{elif}\;z \leq 7.5 \cdot 10^{-74}:\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{t}\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-8}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -3.1999999999999999e36 or 3.89999999999999985e-8 < z Initial program 72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in z around inf 56.9%
if -3.1999999999999999e36 < z < 4.8999999999999996e-170 or 7.5e-74 < z < 3.89999999999999985e-8Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around 0 62.3%
if 4.8999999999999996e-170 < z < 7.5e-74Initial program 99.8%
*-commutative99.8%
Simplified99.8%
Taylor expanded in x around 0 99.8%
fma-def99.8%
associate-/l*88.6%
*-commutative88.6%
*-commutative88.6%
Simplified88.6%
Taylor expanded in t around inf 65.6%
mul-1-neg65.6%
sub-neg65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in x around 0 55.1%
associate-*r/55.1%
associate-*r*55.1%
neg-mul-155.1%
Simplified55.1%
Final simplification59.5%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -1.75e+49) (not (<= z 4.5e+104))) (/ y a) (/ x (- t (* z a)))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.75e+49) || !(z <= 4.5e+104)) {
tmp = y / a;
} else {
tmp = x / (t - (z * a));
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-1.75d+49)) .or. (.not. (z <= 4.5d+104))) then
tmp = y / a
else
tmp = x / (t - (z * a))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -1.75e+49) || !(z <= 4.5e+104)) {
tmp = y / a;
} else {
tmp = x / (t - (z * a));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -1.75e+49) or not (z <= 4.5e+104): tmp = y / a else: tmp = x / (t - (z * a)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -1.75e+49) || !(z <= 4.5e+104)) tmp = Float64(y / a); else tmp = Float64(x / Float64(t - Float64(z * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -1.75e+49) || ~((z <= 4.5e+104))) tmp = y / a; else tmp = x / (t - (z * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.75e+49], N[Not[LessEqual[z, 4.5e+104]], $MachinePrecision]], N[(y / a), $MachinePrecision], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+49} \lor \neg \left(z \leq 4.5 \cdot 10^{+104}\right):\\
\;\;\;\;\frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\end{array}
\end{array}
if z < -1.74999999999999987e49 or 4.4999999999999998e104 < z Initial program 67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in z around inf 60.2%
if -1.74999999999999987e49 < z < 4.4999999999999998e104Initial program 99.3%
*-commutative99.3%
Simplified99.3%
Taylor expanded in x around inf 70.5%
*-commutative70.5%
Simplified70.5%
Final simplification66.9%
(FPCore (x y z t a) :precision binary64 (if (or (<= z -2.1e+34) (not (<= z 1.55e-7))) (/ y a) (/ x t)))
double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.1e+34) || !(z <= 1.55e-7)) {
tmp = y / a;
} else {
tmp = x / t;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: tmp
if ((z <= (-2.1d+34)) .or. (.not. (z <= 1.55d-7))) then
tmp = y / a
else
tmp = x / t
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if ((z <= -2.1e+34) || !(z <= 1.55e-7)) {
tmp = y / a;
} else {
tmp = x / t;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if (z <= -2.1e+34) or not (z <= 1.55e-7): tmp = y / a else: tmp = x / t return tmp
function code(x, y, z, t, a) tmp = 0.0 if ((z <= -2.1e+34) || !(z <= 1.55e-7)) tmp = Float64(y / a); else tmp = Float64(x / t); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if ((z <= -2.1e+34) || ~((z <= 1.55e-7))) tmp = y / a; else tmp = x / t; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.1e+34], N[Not[LessEqual[z, 1.55e-7]], $MachinePrecision]], N[(y / a), $MachinePrecision], N[(x / t), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+34} \lor \neg \left(z \leq 1.55 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{y}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{t}\\
\end{array}
\end{array}
if z < -2.10000000000000017e34 or 1.55e-7 < z Initial program 72.4%
*-commutative72.4%
Simplified72.4%
Taylor expanded in z around inf 56.9%
if -2.10000000000000017e34 < z < 1.55e-7Initial program 99.9%
*-commutative99.9%
Simplified99.9%
Taylor expanded in z around 0 57.5%
Final simplification57.2%
(FPCore (x y z t a) :precision binary64 (/ x t))
double code(double x, double y, double z, double t, double a) {
return x / t;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
code = x / t
end function
public static double code(double x, double y, double z, double t, double a) {
return x / t;
}
def code(x, y, z, t, a): return x / t
function code(x, y, z, t, a) return Float64(x / t) end
function tmp = code(x, y, z, t, a) tmp = x / t; end
code[x_, y_, z_, t_, a_] := N[(x / t), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{t}
\end{array}
Initial program 88.2%
*-commutative88.2%
Simplified88.2%
Taylor expanded in z around 0 38.6%
Final simplification38.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* a z))) (t_2 (- (/ x t_1) (/ y (- (/ t z) a)))))
(if (< z -32113435955957344.0)
t_2
(if (< z 3.5139522372978296e-86) (* (- x (* y z)) (/ 1.0 t_1)) t_2))))
double code(double x, double y, double z, double t, double a) {
double t_1 = t - (a * z);
double t_2 = (x / t_1) - (y / ((t / z) - a));
double tmp;
if (z < -32113435955957344.0) {
tmp = t_2;
} else if (z < 3.5139522372978296e-86) {
tmp = (x - (y * z)) * (1.0 / t_1);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t - (a * z)
t_2 = (x / t_1) - (y / ((t / z) - a))
if (z < (-32113435955957344.0d0)) then
tmp = t_2
else if (z < 3.5139522372978296d-86) then
tmp = (x - (y * z)) * (1.0d0 / t_1)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double t_1 = t - (a * z);
double t_2 = (x / t_1) - (y / ((t / z) - a));
double tmp;
if (z < -32113435955957344.0) {
tmp = t_2;
} else if (z < 3.5139522372978296e-86) {
tmp = (x - (y * z)) * (1.0 / t_1);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = t - (a * z) t_2 = (x / t_1) - (y / ((t / z) - a)) tmp = 0 if z < -32113435955957344.0: tmp = t_2 elif z < 3.5139522372978296e-86: tmp = (x - (y * z)) * (1.0 / t_1) else: tmp = t_2 return tmp
function code(x, y, z, t, a) t_1 = Float64(t - Float64(a * z)) t_2 = Float64(Float64(x / t_1) - Float64(y / Float64(Float64(t / z) - a))) tmp = 0.0 if (z < -32113435955957344.0) tmp = t_2; elseif (z < 3.5139522372978296e-86) tmp = Float64(Float64(x - Float64(y * z)) * Float64(1.0 / t_1)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = t - (a * z); t_2 = (x / t_1) - (y / ((t / z) - a)); tmp = 0.0; if (z < -32113435955957344.0) tmp = t_2; elseif (z < 3.5139522372978296e-86) tmp = (x - (y * z)) * (1.0 / t_1); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(a * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / t$95$1), $MachinePrecision] - N[(y / N[(N[(t / z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -32113435955957344.0], t$95$2, If[Less[z, 3.5139522372978296e-86], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t - a \cdot z\\
t_2 := \frac{x}{t_1} - \frac{y}{\frac{t}{z} - a}\\
\mathbf{if}\;z < -32113435955957344:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z < 3.5139522372978296 \cdot 10^{-86}:\\
\;\;\;\;\left(x - y \cdot z\right) \cdot \frac{1}{t_1}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
herbie shell --seed 2023310
(FPCore (x y z t a)
:name "Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, A"
:precision binary64
:herbie-target
(if (< z -32113435955957344.0) (- (/ x (- t (* a z))) (/ y (- (/ t z) a))) (if (< z 3.5139522372978296e-86) (* (- x (* y z)) (/ 1.0 (- t (* a z)))) (- (/ x (- t (* a z))) (/ y (- (/ t z) a)))))
(/ (- x (* y z)) (- t (* a z))))