
(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 10 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 (- x (* y z))) (t_2 (- t (* z a))) (t_3 (/ t_1 t_2)))
(if (<= t_3 (- INFINITY))
(* y (+ (/ x (* y t_2)) (/ z (- (* z a) t))))
(if (<= t_3 -1e-236)
t_3
(if (<= t_3 0.0)
(/ (- y (/ x z)) a)
(if (<= t_3 INFINITY) (/ t_1 (fma (- 0.0 z) a t)) (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = x - (y * z);
double t_2 = t - (z * a);
double t_3 = t_1 / t_2;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = y * ((x / (y * t_2)) + (z / ((z * a) - t)));
} else if (t_3 <= -1e-236) {
tmp = t_3;
} else if (t_3 <= 0.0) {
tmp = (y - (x / z)) / a;
} else if (t_3 <= ((double) INFINITY)) {
tmp = t_1 / fma((0.0 - z), a, t);
} else {
tmp = y / a;
}
return tmp;
}
function code(x, y, z, t, a) t_1 = Float64(x - Float64(y * z)) t_2 = Float64(t - Float64(z * a)) t_3 = Float64(t_1 / t_2) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(y * Float64(Float64(x / Float64(y * t_2)) + Float64(z / Float64(Float64(z * a) - t)))); elseif (t_3 <= -1e-236) tmp = t_3; elseif (t_3 <= 0.0) tmp = Float64(Float64(y - Float64(x / z)) / a); elseif (t_3 <= Inf) tmp = Float64(t_1 / fma(Float64(0.0 - z), a, t)); else tmp = Float64(y / a); end return tmp end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / t$95$2), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(y * N[(N[(x / N[(y * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(z / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -1e-236], t$95$3, If[LessEqual[t$95$3, 0.0], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(t$95$1 / N[(N[(0.0 - z), $MachinePrecision] * a + t), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot z\\
t_2 := t - z \cdot a\\
t_3 := \frac{t\_1}{t\_2}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;y \cdot \left(\frac{x}{y \cdot t\_2} + \frac{z}{z \cdot a - t}\right)\\
\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-236}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{t\_1}{\mathsf{fma}\left(0 - z, a, t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -inf.0Initial program 70.3%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6470.3%
Simplified70.3%
Taylor expanded in y around inf
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6499.8%
Simplified99.8%
if -inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -1e-236Initial program 99.6%
if -1e-236 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -0.0Initial program 48.3%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6448.3%
Simplified48.3%
Taylor expanded in t around 0
associate-*r/N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
div-subN/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
distribute-lft-out--N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6481.0%
Simplified81.0%
if -0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < +inf.0Initial program 98.8%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6498.8%
Simplified98.8%
sub-negN/A
+-commutativeN/A
distribute-lft-neg-inN/A
fma-defineN/A
fma-lowering-fma.f64N/A
neg-sub0N/A
--lowering--.f6498.9%
Applied egg-rr98.9%
sub0-negN/A
neg-lowering-neg.f6498.9%
Applied egg-rr98.9%
if +inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) Initial program 0.0%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f640.0%
Simplified0.0%
Taylor expanded in z around inf
/-lowering-/.f64100.0%
Simplified100.0%
Final simplification96.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (- t (* z a))) (t_2 (/ (- x (* y z)) t_1)))
(if (<= t_2 (- INFINITY))
(* y (+ (/ x (* y t_1)) (/ z (- (* z a) t))))
(if (<= t_2 -1e-236)
t_2
(if (<= t_2 0.0)
(/ (- y (/ x z)) a)
(if (<= t_2 INFINITY) t_2 (/ y 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 <= -((double) INFINITY)) {
tmp = y * ((x / (y * t_1)) + (z / ((z * a) - t)));
} else if (t_2 <= -1e-236) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (y - (x / z)) / a;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_2;
} else {
tmp = y / a;
}
return tmp;
}
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 <= -Double.POSITIVE_INFINITY) {
tmp = y * ((x / (y * t_1)) + (z / ((z * a) - t)));
} else if (t_2 <= -1e-236) {
tmp = t_2;
} else if (t_2 <= 0.0) {
tmp = (y - (x / z)) / a;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_2;
} else {
tmp = y / 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 <= -math.inf: tmp = y * ((x / (y * t_1)) + (z / ((z * a) - t))) elif t_2 <= -1e-236: tmp = t_2 elif t_2 <= 0.0: tmp = (y - (x / z)) / a elif t_2 <= math.inf: tmp = t_2 else: tmp = y / 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 <= Float64(-Inf)) tmp = Float64(y * Float64(Float64(x / Float64(y * t_1)) + Float64(z / Float64(Float64(z * a) - t)))); elseif (t_2 <= -1e-236) tmp = t_2; elseif (t_2 <= 0.0) tmp = Float64(Float64(y - Float64(x / z)) / a); elseif (t_2 <= Inf) tmp = t_2; else tmp = Float64(y / 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 <= -Inf) tmp = y * ((x / (y * t_1)) + (z / ((z * a) - t))); elseif (t_2 <= -1e-236) tmp = t_2; elseif (t_2 <= 0.0) tmp = (y - (x / z)) / a; elseif (t_2 <= Inf) tmp = t_2; else tmp = y / 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, (-Infinity)], N[(y * N[(N[(x / N[(y * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(z / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-236], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$2, N[(y / 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 -\infty:\\
\;\;\;\;y \cdot \left(\frac{x}{y \cdot t\_1} + \frac{z}{z \cdot a - t}\right)\\
\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-236}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -inf.0Initial program 70.3%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6470.3%
Simplified70.3%
Taylor expanded in y around inf
*-lowering-*.f64N/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6499.8%
Simplified99.8%
if -inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -1e-236 or -0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < +inf.0Initial program 99.2%
if -1e-236 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -0.0Initial program 48.3%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6448.3%
Simplified48.3%
Taylor expanded in t around 0
associate-*r/N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
div-subN/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
distribute-lft-out--N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6481.0%
Simplified81.0%
if +inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) Initial program 0.0%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f640.0%
Simplified0.0%
Taylor expanded in z around inf
/-lowering-/.f64100.0%
Simplified100.0%
Final simplification96.4%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x (* y z)) (- t (* z a)))))
(if (<= t_1 -1e-236)
t_1
(if (<= t_1 0.0)
(/ (- y (/ x z)) a)
(if (<= t_1 INFINITY) t_1 (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - (y * z)) / (t - (z * a));
double tmp;
if (t_1 <= -1e-236) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (y - (x / z)) / a;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = y / a;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
double t_1 = (x - (y * z)) / (t - (z * a));
double tmp;
if (t_1 <= -1e-236) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (y - (x / z)) / a;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - (y * z)) / (t - (z * a)) tmp = 0 if t_1 <= -1e-236: tmp = t_1 elif t_1 <= 0.0: tmp = (y - (x / z)) / a elif t_1 <= math.inf: tmp = t_1 else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - Float64(y * z)) / Float64(t - Float64(z * a))) tmp = 0.0 if (t_1 <= -1e-236) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(y - Float64(x / z)) / a); elseif (t_1 <= Inf) tmp = t_1; else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - (y * z)) / (t - (z * a)); tmp = 0.0; if (t_1 <= -1e-236) tmp = t_1; elseif (t_1 <= 0.0) tmp = (y - (x / z)) / a; elseif (t_1 <= Inf) tmp = t_1; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-236], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(y / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y \cdot z}{t - z \cdot a}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-236}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -1e-236 or -0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < +inf.0Initial program 97.0%
if -1e-236 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -0.0Initial program 48.3%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6448.3%
Simplified48.3%
Taylor expanded in t around 0
associate-*r/N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
div-subN/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
distribute-lft-out--N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6481.0%
Simplified81.0%
if +inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) Initial program 0.0%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f640.0%
Simplified0.0%
Taylor expanded in z around inf
/-lowering-/.f64100.0%
Simplified100.0%
Final simplification94.6%
(FPCore (x y z t a)
:precision binary64
(let* ((t_1 (/ (- x (* y z)) t)))
(if (<= y -7.5e-25)
t_1
(if (<= y 9.8e+61)
(/ x (- t (* z a)))
(if (<= y 1.1e+209) t_1 (/ y a))))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - (y * z)) / t;
double tmp;
if (y <= -7.5e-25) {
tmp = t_1;
} else if (y <= 9.8e+61) {
tmp = x / (t - (z * a));
} else if (y <= 1.1e+209) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (x - (y * z)) / t
if (y <= (-7.5d-25)) then
tmp = t_1
else if (y <= 9.8d+61) then
tmp = x / (t - (z * a))
else if (y <= 1.1d+209) then
tmp = t_1
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 t_1 = (x - (y * z)) / t;
double tmp;
if (y <= -7.5e-25) {
tmp = t_1;
} else if (y <= 9.8e+61) {
tmp = x / (t - (z * a));
} else if (y <= 1.1e+209) {
tmp = t_1;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - (y * z)) / t tmp = 0 if y <= -7.5e-25: tmp = t_1 elif y <= 9.8e+61: tmp = x / (t - (z * a)) elif y <= 1.1e+209: tmp = t_1 else: tmp = y / a return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - Float64(y * z)) / t) tmp = 0.0 if (y <= -7.5e-25) tmp = t_1; elseif (y <= 9.8e+61) tmp = Float64(x / Float64(t - Float64(z * a))); elseif (y <= 1.1e+209) tmp = t_1; else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - (y * z)) / t; tmp = 0.0; if (y <= -7.5e-25) tmp = t_1; elseif (y <= 9.8e+61) tmp = x / (t - (z * a)); elseif (y <= 1.1e+209) tmp = t_1; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[y, -7.5e-25], t$95$1, If[LessEqual[y, 9.8e+61], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e+209], t$95$1, N[(y / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y \cdot z}{t}\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{-25}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 9.8 \cdot 10^{+61}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if y < -7.49999999999999989e-25 or 9.8000000000000005e61 < y < 1.0999999999999999e209Initial program 82.7%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6482.7%
Simplified82.7%
Taylor expanded in t around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f6467.0%
Simplified67.0%
if -7.49999999999999989e-25 < y < 9.8000000000000005e61Initial program 89.1%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6489.1%
Simplified89.1%
Taylor expanded in x around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6474.6%
Simplified74.6%
if 1.0999999999999999e209 < y Initial program 79.2%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6479.2%
Simplified79.2%
Taylor expanded in z around inf
/-lowering-/.f6464.1%
Simplified64.1%
(FPCore (x y z t a) :precision binary64 (if (<= t -6.2e-70) (/ (- x (* y z)) t) (if (<= t 4.4e-101) (/ (- y (/ x z)) a) (/ -1.0 (/ t (- (* y z) x))))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.2e-70) {
tmp = (x - (y * z)) / t;
} else if (t <= 4.4e-101) {
tmp = (y - (x / z)) / a;
} else {
tmp = -1.0 / (t / ((y * z) - x));
}
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 (t <= (-6.2d-70)) then
tmp = (x - (y * z)) / t
else if (t <= 4.4d-101) then
tmp = (y - (x / z)) / a
else
tmp = (-1.0d0) / (t / ((y * z) - x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
double tmp;
if (t <= -6.2e-70) {
tmp = (x - (y * z)) / t;
} else if (t <= 4.4e-101) {
tmp = (y - (x / z)) / a;
} else {
tmp = -1.0 / (t / ((y * z) - x));
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if t <= -6.2e-70: tmp = (x - (y * z)) / t elif t <= 4.4e-101: tmp = (y - (x / z)) / a else: tmp = -1.0 / (t / ((y * z) - x)) return tmp
function code(x, y, z, t, a) tmp = 0.0 if (t <= -6.2e-70) tmp = Float64(Float64(x - Float64(y * z)) / t); elseif (t <= 4.4e-101) tmp = Float64(Float64(y - Float64(x / z)) / a); else tmp = Float64(-1.0 / Float64(t / Float64(Float64(y * z) - x))); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (t <= -6.2e-70) tmp = (x - (y * z)) / t; elseif (t <= 4.4e-101) tmp = (y - (x / z)) / a; else tmp = -1.0 / (t / ((y * z) - x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[t, -6.2e-70], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 4.4e-101], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(-1.0 / N[(t / N[(N[(y * z), $MachinePrecision] - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{-70}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-101}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{-1}{\frac{t}{y \cdot z - x}}\\
\end{array}
\end{array}
if t < -6.2e-70Initial program 91.3%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6491.3%
Simplified91.3%
Taylor expanded in t around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f6481.7%
Simplified81.7%
if -6.2e-70 < t < 4.3999999999999998e-101Initial program 83.2%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6483.2%
Simplified83.2%
Taylor expanded in t around 0
associate-*r/N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
div-subN/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
distribute-lft-out--N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6479.8%
Simplified79.8%
if 4.3999999999999998e-101 < t Initial program 84.8%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6484.8%
Simplified84.8%
Taylor expanded in t around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f6468.8%
Simplified68.8%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6469.3%
Applied egg-rr69.3%
Final simplification76.4%
(FPCore (x y z t a) :precision binary64 (let* ((t_1 (/ (- x (* y z)) t))) (if (<= t -7.5e-58) t_1 (if (<= t 3.8e-101) (/ (- y (/ x z)) a) t_1))))
double code(double x, double y, double z, double t, double a) {
double t_1 = (x - (y * z)) / t;
double tmp;
if (t <= -7.5e-58) {
tmp = t_1;
} else if (t <= 3.8e-101) {
tmp = (y - (x / z)) / a;
} 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 = (x - (y * z)) / t
if (t <= (-7.5d-58)) then
tmp = t_1
else if (t <= 3.8d-101) then
tmp = (y - (x / z)) / a
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 = (x - (y * z)) / t;
double tmp;
if (t <= -7.5e-58) {
tmp = t_1;
} else if (t <= 3.8e-101) {
tmp = (y - (x / z)) / a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a): t_1 = (x - (y * z)) / t tmp = 0 if t <= -7.5e-58: tmp = t_1 elif t <= 3.8e-101: tmp = (y - (x / z)) / a else: tmp = t_1 return tmp
function code(x, y, z, t, a) t_1 = Float64(Float64(x - Float64(y * z)) / t) tmp = 0.0 if (t <= -7.5e-58) tmp = t_1; elseif (t <= 3.8e-101) tmp = Float64(Float64(y - Float64(x / z)) / a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a) t_1 = (x - (y * z)) / t; tmp = 0.0; if (t <= -7.5e-58) tmp = t_1; elseif (t <= 3.8e-101) tmp = (y - (x / z)) / a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[t, -7.5e-58], t$95$1, If[LessEqual[t, 3.8e-101], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x - y \cdot z}{t}\\
\mathbf{if}\;t \leq -7.5 \cdot 10^{-58}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-101}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.50000000000000002e-58 or 3.8000000000000001e-101 < t Initial program 87.5%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6487.5%
Simplified87.5%
Taylor expanded in t around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f6474.1%
Simplified74.1%
if -7.50000000000000002e-58 < t < 3.8000000000000001e-101Initial program 83.2%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6483.2%
Simplified83.2%
Taylor expanded in t around 0
associate-*r/N/A
*-commutativeN/A
associate-/r*N/A
associate-*r/N/A
/-lowering-/.f64N/A
div-subN/A
associate-/l*N/A
*-inversesN/A
*-rgt-identityN/A
distribute-lft-out--N/A
sub-negN/A
mul-1-negN/A
remove-double-negN/A
+-commutativeN/A
mul-1-negN/A
unsub-negN/A
--lowering--.f64N/A
/-lowering-/.f6479.8%
Simplified79.8%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.25e+53) (/ y a) (if (<= z 1.05e+187) (/ x (- t (* z a))) (/ y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.25e+53) {
tmp = y / a;
} else if (z <= 1.05e+187) {
tmp = x / (t - (z * a));
} 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.25d+53)) then
tmp = y / a
else if (z <= 1.05d+187) then
tmp = x / (t - (z * a))
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.25e+53) {
tmp = y / a;
} else if (z <= 1.05e+187) {
tmp = x / (t - (z * a));
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.25e+53: tmp = y / a elif z <= 1.05e+187: tmp = x / (t - (z * a)) else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.25e+53) tmp = Float64(y / a); elseif (z <= 1.05e+187) tmp = Float64(x / Float64(t - Float64(z * a))); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -1.25e+53) tmp = y / a; elseif (z <= 1.05e+187) tmp = x / (t - (z * a)); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.25e+53], N[(y / a), $MachinePrecision], If[LessEqual[z, 1.05e+187], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.25 \cdot 10^{+53}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 1.05 \cdot 10^{+187}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -1.2500000000000001e53 or 1.05e187 < z Initial program 62.0%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6462.0%
Simplified62.0%
Taylor expanded in z around inf
/-lowering-/.f6457.0%
Simplified57.0%
if -1.2500000000000001e53 < z < 1.05e187Initial program 96.1%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6496.1%
Simplified96.1%
Taylor expanded in x around inf
/-lowering-/.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6470.1%
Simplified70.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -2.8e+19) (/ y a) (if (<= z 9.4e+91) (/ 1.0 (/ t x)) (/ y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -2.8e+19) {
tmp = y / a;
} else if (z <= 9.4e+91) {
tmp = 1.0 / (t / x);
} 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.8d+19)) then
tmp = y / a
else if (z <= 9.4d+91) then
tmp = 1.0d0 / (t / x)
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.8e+19) {
tmp = y / a;
} else if (z <= 9.4e+91) {
tmp = 1.0 / (t / x);
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -2.8e+19: tmp = y / a elif z <= 9.4e+91: tmp = 1.0 / (t / x) else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -2.8e+19) tmp = Float64(y / a); elseif (z <= 9.4e+91) tmp = Float64(1.0 / Float64(t / x)); else tmp = Float64(y / a); end return tmp end
function tmp_2 = code(x, y, z, t, a) tmp = 0.0; if (z <= -2.8e+19) tmp = y / a; elseif (z <= 9.4e+91) tmp = 1.0 / (t / x); else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.8e+19], N[(y / a), $MachinePrecision], If[LessEqual[z, 9.4e+91], N[(1.0 / N[(t / x), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.8 \cdot 10^{+19}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 9.4 \cdot 10^{+91}:\\
\;\;\;\;\frac{1}{\frac{t}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -2.8e19 or 9.3999999999999995e91 < z Initial program 66.4%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6466.4%
Simplified66.4%
Taylor expanded in z around inf
/-lowering-/.f6450.9%
Simplified50.9%
if -2.8e19 < z < 9.3999999999999995e91Initial program 99.8%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in z around 0
/-lowering-/.f6455.8%
Simplified55.8%
clear-numN/A
/-lowering-/.f64N/A
/-lowering-/.f6456.1%
Applied egg-rr56.1%
(FPCore (x y z t a) :precision binary64 (if (<= z -1.75e+19) (/ y a) (if (<= z 5.6e+93) (/ x t) (/ y a))))
double code(double x, double y, double z, double t, double a) {
double tmp;
if (z <= -1.75e+19) {
tmp = y / a;
} else if (z <= 5.6e+93) {
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 <= (-1.75d+19)) then
tmp = y / a
else if (z <= 5.6d+93) 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 <= -1.75e+19) {
tmp = y / a;
} else if (z <= 5.6e+93) {
tmp = x / t;
} else {
tmp = y / a;
}
return tmp;
}
def code(x, y, z, t, a): tmp = 0 if z <= -1.75e+19: tmp = y / a elif z <= 5.6e+93: tmp = x / t else: tmp = y / a return tmp
function code(x, y, z, t, a) tmp = 0.0 if (z <= -1.75e+19) tmp = Float64(y / a); elseif (z <= 5.6e+93) 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 <= -1.75e+19) tmp = y / a; elseif (z <= 5.6e+93) tmp = x / t; else tmp = y / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.75e+19], N[(y / a), $MachinePrecision], If[LessEqual[z, 5.6e+93], N[(x / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+19}:\\
\;\;\;\;\frac{y}{a}\\
\mathbf{elif}\;z \leq 5.6 \cdot 10^{+93}:\\
\;\;\;\;\frac{x}{t}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\
\end{array}
\end{array}
if z < -1.75e19 or 5.59999999999999978e93 < z Initial program 66.4%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6466.4%
Simplified66.4%
Taylor expanded in z around inf
/-lowering-/.f6450.9%
Simplified50.9%
if -1.75e19 < z < 5.59999999999999978e93Initial program 99.8%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6499.8%
Simplified99.8%
Taylor expanded in z around 0
/-lowering-/.f6455.8%
Simplified55.8%
(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 85.9%
/-lowering-/.f64N/A
--lowering--.f64N/A
*-lowering-*.f64N/A
--lowering--.f64N/A
*-commutativeN/A
*-lowering-*.f6485.9%
Simplified85.9%
Taylor expanded in z around 0
/-lowering-/.f6439.1%
Simplified39.1%
(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 2024161
(FPCore (x y z t a)
:name "Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, A"
:precision binary64
:alt
(! :herbie-platform default (if (< z -32113435955957344) (- (/ x (- t (* a z))) (/ y (- (/ t z) a))) (if (< z 4392440296622287/125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* (- x (* y z)) (/ 1 (- t (* a z)))) (- (/ x (- t (* a z))) (/ y (- (/ t z) a))))))
(/ (- x (* y z)) (- t (* a z))))