
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 18 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t)))
(t_2 (/ t_1 (+ (/ (* y b) t) (+ a 1.0))))
(t_3 (+ 1.0 (fma y (/ b t) a))))
(if (<= t_2 -5e+183)
(fma (/ y t) (/ z t_3) (/ x t_3))
(if (<= t_2 2e+305) (/ t_1 (+ (* b (/ y t)) (+ a 1.0))) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double t_3 = 1.0 + fma(y, (b / t), a);
double tmp;
if (t_2 <= -5e+183) {
tmp = fma((y / t), (z / t_3), (x / t_3));
} else if (t_2 <= 2e+305) {
tmp = t_1 / ((b * (y / t)) + (a + 1.0));
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) t_3 = Float64(1.0 + fma(y, Float64(b / t), a)) tmp = 0.0 if (t_2 <= -5e+183) tmp = fma(Float64(y / t), Float64(z / t_3), Float64(x / t_3)); elseif (t_2 <= 2e+305) tmp = Float64(t_1 / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+183], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$3), $MachinePrecision] + N[(x / t$95$3), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+305], N[(t$95$1 / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_3 := 1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+183}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{t}, \frac{z}{t\_3}, \frac{x}{t\_3}\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+305}:\\
\;\;\;\;\frac{t\_1}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -5.00000000000000009e183Initial program 46.8%
*-commutative46.8%
associate-/l*72.1%
Applied egg-rr72.1%
Taylor expanded in x around 0 62.9%
+-commutative62.9%
times-frac91.6%
fma-define91.6%
+-commutative91.6%
associate-*l/91.5%
*-commutative91.5%
fma-define91.5%
+-commutative91.5%
associate-*l/91.5%
*-commutative91.5%
fma-define91.5%
Simplified91.5%
if -5.00000000000000009e183 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e305Initial program 91.3%
*-commutative91.3%
associate-/l*94.3%
Applied egg-rr94.3%
if 1.9999999999999999e305 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 11.5%
associate-/l*23.8%
associate-/l*26.7%
Simplified26.7%
Taylor expanded in y around inf 81.4%
Final simplification92.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))) (t_2 (/ t_1 (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_2 (- INFINITY))
(* (/ y t) (/ z (+ (+ a 1.0) (* y (/ b t)))))
(if (<= t_2 2e+305) (/ t_1 (+ (* b (/ y t)) (+ a 1.0))) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (y / t) * (z / ((a + 1.0) + (y * (b / t))));
} else if (t_2 <= 2e+305) {
tmp = t_1 / ((b * (y / t)) + (a + 1.0));
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / ((a + 1.0) + (y * (b / t))));
} else if (t_2 <= 2e+305) {
tmp = t_1 / ((b * (y / t)) + (a + 1.0));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = t_1 / (((y * b) / t) + (a + 1.0)) tmp = 0 if t_2 <= -math.inf: tmp = (y / t) * (z / ((a + 1.0) + (y * (b / t)))) elif t_2 <= 2e+305: tmp = t_1 / ((b * (y / t)) + (a + 1.0)) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(y / t) * Float64(z / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t))))); elseif (t_2 <= 2e+305) tmp = Float64(t_1 / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * z) / t); t_2 = t_1 / (((y * b) / t) + (a + 1.0)); tmp = 0.0; if (t_2 <= -Inf) tmp = (y / t) * (z / ((a + 1.0) + (y * (b / t)))); elseif (t_2 <= 2e+305) tmp = t_1 / ((b * (y / t)) + (a + 1.0)); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(y / t), $MachinePrecision] * N[(z / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+305], N[(t$95$1 / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+305}:\\
\;\;\;\;\frac{t\_1}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 9.7%
*-commutative9.7%
associate-/l*52.7%
Applied egg-rr52.7%
clear-num52.7%
un-div-inv52.8%
Applied egg-rr52.8%
Taylor expanded in x around 0 37.0%
times-frac80.9%
associate-+r+80.9%
*-commutative80.9%
associate-*r/80.9%
Simplified80.9%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e305Initial program 91.9%
*-commutative91.9%
associate-/l*94.7%
Applied egg-rr94.7%
if 1.9999999999999999e305 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 11.5%
associate-/l*23.8%
associate-/l*26.7%
Simplified26.7%
Taylor expanded in y around inf 81.4%
Final simplification91.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))))
(if (<= t -8.2e-203)
(/ t_1 (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t 2.7e-167)
(/ (+ z (/ (* x t) y)) b)
(if (<= t 5e+21)
(/ (+ x (* z (/ y t))) (+ (/ (* y b) t) (+ a 1.0)))
(/ t_1 (+ (+ a 1.0) (* y (/ b t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double tmp;
if (t <= -8.2e-203) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else if (t <= 2.7e-167) {
tmp = (z + ((x * t) / y)) / b;
} else if (t <= 5e+21) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / t))
if (t <= (-8.2d-203)) then
tmp = t_1 / ((a + 1.0d0) + (y / (t / b)))
else if (t <= 2.7d-167) then
tmp = (z + ((x * t) / y)) / b
else if (t <= 5d+21) then
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0d0))
else
tmp = t_1 / ((a + 1.0d0) + (y * (b / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double tmp;
if (t <= -8.2e-203) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else if (t <= 2.7e-167) {
tmp = (z + ((x * t) / y)) / b;
} else if (t <= 5e+21) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * (z / t)) tmp = 0 if t <= -8.2e-203: tmp = t_1 / ((a + 1.0) + (y / (t / b))) elif t <= 2.7e-167: tmp = (z + ((x * t) / y)) / b elif t <= 5e+21: tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)) else: tmp = t_1 / ((a + 1.0) + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * Float64(z / t))) tmp = 0.0 if (t <= -8.2e-203) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t <= 2.7e-167) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (t <= 5e+21) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); else tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * (z / t)); tmp = 0.0; if (t <= -8.2e-203) tmp = t_1 / ((a + 1.0) + (y / (t / b))); elseif (t <= 2.7e-167) tmp = (z + ((x * t) / y)) / b; elseif (t <= 5e+21) tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)); else tmp = t_1 / ((a + 1.0) + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.2e-203], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.7e-167], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t, 5e+21], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -8.2 \cdot 10^{-203}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{-167}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+21}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if t < -8.19999999999999962e-203Initial program 82.2%
associate-/l*85.8%
associate-/l*85.8%
Simplified85.8%
clear-num85.7%
un-div-inv86.4%
Applied egg-rr86.4%
if -8.19999999999999962e-203 < t < 2.7000000000000001e-167Initial program 53.5%
*-commutative53.5%
associate-/l*46.9%
Applied egg-rr46.9%
Taylor expanded in x around 0 65.2%
+-commutative65.2%
times-frac50.8%
fma-define50.8%
+-commutative50.8%
associate-*l/47.0%
*-commutative47.0%
fma-define47.0%
+-commutative47.0%
associate-*l/41.0%
*-commutative41.0%
fma-define41.0%
Simplified41.0%
Taylor expanded in b around inf 68.1%
*-commutative68.1%
Simplified68.1%
if 2.7000000000000001e-167 < t < 5e21Initial program 89.2%
*-commutative89.2%
associate-/l*89.3%
Applied egg-rr89.3%
if 5e21 < t Initial program 72.3%
associate-/l*84.6%
associate-/l*92.2%
Simplified92.2%
Final simplification84.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))))
(if (<= t -5.5e-203)
(/ t_1 (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t 3.8e-167)
(/ (+ z (/ (* x t) y)) b)
(if (<= t 5e+21)
(/ (+ x (/ z (/ t y))) (+ (/ (* y b) t) (+ a 1.0)))
(/ t_1 (+ (+ a 1.0) (* y (/ b t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double tmp;
if (t <= -5.5e-203) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else if (t <= 3.8e-167) {
tmp = (z + ((x * t) / y)) / b;
} else if (t <= 5e+21) {
tmp = (x + (z / (t / y))) / (((y * b) / t) + (a + 1.0));
} else {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / t))
if (t <= (-5.5d-203)) then
tmp = t_1 / ((a + 1.0d0) + (y / (t / b)))
else if (t <= 3.8d-167) then
tmp = (z + ((x * t) / y)) / b
else if (t <= 5d+21) then
tmp = (x + (z / (t / y))) / (((y * b) / t) + (a + 1.0d0))
else
tmp = t_1 / ((a + 1.0d0) + (y * (b / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double tmp;
if (t <= -5.5e-203) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else if (t <= 3.8e-167) {
tmp = (z + ((x * t) / y)) / b;
} else if (t <= 5e+21) {
tmp = (x + (z / (t / y))) / (((y * b) / t) + (a + 1.0));
} else {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * (z / t)) tmp = 0 if t <= -5.5e-203: tmp = t_1 / ((a + 1.0) + (y / (t / b))) elif t <= 3.8e-167: tmp = (z + ((x * t) / y)) / b elif t <= 5e+21: tmp = (x + (z / (t / y))) / (((y * b) / t) + (a + 1.0)) else: tmp = t_1 / ((a + 1.0) + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * Float64(z / t))) tmp = 0.0 if (t <= -5.5e-203) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t <= 3.8e-167) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (t <= 5e+21) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); else tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * (z / t)); tmp = 0.0; if (t <= -5.5e-203) tmp = t_1 / ((a + 1.0) + (y / (t / b))); elseif (t <= 3.8e-167) tmp = (z + ((x * t) / y)) / b; elseif (t <= 5e+21) tmp = (x + (z / (t / y))) / (((y * b) / t) + (a + 1.0)); else tmp = t_1 / ((a + 1.0) + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e-203], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e-167], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t, 5e+21], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{-203}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-167}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+21}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if t < -5.5000000000000002e-203Initial program 82.2%
associate-/l*85.8%
associate-/l*85.8%
Simplified85.8%
clear-num85.7%
un-div-inv86.4%
Applied egg-rr86.4%
if -5.5000000000000002e-203 < t < 3.79999999999999967e-167Initial program 53.5%
*-commutative53.5%
associate-/l*46.9%
Applied egg-rr46.9%
Taylor expanded in x around 0 65.2%
+-commutative65.2%
times-frac50.8%
fma-define50.8%
+-commutative50.8%
associate-*l/47.0%
*-commutative47.0%
fma-define47.0%
+-commutative47.0%
associate-*l/41.0%
*-commutative41.0%
fma-define41.0%
Simplified41.0%
Taylor expanded in b around inf 68.1%
*-commutative68.1%
Simplified68.1%
if 3.79999999999999967e-167 < t < 5e21Initial program 89.2%
*-commutative89.2%
associate-/l*89.3%
Applied egg-rr89.3%
clear-num89.2%
un-div-inv89.3%
Applied egg-rr89.3%
if 5e21 < t Initial program 72.3%
associate-/l*84.6%
associate-/l*92.2%
Simplified92.2%
Final simplification84.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.3e-203) (not (<= t 2.9e-147))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.3e-203) || !(t <= 2.9e-147)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((t <= (-4.3d-203)) .or. (.not. (t <= 2.9d-147))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.3e-203) || !(t <= 2.9e-147)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.3e-203) or not (t <= 2.9e-147): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.3e-203) || !(t <= 2.9e-147)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -4.3e-203) || ~((t <= 2.9e-147))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4.3e-203], N[Not[LessEqual[t, 2.9e-147]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.3 \cdot 10^{-203} \lor \neg \left(t \leq 2.9 \cdot 10^{-147}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -4.30000000000000027e-203 or 2.9000000000000001e-147 < t Initial program 80.2%
associate-/l*84.9%
associate-/l*86.3%
Simplified86.3%
if -4.30000000000000027e-203 < t < 2.9000000000000001e-147Initial program 56.2%
*-commutative56.2%
associate-/l*50.0%
Applied egg-rr50.0%
Taylor expanded in x around 0 67.2%
+-commutative67.2%
times-frac53.6%
fma-define53.6%
+-commutative53.6%
associate-*l/50.1%
*-commutative50.1%
fma-define50.1%
+-commutative50.1%
associate-*l/42.5%
*-commutative42.5%
fma-define42.5%
Simplified42.5%
Taylor expanded in b around inf 66.4%
*-commutative66.4%
Simplified66.4%
Final simplification82.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))))
(if (<= t -7.5e-203)
(/ t_1 (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t 2.1e-145)
(/ (+ z (/ (* x t) y)) b)
(/ t_1 (+ (+ a 1.0) (* y (/ b t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double tmp;
if (t <= -7.5e-203) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else if (t <= 2.1e-145) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / t))
if (t <= (-7.5d-203)) then
tmp = t_1 / ((a + 1.0d0) + (y / (t / b)))
else if (t <= 2.1d-145) then
tmp = (z + ((x * t) / y)) / b
else
tmp = t_1 / ((a + 1.0d0) + (y * (b / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double tmp;
if (t <= -7.5e-203) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else if (t <= 2.1e-145) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * (z / t)) tmp = 0 if t <= -7.5e-203: tmp = t_1 / ((a + 1.0) + (y / (t / b))) elif t <= 2.1e-145: tmp = (z + ((x * t) / y)) / b else: tmp = t_1 / ((a + 1.0) + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * Float64(z / t))) tmp = 0.0 if (t <= -7.5e-203) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t <= 2.1e-145) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); else tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * (z / t)); tmp = 0.0; if (t <= -7.5e-203) tmp = t_1 / ((a + 1.0) + (y / (t / b))); elseif (t <= 2.1e-145) tmp = (z + ((x * t) / y)) / b; else tmp = t_1 / ((a + 1.0) + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.5e-203], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e-145], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -7.5 \cdot 10^{-203}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-145}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if t < -7.50000000000000027e-203Initial program 82.2%
associate-/l*85.8%
associate-/l*85.8%
Simplified85.8%
clear-num85.7%
un-div-inv86.4%
Applied egg-rr86.4%
if -7.50000000000000027e-203 < t < 2.09999999999999991e-145Initial program 56.2%
*-commutative56.2%
associate-/l*50.0%
Applied egg-rr50.0%
Taylor expanded in x around 0 67.2%
+-commutative67.2%
times-frac53.6%
fma-define53.6%
+-commutative53.6%
associate-*l/50.1%
*-commutative50.1%
fma-define50.1%
+-commutative50.1%
associate-*l/42.5%
*-commutative42.5%
fma-define42.5%
Simplified42.5%
Taylor expanded in b around inf 66.4%
*-commutative66.4%
Simplified66.4%
if 2.09999999999999991e-145 < t Initial program 77.9%
associate-/l*84.0%
associate-/l*86.9%
Simplified86.9%
Final simplification82.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ (+ a 1.0) (* y (/ b t))))))
(if (<= t -1.7e-32)
t_1
(if (<= t 1.02e-137)
(/ (+ z (/ (* x t) y)) b)
(if (<= t 1.6e-71) (/ (* y z) (* t (+ a 1.0))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -1.7e-32) {
tmp = t_1;
} else if (t <= 1.02e-137) {
tmp = (z + ((x * t) / y)) / b;
} else if (t <= 1.6e-71) {
tmp = (y * z) / (t * (a + 1.0));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / ((a + 1.0d0) + (y * (b / t)))
if (t <= (-1.7d-32)) then
tmp = t_1
else if (t <= 1.02d-137) then
tmp = (z + ((x * t) / y)) / b
else if (t <= 1.6d-71) then
tmp = (y * z) / (t * (a + 1.0d0))
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 b) {
double t_1 = x / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -1.7e-32) {
tmp = t_1;
} else if (t <= 1.02e-137) {
tmp = (z + ((x * t) / y)) / b;
} else if (t <= 1.6e-71) {
tmp = (y * z) / (t * (a + 1.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / ((a + 1.0) + (y * (b / t))) tmp = 0 if t <= -1.7e-32: tmp = t_1 elif t <= 1.02e-137: tmp = (z + ((x * t) / y)) / b elif t <= 1.6e-71: tmp = (y * z) / (t * (a + 1.0)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))) tmp = 0.0 if (t <= -1.7e-32) tmp = t_1; elseif (t <= 1.02e-137) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (t <= 1.6e-71) tmp = Float64(Float64(y * z) / Float64(t * Float64(a + 1.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / ((a + 1.0) + (y * (b / t))); tmp = 0.0; if (t <= -1.7e-32) tmp = t_1; elseif (t <= 1.02e-137) tmp = (z + ((x * t) / y)) / b; elseif (t <= 1.6e-71) tmp = (y * z) / (t * (a + 1.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e-32], t$95$1, If[LessEqual[t, 1.02e-137], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t, 1.6e-71], N[(N[(y * z), $MachinePrecision] / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.02 \cdot 10^{-137}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-71}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.69999999999999989e-32 or 1.5999999999999999e-71 < t Initial program 79.8%
associate-/l*86.8%
associate-/l*91.2%
Simplified91.2%
Taylor expanded in x around inf 66.7%
if -1.69999999999999989e-32 < t < 1.02e-137Initial program 65.1%
*-commutative65.1%
associate-/l*60.1%
Applied egg-rr60.1%
Taylor expanded in x around 0 77.2%
+-commutative77.2%
times-frac63.4%
fma-define63.4%
+-commutative63.4%
associate-*l/57.0%
*-commutative57.0%
fma-define57.0%
+-commutative57.0%
associate-*l/52.4%
*-commutative52.4%
fma-define52.4%
Simplified52.4%
Taylor expanded in b around inf 60.7%
*-commutative60.7%
Simplified60.7%
if 1.02e-137 < t < 1.5999999999999999e-71Initial program 88.0%
associate-/l*76.8%
associate-/l*71.3%
Simplified71.3%
associate-*r/82.5%
clear-num82.4%
Applied egg-rr82.4%
Taylor expanded in y around 0 72.6%
Taylor expanded in x around 0 53.6%
Final simplification63.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.9e-55)
(+ (/ x (+ a 1.0)) (* (/ y t) (/ z (+ a 1.0))))
(if (<= t -6.8e-203)
(/ (* y z) (* t (+ 1.0 (+ a (/ (* y b) t)))))
(if (<= t 3.9e-182)
(/ (+ z (/ (* x t) y)) b)
(/ (+ x (/ z (/ t y))) (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.9e-55) {
tmp = (x / (a + 1.0)) + ((y / t) * (z / (a + 1.0)));
} else if (t <= -6.8e-203) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (t <= 3.9e-182) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = (x + (z / (t / y))) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (t <= (-2.9d-55)) then
tmp = (x / (a + 1.0d0)) + ((y / t) * (z / (a + 1.0d0)))
else if (t <= (-6.8d-203)) then
tmp = (y * z) / (t * (1.0d0 + (a + ((y * b) / t))))
else if (t <= 3.9d-182) then
tmp = (z + ((x * t) / y)) / b
else
tmp = (x + (z / (t / y))) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.9e-55) {
tmp = (x / (a + 1.0)) + ((y / t) * (z / (a + 1.0)));
} else if (t <= -6.8e-203) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (t <= 3.9e-182) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = (x + (z / (t / y))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.9e-55: tmp = (x / (a + 1.0)) + ((y / t) * (z / (a + 1.0))) elif t <= -6.8e-203: tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))) elif t <= 3.9e-182: tmp = (z + ((x * t) / y)) / b else: tmp = (x + (z / (t / y))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.9e-55) tmp = Float64(Float64(x / Float64(a + 1.0)) + Float64(Float64(y / t) * Float64(z / Float64(a + 1.0)))); elseif (t <= -6.8e-203) tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))))); elseif (t <= 3.9e-182) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); else tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.9e-55) tmp = (x / (a + 1.0)) + ((y / t) * (z / (a + 1.0))); elseif (t <= -6.8e-203) tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))); elseif (t <= 3.9e-182) tmp = (z + ((x * t) / y)) / b; else tmp = (x + (z / (t / y))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.9e-55], N[(N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -6.8e-203], N[(N[(y * z), $MachinePrecision] / N[(t * N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.9e-182], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{-55}:\\
\;\;\;\;\frac{x}{a + 1} + \frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;t \leq -6.8 \cdot 10^{-203}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-182}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + 1}\\
\end{array}
\end{array}
if t < -2.9e-55Initial program 83.8%
*-commutative83.8%
associate-/l*90.0%
Applied egg-rr90.0%
Taylor expanded in x around 0 82.4%
+-commutative82.4%
times-frac94.8%
fma-define94.8%
+-commutative94.8%
associate-*l/94.8%
*-commutative94.8%
fma-define94.8%
+-commutative94.8%
associate-*l/98.4%
*-commutative98.4%
fma-define98.4%
Simplified98.4%
Taylor expanded in b around 0 70.1%
times-frac80.1%
Simplified80.1%
if -2.9e-55 < t < -6.7999999999999998e-203Initial program 78.2%
associate-/l*80.9%
associate-/l*71.8%
Simplified71.8%
Taylor expanded in x around 0 74.8%
if -6.7999999999999998e-203 < t < 3.9e-182Initial program 55.8%
*-commutative55.8%
associate-/l*48.7%
Applied egg-rr48.7%
Taylor expanded in x around 0 66.6%
+-commutative66.6%
times-frac52.9%
fma-define52.9%
+-commutative52.9%
associate-*l/48.8%
*-commutative48.8%
fma-define48.8%
+-commutative48.8%
associate-*l/42.2%
*-commutative42.2%
fma-define42.2%
Simplified42.2%
Taylor expanded in b around inf 69.7%
*-commutative69.7%
Simplified69.7%
if 3.9e-182 < t Initial program 76.6%
associate-/l*81.3%
associate-/l*83.2%
Simplified83.2%
associate-*r/77.6%
clear-num77.5%
Applied egg-rr77.5%
Taylor expanded in y around 0 67.5%
*-un-lft-identity67.5%
clear-num67.5%
*-commutative67.5%
associate-*r/73.1%
clear-num73.1%
un-div-inv73.1%
Applied egg-rr73.1%
Final simplification74.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -1.75e+16)
t_1
(if (<= t 2.5e-137)
(/ z b)
(if (<= t 1.3e-39) (/ (* y z) (* t (+ a 1.0))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -1.75e+16) {
tmp = t_1;
} else if (t <= 2.5e-137) {
tmp = z / b;
} else if (t <= 1.3e-39) {
tmp = (y * z) / (t * (a + 1.0));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-1.75d+16)) then
tmp = t_1
else if (t <= 2.5d-137) then
tmp = z / b
else if (t <= 1.3d-39) then
tmp = (y * z) / (t * (a + 1.0d0))
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 b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -1.75e+16) {
tmp = t_1;
} else if (t <= 2.5e-137) {
tmp = z / b;
} else if (t <= 1.3e-39) {
tmp = (y * z) / (t * (a + 1.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -1.75e+16: tmp = t_1 elif t <= 2.5e-137: tmp = z / b elif t <= 1.3e-39: tmp = (y * z) / (t * (a + 1.0)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.75e+16) tmp = t_1; elseif (t <= 2.5e-137) tmp = Float64(z / b); elseif (t <= 1.3e-39) tmp = Float64(Float64(y * z) / Float64(t * Float64(a + 1.0))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -1.75e+16) tmp = t_1; elseif (t <= 2.5e-137) tmp = z / b; elseif (t <= 1.3e-39) tmp = (y * z) / (t * (a + 1.0)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.75e+16], t$95$1, If[LessEqual[t, 2.5e-137], N[(z / b), $MachinePrecision], If[LessEqual[t, 1.3e-39], N[(N[(y * z), $MachinePrecision] / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -1.75 \cdot 10^{+16}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-137}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-39}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.75e16 or 1.3e-39 < t Initial program 78.4%
associate-/l*86.4%
associate-/l*92.1%
Simplified92.1%
Taylor expanded in y around 0 61.2%
if -1.75e16 < t < 2.5e-137Initial program 68.0%
associate-/l*64.1%
associate-/l*56.5%
Simplified56.5%
Taylor expanded in y around inf 50.2%
if 2.5e-137 < t < 1.3e-39Initial program 90.7%
associate-/l*82.0%
associate-/l*73.4%
Simplified73.4%
associate-*r/82.0%
clear-num81.9%
Applied egg-rr81.9%
Taylor expanded in y around 0 69.9%
Taylor expanded in x around 0 50.7%
Final simplification56.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) a)))
(if (<= a -1.15)
t_1
(if (<= a 1.55e-69)
(/ x (+ 1.0 (* b (/ y t))))
(if (<= a 1300000000.0) (/ z b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / a;
double tmp;
if (a <= -1.15) {
tmp = t_1;
} else if (a <= 1.55e-69) {
tmp = x / (1.0 + (b * (y / t)));
} else if (a <= 1300000000.0) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + ((y * z) / t)) / a
if (a <= (-1.15d0)) then
tmp = t_1
else if (a <= 1.55d-69) then
tmp = x / (1.0d0 + (b * (y / t)))
else if (a <= 1300000000.0d0) then
tmp = z / b
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 b) {
double t_1 = (x + ((y * z) / t)) / a;
double tmp;
if (a <= -1.15) {
tmp = t_1;
} else if (a <= 1.55e-69) {
tmp = x / (1.0 + (b * (y / t)));
} else if (a <= 1300000000.0) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / a tmp = 0 if a <= -1.15: tmp = t_1 elif a <= 1.55e-69: tmp = x / (1.0 + (b * (y / t))) elif a <= 1300000000.0: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / a) tmp = 0.0 if (a <= -1.15) tmp = t_1; elseif (a <= 1.55e-69) tmp = Float64(x / Float64(1.0 + Float64(b * Float64(y / t)))); elseif (a <= 1300000000.0) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / a; tmp = 0.0; if (a <= -1.15) tmp = t_1; elseif (a <= 1.55e-69) tmp = x / (1.0 + (b * (y / t))); elseif (a <= 1300000000.0) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -1.15], t$95$1, If[LessEqual[a, 1.55e-69], N[(x / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1300000000.0], N[(z / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{if}\;a \leq -1.15:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.55 \cdot 10^{-69}:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;a \leq 1300000000:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.1499999999999999 or 1.3e9 < a Initial program 75.5%
associate-/l*80.1%
associate-/l*79.4%
Simplified79.4%
Taylor expanded in a around inf 67.8%
if -1.1499999999999999 < a < 1.55e-69Initial program 77.4%
associate-/l*76.6%
associate-/l*75.0%
Simplified75.0%
Taylor expanded in x around inf 51.6%
Taylor expanded in b around inf 54.8%
distribute-rgt-in54.9%
lft-mult-inverse54.9%
+-commutative54.9%
Simplified54.9%
Taylor expanded in y around inf 53.9%
if 1.55e-69 < a < 1.3e9Initial program 58.0%
associate-/l*58.0%
associate-/l*65.0%
Simplified65.0%
Taylor expanded in y around inf 65.8%
Final simplification61.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) a)))
(if (<= a -2.85)
t_1
(if (<= a 7.2e-127)
(/ x (+ 1.0 (* b (/ y t))))
(if (<= a 5.5e+15) (/ (+ z (/ (* x t) y)) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / a;
double tmp;
if (a <= -2.85) {
tmp = t_1;
} else if (a <= 7.2e-127) {
tmp = x / (1.0 + (b * (y / t)));
} else if (a <= 5.5e+15) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + ((y * z) / t)) / a
if (a <= (-2.85d0)) then
tmp = t_1
else if (a <= 7.2d-127) then
tmp = x / (1.0d0 + (b * (y / t)))
else if (a <= 5.5d+15) then
tmp = (z + ((x * t) / y)) / b
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 b) {
double t_1 = (x + ((y * z) / t)) / a;
double tmp;
if (a <= -2.85) {
tmp = t_1;
} else if (a <= 7.2e-127) {
tmp = x / (1.0 + (b * (y / t)));
} else if (a <= 5.5e+15) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / a tmp = 0 if a <= -2.85: tmp = t_1 elif a <= 7.2e-127: tmp = x / (1.0 + (b * (y / t))) elif a <= 5.5e+15: tmp = (z + ((x * t) / y)) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / a) tmp = 0.0 if (a <= -2.85) tmp = t_1; elseif (a <= 7.2e-127) tmp = Float64(x / Float64(1.0 + Float64(b * Float64(y / t)))); elseif (a <= 5.5e+15) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / a; tmp = 0.0; if (a <= -2.85) tmp = t_1; elseif (a <= 7.2e-127) tmp = x / (1.0 + (b * (y / t))); elseif (a <= 5.5e+15) tmp = (z + ((x * t) / y)) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -2.85], t$95$1, If[LessEqual[a, 7.2e-127], N[(x / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.5e+15], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{if}\;a \leq -2.85:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 7.2 \cdot 10^{-127}:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;a \leq 5.5 \cdot 10^{+15}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.85000000000000009 or 5.5e15 < a Initial program 75.5%
associate-/l*80.1%
associate-/l*79.4%
Simplified79.4%
Taylor expanded in a around inf 67.8%
if -2.85000000000000009 < a < 7.1999999999999999e-127Initial program 76.0%
associate-/l*75.1%
associate-/l*73.2%
Simplified73.2%
Taylor expanded in x around inf 52.0%
Taylor expanded in b around inf 55.6%
distribute-rgt-in55.7%
lft-mult-inverse55.8%
+-commutative55.8%
Simplified55.8%
Taylor expanded in y around inf 54.6%
if 7.1999999999999999e-127 < a < 5.5e15Initial program 73.0%
*-commutative73.0%
associate-/l*76.3%
Applied egg-rr76.3%
Taylor expanded in x around 0 79.6%
+-commutative79.6%
times-frac76.6%
fma-define76.6%
+-commutative76.6%
associate-*l/77.0%
*-commutative77.0%
fma-define77.0%
+-commutative77.0%
associate-*l/80.1%
*-commutative80.1%
fma-define80.1%
Simplified80.1%
Taylor expanded in b around inf 66.8%
*-commutative66.8%
Simplified66.8%
Final simplification62.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -8.4e+24)
(/ x a)
(if (<= a -3.1e-76)
(/ z b)
(if (<= a -4e-159) x (if (<= a 1.8e+66) (/ z b) (/ x a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -8.4e+24) {
tmp = x / a;
} else if (a <= -3.1e-76) {
tmp = z / b;
} else if (a <= -4e-159) {
tmp = x;
} else if (a <= 1.8e+66) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (a <= (-8.4d+24)) then
tmp = x / a
else if (a <= (-3.1d-76)) then
tmp = z / b
else if (a <= (-4d-159)) then
tmp = x
else if (a <= 1.8d+66) then
tmp = z / b
else
tmp = x / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -8.4e+24) {
tmp = x / a;
} else if (a <= -3.1e-76) {
tmp = z / b;
} else if (a <= -4e-159) {
tmp = x;
} else if (a <= 1.8e+66) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -8.4e+24: tmp = x / a elif a <= -3.1e-76: tmp = z / b elif a <= -4e-159: tmp = x elif a <= 1.8e+66: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -8.4e+24) tmp = Float64(x / a); elseif (a <= -3.1e-76) tmp = Float64(z / b); elseif (a <= -4e-159) tmp = x; elseif (a <= 1.8e+66) tmp = Float64(z / b); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -8.4e+24) tmp = x / a; elseif (a <= -3.1e-76) tmp = z / b; elseif (a <= -4e-159) tmp = x; elseif (a <= 1.8e+66) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -8.4e+24], N[(x / a), $MachinePrecision], If[LessEqual[a, -3.1e-76], N[(z / b), $MachinePrecision], If[LessEqual[a, -4e-159], x, If[LessEqual[a, 1.8e+66], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.4 \cdot 10^{+24}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq -3.1 \cdot 10^{-76}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq -4 \cdot 10^{-159}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{+66}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -8.4000000000000005e24 or 1.8e66 < a Initial program 77.1%
associate-/l*81.2%
associate-/l*81.1%
Simplified81.1%
Taylor expanded in x around inf 54.6%
Taylor expanded in a around inf 53.0%
if -8.4000000000000005e24 < a < -3.0999999999999997e-76 or -3.99999999999999995e-159 < a < 1.8e66Initial program 73.8%
associate-/l*73.7%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in y around inf 39.5%
if -3.0999999999999997e-76 < a < -3.99999999999999995e-159Initial program 75.5%
associate-/l*75.8%
associate-/l*85.5%
Simplified85.5%
Taylor expanded in x around inf 75.9%
Taylor expanded in a around 0 66.2%
Taylor expanded in b around 0 61.1%
Final simplification47.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -5e-58) (not (<= t 2.15e-182))) (/ (+ x (* z (/ y t))) (+ a 1.0)) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5e-58) || !(t <= 2.15e-182)) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((t <= (-5d-58)) .or. (.not. (t <= 2.15d-182))) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5e-58) || !(t <= 2.15e-182)) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -5e-58) or not (t <= 2.15e-182): tmp = (x + (z * (y / t))) / (a + 1.0) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -5e-58) || !(t <= 2.15e-182)) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -5e-58) || ~((t <= 2.15e-182))) tmp = (x + (z * (y / t))) / (a + 1.0); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -5e-58], N[Not[LessEqual[t, 2.15e-182]], $MachinePrecision]], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5 \cdot 10^{-58} \lor \neg \left(t \leq 2.15 \cdot 10^{-182}\right):\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -4.99999999999999977e-58 or 2.15e-182 < t Initial program 79.7%
associate-/l*84.1%
associate-/l*86.7%
Simplified86.7%
associate-*r/81.8%
clear-num81.7%
Applied egg-rr81.7%
Taylor expanded in y around 0 69.2%
clear-num69.2%
*-commutative69.2%
associate-*r/75.1%
*-commutative75.1%
Applied egg-rr75.1%
if -4.99999999999999977e-58 < t < 2.15e-182Initial program 65.1%
*-commutative65.1%
associate-/l*59.5%
Applied egg-rr59.5%
Taylor expanded in x around 0 76.6%
+-commutative76.6%
times-frac62.0%
fma-define62.0%
+-commutative62.0%
associate-*l/54.6%
*-commutative54.6%
fma-define54.6%
+-commutative54.6%
associate-*l/50.6%
*-commutative50.6%
fma-define50.6%
Simplified50.6%
Taylor expanded in b around inf 62.6%
*-commutative62.6%
Simplified62.6%
Final simplification71.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.25e-58) (not (<= t 3.4e-182))) (/ (+ x (/ z (/ t y))) (+ a 1.0)) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.25e-58) || !(t <= 3.4e-182)) {
tmp = (x + (z / (t / y))) / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.25d-58)) .or. (.not. (t <= 3.4d-182))) then
tmp = (x + (z / (t / y))) / (a + 1.0d0)
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.25e-58) || !(t <= 3.4e-182)) {
tmp = (x + (z / (t / y))) / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.25e-58) or not (t <= 3.4e-182): tmp = (x + (z / (t / y))) / (a + 1.0) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.25e-58) || !(t <= 3.4e-182)) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(a + 1.0)); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.25e-58) || ~((t <= 3.4e-182))) tmp = (x + (z / (t / y))) / (a + 1.0); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.25e-58], N[Not[LessEqual[t, 3.4e-182]], $MachinePrecision]], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.25 \cdot 10^{-58} \lor \neg \left(t \leq 3.4 \cdot 10^{-182}\right):\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -1.24999999999999994e-58 or 3.39999999999999989e-182 < t Initial program 79.7%
associate-/l*84.1%
associate-/l*86.7%
Simplified86.7%
associate-*r/81.8%
clear-num81.7%
Applied egg-rr81.7%
Taylor expanded in y around 0 69.2%
*-un-lft-identity69.2%
clear-num69.2%
*-commutative69.2%
associate-*r/75.1%
clear-num75.1%
un-div-inv75.1%
Applied egg-rr75.1%
if -1.24999999999999994e-58 < t < 3.39999999999999989e-182Initial program 65.1%
*-commutative65.1%
associate-/l*59.5%
Applied egg-rr59.5%
Taylor expanded in x around 0 76.6%
+-commutative76.6%
times-frac62.0%
fma-define62.0%
+-commutative62.0%
associate-*l/54.6%
*-commutative54.6%
fma-define54.6%
+-commutative54.6%
associate-*l/50.6%
*-commutative50.6%
fma-define50.6%
Simplified50.6%
Taylor expanded in b around inf 62.6%
*-commutative62.6%
Simplified62.6%
Final simplification71.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -8.5e-57)
(+ (/ x (+ a 1.0)) (* (/ y t) (/ z (+ a 1.0))))
(if (<= t 2.35e-180)
(/ (+ z (/ (* x t) y)) b)
(/ (+ x (/ z (/ t y))) (+ a 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -8.5e-57) {
tmp = (x / (a + 1.0)) + ((y / t) * (z / (a + 1.0)));
} else if (t <= 2.35e-180) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = (x + (z / (t / y))) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if (t <= (-8.5d-57)) then
tmp = (x / (a + 1.0d0)) + ((y / t) * (z / (a + 1.0d0)))
else if (t <= 2.35d-180) then
tmp = (z + ((x * t) / y)) / b
else
tmp = (x + (z / (t / y))) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -8.5e-57) {
tmp = (x / (a + 1.0)) + ((y / t) * (z / (a + 1.0)));
} else if (t <= 2.35e-180) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = (x + (z / (t / y))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -8.5e-57: tmp = (x / (a + 1.0)) + ((y / t) * (z / (a + 1.0))) elif t <= 2.35e-180: tmp = (z + ((x * t) / y)) / b else: tmp = (x + (z / (t / y))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -8.5e-57) tmp = Float64(Float64(x / Float64(a + 1.0)) + Float64(Float64(y / t) * Float64(z / Float64(a + 1.0)))); elseif (t <= 2.35e-180) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); else tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -8.5e-57) tmp = (x / (a + 1.0)) + ((y / t) * (z / (a + 1.0))); elseif (t <= 2.35e-180) tmp = (z + ((x * t) / y)) / b; else tmp = (x + (z / (t / y))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -8.5e-57], N[(N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.35e-180], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{-57}:\\
\;\;\;\;\frac{x}{a + 1} + \frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;t \leq 2.35 \cdot 10^{-180}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + 1}\\
\end{array}
\end{array}
if t < -8.49999999999999955e-57Initial program 83.8%
*-commutative83.8%
associate-/l*90.0%
Applied egg-rr90.0%
Taylor expanded in x around 0 82.4%
+-commutative82.4%
times-frac94.8%
fma-define94.8%
+-commutative94.8%
associate-*l/94.8%
*-commutative94.8%
fma-define94.8%
+-commutative94.8%
associate-*l/98.4%
*-commutative98.4%
fma-define98.4%
Simplified98.4%
Taylor expanded in b around 0 70.1%
times-frac80.1%
Simplified80.1%
if -8.49999999999999955e-57 < t < 2.34999999999999988e-180Initial program 65.1%
*-commutative65.1%
associate-/l*59.5%
Applied egg-rr59.5%
Taylor expanded in x around 0 76.6%
+-commutative76.6%
times-frac62.0%
fma-define62.0%
+-commutative62.0%
associate-*l/54.6%
*-commutative54.6%
fma-define54.6%
+-commutative54.6%
associate-*l/50.6%
*-commutative50.6%
fma-define50.6%
Simplified50.6%
Taylor expanded in b around inf 62.6%
*-commutative62.6%
Simplified62.6%
if 2.34999999999999988e-180 < t Initial program 76.6%
associate-/l*81.3%
associate-/l*83.2%
Simplified83.2%
associate-*r/77.6%
clear-num77.5%
Applied egg-rr77.5%
Taylor expanded in y around 0 67.5%
*-un-lft-identity67.5%
clear-num67.5%
*-commutative67.5%
associate-*r/73.1%
clear-num73.1%
un-div-inv73.1%
Applied egg-rr73.1%
Final simplification72.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -3e+16) (not (<= t 2.6e-166))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3e+16) || !(t <= 2.6e-166)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((t <= (-3d+16)) .or. (.not. (t <= 2.6d-166))) then
tmp = x / (a + 1.0d0)
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3e+16) || !(t <= 2.6e-166)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -3e+16) or not (t <= 2.6e-166): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -3e+16) || !(t <= 2.6e-166)) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -3e+16) || ~((t <= 2.6e-166))) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -3e+16], N[Not[LessEqual[t, 2.6e-166]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3 \cdot 10^{+16} \lor \neg \left(t \leq 2.6 \cdot 10^{-166}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -3e16 or 2.59999999999999989e-166 < t Initial program 80.2%
associate-/l*85.1%
associate-/l*88.0%
Simplified88.0%
Taylor expanded in y around 0 55.9%
if -3e16 < t < 2.59999999999999989e-166Initial program 67.3%
associate-/l*64.2%
associate-/l*57.2%
Simplified57.2%
Taylor expanded in y around inf 51.5%
Final simplification54.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -2.5e+15) (not (<= a 1e+60))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.5e+15) || !(a <= 1e+60)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: tmp
if ((a <= (-2.5d+15)) .or. (.not. (a <= 1d+60))) then
tmp = x / a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -2.5e+15) || !(a <= 1e+60)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -2.5e+15) or not (a <= 1e+60): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -2.5e+15) || !(a <= 1e+60)) tmp = Float64(x / a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -2.5e+15) || ~((a <= 1e+60))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -2.5e+15], N[Not[LessEqual[a, 1e+60]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.5 \cdot 10^{+15} \lor \neg \left(a \leq 10^{+60}\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -2.5e15 or 9.9999999999999995e59 < a Initial program 75.3%
associate-/l*80.1%
associate-/l*79.3%
Simplified79.3%
Taylor expanded in x around inf 53.4%
Taylor expanded in a around inf 51.9%
if -2.5e15 < a < 9.9999999999999995e59Initial program 75.5%
associate-/l*74.9%
associate-/l*74.2%
Simplified74.2%
Taylor expanded in x around inf 47.7%
Taylor expanded in a around 0 46.2%
Taylor expanded in b around 0 32.4%
Final simplification41.6%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 75.4%
associate-/l*77.3%
associate-/l*76.6%
Simplified76.6%
Taylor expanded in x around inf 50.4%
Taylor expanded in a around 0 27.7%
Taylor expanded in b around 0 18.8%
Final simplification18.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(if (< t -1.3659085366310088e-271)
t_1
(if (< t 3.036967103737246e-130) (/ z b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
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), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 * ((x + ((y / t) * z)) * (1.0d0 / ((a + 1.0d0) + ((y / t) * b))))
if (t < (-1.3659085366310088d-271)) then
tmp = t_1
else if (t < 3.036967103737246d-130) then
tmp = z / b
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 b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))) tmp = 0 if t < -1.3659085366310088e-271: tmp = t_1 elif t < 3.036967103737246e-130: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 * Float64(Float64(x + Float64(Float64(y / t) * z)) * Float64(1.0 / Float64(Float64(a + 1.0) + Float64(Float64(y / t) * b))))) tmp = 0.0 if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))); tmp = 0.0; if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 * N[(N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.3659085366310088e-271], t$95$1, If[Less[t, 3.036967103737246e-130], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\
\mathbf{if}\;t < -1.3659085366310088 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024078
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:alt
(if (< t -1.3659085366310088e-271) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))