
(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 22 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 (+ (/ (* y b) t) (+ a 1.0))) (t_2 (/ (+ x (/ (* y z) t)) t_1)))
(if (<= t_2 (- INFINITY))
(/ (fma y (/ z t) x) (+ 1.0 (fma y (/ b t) a)))
(if (<= t_2 -5e-298)
(/ (+ x (* (* y z) (/ 1.0 t))) t_1)
(if (<= t_2 0.0)
(+
(+ (/ z b) (/ (/ t (/ b x)) y))
(/ (/ (* (* z t) (- -1.0 a)) (pow b 2.0)) y))
(if (<= t_2 1e+303)
t_2
(if (<= t_2 INFINITY)
(* (/ y t) (/ z (+ a (fma y (/ b t) 1.0))))
(/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = fma(y, (z / t), x) / (1.0 + fma(y, (b / t), a));
} else if (t_2 <= -5e-298) {
tmp = (x + ((y * z) * (1.0 / t))) / t_1;
} else if (t_2 <= 0.0) {
tmp = ((z / b) + ((t / (b / x)) / y)) + ((((z * t) * (-1.0 - a)) / pow(b, 2.0)) / y);
} else if (t_2 <= 1e+303) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = (y / t) * (z / (a + fma(y, (b / t), 1.0)));
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(fma(y, Float64(z / t), x) / Float64(1.0 + fma(y, Float64(b / t), a))); elseif (t_2 <= -5e-298) tmp = Float64(Float64(x + Float64(Float64(y * z) * Float64(1.0 / t))) / t_1); elseif (t_2 <= 0.0) tmp = Float64(Float64(Float64(z / b) + Float64(Float64(t / Float64(b / x)) / y)) + Float64(Float64(Float64(Float64(z * t) * Float64(-1.0 - a)) / (b ^ 2.0)) / y)); elseif (t_2 <= 1e+303) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + fma(y, Float64(b / t), 1.0)))); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -5e-298], N[(N[(x + N[(N[(y * z), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(N[(z / b), $MachinePrecision] + N[(N[(t / N[(b / x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(z * t), $MachinePrecision] * N[(-1.0 - a), $MachinePrecision]), $MachinePrecision] / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+303], t$95$2, If[LessEqual[t$95$2, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + N[(y * N[(b / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t\_1}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-298}:\\
\;\;\;\;\frac{x + \left(y \cdot z\right) \cdot \frac{1}{t}}{t\_1}\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\left(\frac{z}{b} + \frac{\frac{t}{\frac{b}{x}}}{y}\right) + \frac{\frac{\left(z \cdot t\right) \cdot \left(-1 - a\right)}{{b}^{2}}}{y}\\
\mathbf{elif}\;t\_2 \leq 10^{+303}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 52.2%
+-commutative52.2%
associate-*r/86.8%
fma-define86.8%
+-commutative86.8%
associate-+l+86.8%
+-commutative86.8%
associate-*r/86.7%
fma-define86.7%
Simplified86.7%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -5.0000000000000002e-298Initial program 99.8%
div-inv99.8%
Applied egg-rr99.8%
if -5.0000000000000002e-298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0Initial program 62.9%
div-inv62.9%
Applied egg-rr62.9%
clear-num62.9%
associate-+l+62.9%
associate-*l/71.4%
div-inv71.4%
clear-num71.4%
associate-/l/69.3%
inv-pow69.3%
Applied egg-rr69.3%
unpow-169.3%
associate-/r/59.1%
Simplified59.1%
Taylor expanded in y around inf 65.8%
associate-/r*70.1%
associate-/l*72.3%
associate-/r*72.3%
associate-*r*72.3%
Simplified72.3%
if 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1e303Initial program 99.7%
if 1e303 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 31.1%
Taylor expanded in x around 0 62.0%
times-frac99.5%
associate-+r+99.5%
*-commutative99.5%
associate-*r/99.6%
+-commutative99.6%
associate-+l+99.6%
associate-*r/99.5%
*-commutative99.5%
+-commutative99.5%
*-commutative99.5%
associate-*r/99.6%
fma-undefine99.6%
Simplified99.6%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
Taylor expanded in y around inf 93.8%
Final simplification93.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ (* y b) t) (+ a 1.0))) (t_2 (/ (+ x (/ (* y z) t)) t_1)))
(if (<= t_2 (- INFINITY))
(/ (+ x (* z (/ y t))) (+ a (+ 1.0 (/ y (/ t b)))))
(if (<= t_2 -5e-298)
(/ (+ x (* (* y z) (/ 1.0 t))) t_1)
(if (<= t_2 0.0)
(+
(+ (/ z b) (/ (/ t (/ b x)) y))
(/ (/ (* (* z t) (- -1.0 a)) (pow b 2.0)) y))
(if (<= t_2 1e+303)
t_2
(if (<= t_2 INFINITY)
(* (/ y t) (/ z (+ a (fma y (/ b t) 1.0))))
(/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
} else if (t_2 <= -5e-298) {
tmp = (x + ((y * z) * (1.0 / t))) / t_1;
} else if (t_2 <= 0.0) {
tmp = ((z / b) + ((t / (b / x)) / y)) + ((((z * t) * (-1.0 - a)) / pow(b, 2.0)) / y);
} else if (t_2 <= 1e+303) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = (y / t) * (z / (a + fma(y, (b / t), 1.0)));
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); elseif (t_2 <= -5e-298) tmp = Float64(Float64(x + Float64(Float64(y * z) * Float64(1.0 / t))) / t_1); elseif (t_2 <= 0.0) tmp = Float64(Float64(Float64(z / b) + Float64(Float64(t / Float64(b / x)) / y)) + Float64(Float64(Float64(Float64(z * t) * Float64(-1.0 - a)) / (b ^ 2.0)) / y)); elseif (t_2 <= 1e+303) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + fma(y, Float64(b / t), 1.0)))); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -5e-298], N[(N[(x + N[(N[(y * z), $MachinePrecision] * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(N[(z / b), $MachinePrecision] + N[(N[(t / N[(b / x), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(z * t), $MachinePrecision] * N[(-1.0 - a), $MachinePrecision]), $MachinePrecision] / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+303], t$95$2, If[LessEqual[t$95$2, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + N[(y * N[(b / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t\_1}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-298}:\\
\;\;\;\;\frac{x + \left(y \cdot z\right) \cdot \frac{1}{t}}{t\_1}\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\left(\frac{z}{b} + \frac{\frac{t}{\frac{b}{x}}}{y}\right) + \frac{\frac{\left(z \cdot t\right) \cdot \left(-1 - a\right)}{{b}^{2}}}{y}\\
\mathbf{elif}\;t\_2 \leq 10^{+303}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 52.2%
associate-*l/86.7%
associate-+l+86.7%
associate-*l/64.3%
Simplified64.3%
associate-/r/86.6%
Applied egg-rr86.6%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -5.0000000000000002e-298Initial program 99.8%
div-inv99.8%
Applied egg-rr99.8%
if -5.0000000000000002e-298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0Initial program 62.9%
div-inv62.9%
Applied egg-rr62.9%
clear-num62.9%
associate-+l+62.9%
associate-*l/71.4%
div-inv71.4%
clear-num71.4%
associate-/l/69.3%
inv-pow69.3%
Applied egg-rr69.3%
unpow-169.3%
associate-/r/59.1%
Simplified59.1%
Taylor expanded in y around inf 65.8%
associate-/r*70.1%
associate-/l*72.3%
associate-/r*72.3%
associate-*r*72.3%
Simplified72.3%
if 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1e303Initial program 99.7%
if 1e303 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 31.1%
Taylor expanded in x around 0 62.0%
times-frac99.5%
associate-+r+99.5%
*-commutative99.5%
associate-*r/99.6%
+-commutative99.6%
associate-+l+99.6%
associate-*r/99.5%
*-commutative99.5%
+-commutative99.5%
*-commutative99.5%
associate-*r/99.6%
fma-undefine99.6%
Simplified99.6%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
Taylor expanded in y around inf 93.8%
Final simplification93.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_1 (- INFINITY))
(/ (+ x (* z (/ y t))) (+ a (+ 1.0 (/ y (/ t b)))))
(if (<= t_1 1e+303)
t_1
(if (<= t_1 INFINITY)
(* (/ y t) (/ z (+ a (fma y (/ b t) 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)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
} else if (t_1 <= 1e+303) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (y / t) * (z / (a + fma(y, (b / t), 1.0)));
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); elseif (t_1 <= 1e+303) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + fma(y, Float64(b / t), 1.0)))); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+303], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + N[(y * N[(b / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{elif}\;t\_1 \leq 10^{+303}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 52.2%
associate-*l/86.7%
associate-+l+86.7%
associate-*l/64.3%
Simplified64.3%
associate-/r/86.6%
Applied egg-rr86.6%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1e303Initial program 91.6%
if 1e303 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 31.1%
Taylor expanded in x around 0 62.0%
times-frac99.5%
associate-+r+99.5%
*-commutative99.5%
associate-*r/99.6%
+-commutative99.6%
associate-+l+99.6%
associate-*r/99.5%
*-commutative99.5%
+-commutative99.5%
*-commutative99.5%
associate-*r/99.6%
fma-undefine99.6%
Simplified99.6%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
Taylor expanded in y around inf 93.8%
Final simplification92.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))
(t_2 (+ a (+ 1.0 (/ y (/ t b))))))
(if (<= t_1 (- INFINITY))
(/ (+ x (* z (/ y t))) t_2)
(if (<= t_1 1e+303)
t_1
(if (<= t_1 INFINITY) (* (/ y t) (/ z t_2)) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double t_2 = a + (1.0 + (y / (t / b)));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (x + (z * (y / t))) / t_2;
} else if (t_1 <= 1e+303) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = (y / t) * (z / t_2);
} 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)) / (((y * b) / t) + (a + 1.0));
double t_2 = a + (1.0 + (y / (t / b)));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (x + (z * (y / t))) / t_2;
} else if (t_1 <= 1e+303) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / t_2);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) t_2 = a + (1.0 + (y / (t / b))) tmp = 0 if t_1 <= -math.inf: tmp = (x + (z * (y / t))) / t_2 elif t_1 <= 1e+303: tmp = t_1 elif t_1 <= math.inf: tmp = (y / t) * (z / t_2) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) t_2 = Float64(a + Float64(1.0 + Float64(y / Float64(t / b)))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_2); elseif (t_1 <= 1e+303) tmp = t_1; elseif (t_1 <= Inf) tmp = Float64(Float64(y / t) * Float64(z / t_2)); 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)) / (((y * b) / t) + (a + 1.0)); t_2 = a + (1.0 + (y / (t / b))); tmp = 0.0; if (t_1 <= -Inf) tmp = (x + (z * (y / t))) / t_2; elseif (t_1 <= 1e+303) tmp = t_1; elseif (t_1 <= Inf) tmp = (y / t) * (z / t_2); else tmp = z / b; 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] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$1, 1e+303], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$2), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_2 := a + \left(1 + \frac{y}{\frac{t}{b}}\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t\_2}\\
\mathbf{elif}\;t\_1 \leq 10^{+303}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 52.2%
associate-*l/86.7%
associate-+l+86.7%
associate-*l/64.3%
Simplified64.3%
associate-/r/86.6%
Applied egg-rr86.6%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1e303Initial program 91.6%
if 1e303 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 31.1%
Taylor expanded in x around 0 31.1%
associate-/l/62.0%
*-commutative62.0%
times-frac99.5%
associate-+l+99.5%
associate-/l*99.4%
Applied egg-rr99.4%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
Taylor expanded in y around inf 93.8%
Final simplification92.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (/ y t) (/ z (+ a (+ 1.0 (/ y (/ t b))))))))
(if (<= t -1.7e-40)
(/ x (+ (+ a 1.0) (* y (/ b t))))
(if (<= t -1.75e-133)
t_1
(if (<= t -8.5e-186)
(/ x (+ (/ (* y b) t) (+ a 1.0)))
(if (<= t 1.65e-107)
(/ z b)
(if (<= t 3.1e-33)
(/ x (+ (+ a 1.0) (/ b (/ t y))))
(if (<= t 8e+115) t_1 (/ (+ x (/ y (/ t z))) (+ a 1.0))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y / t) * (z / (a + (1.0 + (y / (t / b)))));
double tmp;
if (t <= -1.7e-40) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else if (t <= -1.75e-133) {
tmp = t_1;
} else if (t <= -8.5e-186) {
tmp = x / (((y * b) / t) + (a + 1.0));
} else if (t <= 1.65e-107) {
tmp = z / b;
} else if (t <= 3.1e-33) {
tmp = x / ((a + 1.0) + (b / (t / y)));
} else if (t <= 8e+115) {
tmp = t_1;
} else {
tmp = (x + (y / (t / z))) / (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) :: t_1
real(8) :: tmp
t_1 = (y / t) * (z / (a + (1.0d0 + (y / (t / b)))))
if (t <= (-1.7d-40)) then
tmp = x / ((a + 1.0d0) + (y * (b / t)))
else if (t <= (-1.75d-133)) then
tmp = t_1
else if (t <= (-8.5d-186)) then
tmp = x / (((y * b) / t) + (a + 1.0d0))
else if (t <= 1.65d-107) then
tmp = z / b
else if (t <= 3.1d-33) then
tmp = x / ((a + 1.0d0) + (b / (t / y)))
else if (t <= 8d+115) then
tmp = t_1
else
tmp = (x + (y / (t / z))) / (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 t_1 = (y / t) * (z / (a + (1.0 + (y / (t / b)))));
double tmp;
if (t <= -1.7e-40) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else if (t <= -1.75e-133) {
tmp = t_1;
} else if (t <= -8.5e-186) {
tmp = x / (((y * b) / t) + (a + 1.0));
} else if (t <= 1.65e-107) {
tmp = z / b;
} else if (t <= 3.1e-33) {
tmp = x / ((a + 1.0) + (b / (t / y)));
} else if (t <= 8e+115) {
tmp = t_1;
} else {
tmp = (x + (y / (t / z))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y / t) * (z / (a + (1.0 + (y / (t / b))))) tmp = 0 if t <= -1.7e-40: tmp = x / ((a + 1.0) + (y * (b / t))) elif t <= -1.75e-133: tmp = t_1 elif t <= -8.5e-186: tmp = x / (((y * b) / t) + (a + 1.0)) elif t <= 1.65e-107: tmp = z / b elif t <= 3.1e-33: tmp = x / ((a + 1.0) + (b / (t / y))) elif t <= 8e+115: tmp = t_1 else: tmp = (x + (y / (t / z))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y / t) * Float64(z / Float64(a + Float64(1.0 + Float64(y / Float64(t / b)))))) tmp = 0.0 if (t <= -1.7e-40) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t <= -1.75e-133) tmp = t_1; elseif (t <= -8.5e-186) tmp = Float64(x / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); elseif (t <= 1.65e-107) tmp = Float64(z / b); elseif (t <= 3.1e-33) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(b / Float64(t / y)))); elseif (t <= 8e+115) tmp = t_1; else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y / t) * (z / (a + (1.0 + (y / (t / b))))); tmp = 0.0; if (t <= -1.7e-40) tmp = x / ((a + 1.0) + (y * (b / t))); elseif (t <= -1.75e-133) tmp = t_1; elseif (t <= -8.5e-186) tmp = x / (((y * b) / t) + (a + 1.0)); elseif (t <= 1.65e-107) tmp = z / b; elseif (t <= 3.1e-33) tmp = x / ((a + 1.0) + (b / (t / y))); elseif (t <= 8e+115) tmp = t_1; else tmp = (x + (y / (t / z))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e-40], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.75e-133], t$95$1, If[LessEqual[t, -8.5e-186], N[(x / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e-107], N[(z / b), $MachinePrecision], If[LessEqual[t, 3.1e-33], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e+115], t$95$1, N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y}{t} \cdot \frac{z}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{-40}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{-186}:\\
\;\;\;\;\frac{x}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-107}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{-33}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{b}{\frac{t}{y}}}\\
\mathbf{elif}\;t \leq 8 \cdot 10^{+115}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\end{array}
\end{array}
if t < -1.69999999999999992e-40Initial program 83.7%
div-inv83.7%
Applied egg-rr83.7%
Taylor expanded in x around inf 69.2%
associate-+r+69.2%
associate-/l*73.5%
Simplified73.5%
associate-/r/73.5%
Applied egg-rr73.5%
if -1.69999999999999992e-40 < t < -1.75000000000000001e-133 or 3.09999999999999997e-33 < t < 8.0000000000000001e115Initial program 72.0%
Taylor expanded in x around 0 50.1%
associate-/l/54.0%
*-commutative54.0%
times-frac65.9%
associate-+l+65.9%
associate-/l*68.0%
Applied egg-rr68.0%
if -1.75000000000000001e-133 < t < -8.4999999999999994e-186Initial program 86.4%
Taylor expanded in x around inf 73.9%
if -8.4999999999999994e-186 < t < 1.65000000000000002e-107Initial program 56.0%
Taylor expanded in y around inf 70.5%
if 1.65000000000000002e-107 < t < 3.09999999999999997e-33Initial program 89.4%
div-inv89.3%
Applied egg-rr89.3%
Taylor expanded in x around inf 67.9%
associate-+r+67.9%
associate-/l*68.0%
Simplified68.0%
if 8.0000000000000001e115 < t Initial program 85.4%
div-inv85.3%
Applied egg-rr85.3%
clear-num85.2%
associate-+l+85.2%
associate-*l/87.5%
div-inv87.5%
clear-num87.5%
associate-/l/94.9%
inv-pow94.9%
Applied egg-rr94.9%
unpow-194.9%
associate-/r/95.1%
Simplified95.1%
Taylor expanded in b around 0 83.0%
associate-/l*87.9%
Simplified87.9%
Final simplification73.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t)) (t_2 (+ a (+ 1.0 (/ y (/ t b))))))
(if (<= t -1.24e-39)
(/ x (+ (+ a 1.0) (* y (/ b t))))
(if (<= t -9e-135)
(* (/ y t) (/ z t_2))
(if (<= t -2.8e-186)
(/ x (+ t_1 (+ a 1.0)))
(if (<= t 1.1e-106)
(/ z b)
(if (<= t 5.5e-64)
(/ x (+ 1.0 t_1))
(if (<= t 5.5e-50)
(* (/ z t) (/ y t_2))
(+ (/ y (/ t (/ z (+ a 1.0)))) (/ x (+ a 1.0)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = a + (1.0 + (y / (t / b)));
double tmp;
if (t <= -1.24e-39) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else if (t <= -9e-135) {
tmp = (y / t) * (z / t_2);
} else if (t <= -2.8e-186) {
tmp = x / (t_1 + (a + 1.0));
} else if (t <= 1.1e-106) {
tmp = z / b;
} else if (t <= 5.5e-64) {
tmp = x / (1.0 + t_1);
} else if (t <= 5.5e-50) {
tmp = (z / t) * (y / t_2);
} else {
tmp = (y / (t / (z / (a + 1.0)))) + (x / (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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (y * b) / t
t_2 = a + (1.0d0 + (y / (t / b)))
if (t <= (-1.24d-39)) then
tmp = x / ((a + 1.0d0) + (y * (b / t)))
else if (t <= (-9d-135)) then
tmp = (y / t) * (z / t_2)
else if (t <= (-2.8d-186)) then
tmp = x / (t_1 + (a + 1.0d0))
else if (t <= 1.1d-106) then
tmp = z / b
else if (t <= 5.5d-64) then
tmp = x / (1.0d0 + t_1)
else if (t <= 5.5d-50) then
tmp = (z / t) * (y / t_2)
else
tmp = (y / (t / (z / (a + 1.0d0)))) + (x / (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 t_1 = (y * b) / t;
double t_2 = a + (1.0 + (y / (t / b)));
double tmp;
if (t <= -1.24e-39) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else if (t <= -9e-135) {
tmp = (y / t) * (z / t_2);
} else if (t <= -2.8e-186) {
tmp = x / (t_1 + (a + 1.0));
} else if (t <= 1.1e-106) {
tmp = z / b;
} else if (t <= 5.5e-64) {
tmp = x / (1.0 + t_1);
} else if (t <= 5.5e-50) {
tmp = (z / t) * (y / t_2);
} else {
tmp = (y / (t / (z / (a + 1.0)))) + (x / (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = a + (1.0 + (y / (t / b))) tmp = 0 if t <= -1.24e-39: tmp = x / ((a + 1.0) + (y * (b / t))) elif t <= -9e-135: tmp = (y / t) * (z / t_2) elif t <= -2.8e-186: tmp = x / (t_1 + (a + 1.0)) elif t <= 1.1e-106: tmp = z / b elif t <= 5.5e-64: tmp = x / (1.0 + t_1) elif t <= 5.5e-50: tmp = (z / t) * (y / t_2) else: tmp = (y / (t / (z / (a + 1.0)))) + (x / (a + 1.0)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(a + Float64(1.0 + Float64(y / Float64(t / b)))) tmp = 0.0 if (t <= -1.24e-39) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t <= -9e-135) tmp = Float64(Float64(y / t) * Float64(z / t_2)); elseif (t <= -2.8e-186) tmp = Float64(x / Float64(t_1 + Float64(a + 1.0))); elseif (t <= 1.1e-106) tmp = Float64(z / b); elseif (t <= 5.5e-64) tmp = Float64(x / Float64(1.0 + t_1)); elseif (t <= 5.5e-50) tmp = Float64(Float64(z / t) * Float64(y / t_2)); else tmp = Float64(Float64(y / Float64(t / Float64(z / Float64(a + 1.0)))) + Float64(x / Float64(a + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = a + (1.0 + (y / (t / b))); tmp = 0.0; if (t <= -1.24e-39) tmp = x / ((a + 1.0) + (y * (b / t))); elseif (t <= -9e-135) tmp = (y / t) * (z / t_2); elseif (t <= -2.8e-186) tmp = x / (t_1 + (a + 1.0)); elseif (t <= 1.1e-106) tmp = z / b; elseif (t <= 5.5e-64) tmp = x / (1.0 + t_1); elseif (t <= 5.5e-50) tmp = (z / t) * (y / t_2); else tmp = (y / (t / (z / (a + 1.0)))) + (x / (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.24e-39], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9e-135], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.8e-186], N[(x / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e-106], N[(z / b), $MachinePrecision], If[LessEqual[t, 5.5e-64], N[(x / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e-50], N[(N[(z / t), $MachinePrecision] * N[(y / t$95$2), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(t / N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := a + \left(1 + \frac{y}{\frac{t}{b}}\right)\\
\mathbf{if}\;t \leq -1.24 \cdot 10^{-39}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-135}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{t\_2}\\
\mathbf{elif}\;t \leq -2.8 \cdot 10^{-186}:\\
\;\;\;\;\frac{x}{t\_1 + \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-106}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-64}:\\
\;\;\;\;\frac{x}{1 + t\_1}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{-50}:\\
\;\;\;\;\frac{z}{t} \cdot \frac{y}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{t}{\frac{z}{a + 1}}} + \frac{x}{a + 1}\\
\end{array}
\end{array}
if t < -1.24000000000000004e-39Initial program 83.7%
div-inv83.7%
Applied egg-rr83.7%
Taylor expanded in x around inf 69.2%
associate-+r+69.2%
associate-/l*73.5%
Simplified73.5%
associate-/r/73.5%
Applied egg-rr73.5%
if -1.24000000000000004e-39 < t < -8.99999999999999975e-135Initial program 64.4%
Taylor expanded in x around 0 49.2%
associate-/l/59.5%
*-commutative59.5%
times-frac64.3%
associate-+l+64.3%
associate-/l*64.3%
Applied egg-rr64.3%
if -8.99999999999999975e-135 < t < -2.79999999999999983e-186Initial program 86.4%
Taylor expanded in x around inf 73.9%
if -2.79999999999999983e-186 < t < 1.09999999999999997e-106Initial program 56.0%
Taylor expanded in y around inf 70.5%
if 1.09999999999999997e-106 < t < 5.4999999999999999e-64Initial program 81.3%
div-inv81.1%
Applied egg-rr81.1%
Taylor expanded in x around inf 71.6%
associate-+r+71.6%
associate-/l*71.6%
Simplified71.6%
Taylor expanded in a around 0 71.7%
if 5.4999999999999999e-64 < t < 5.49999999999999975e-50Initial program 99.7%
Taylor expanded in x around 0 85.4%
associate-/l/85.4%
times-frac85.7%
associate-+l+85.7%
associate-/l*85.7%
Applied egg-rr85.7%
if 5.49999999999999975e-50 < t Initial program 82.6%
Taylor expanded in y around 0 70.1%
Taylor expanded in z around inf 69.7%
associate-/l*74.6%
associate-/l*79.8%
Simplified79.8%
Final simplification74.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.42e-185)
(/ x (+ (+ a 1.0) (/ b (/ t y))))
(if (<= t 1.65e-107)
(/ z b)
(if (<= t 9.2e-65)
(/ x (+ 1.0 (/ (* y b) t)))
(if (<= t 4.15e-50)
(* (* t (+ x (/ y (/ t z)))) (/ 1.0 (* y b)))
(/ (+ x (* z (/ y t))) (+ a 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.42e-185) {
tmp = x / ((a + 1.0) + (b / (t / y)));
} else if (t <= 1.65e-107) {
tmp = z / b;
} else if (t <= 9.2e-65) {
tmp = x / (1.0 + ((y * b) / t));
} else if (t <= 4.15e-50) {
tmp = (t * (x + (y / (t / z)))) * (1.0 / (y * b));
} else {
tmp = (x + (z * (y / t))) / (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 <= (-1.42d-185)) then
tmp = x / ((a + 1.0d0) + (b / (t / y)))
else if (t <= 1.65d-107) then
tmp = z / b
else if (t <= 9.2d-65) then
tmp = x / (1.0d0 + ((y * b) / t))
else if (t <= 4.15d-50) then
tmp = (t * (x + (y / (t / z)))) * (1.0d0 / (y * b))
else
tmp = (x + (z * (y / t))) / (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 <= -1.42e-185) {
tmp = x / ((a + 1.0) + (b / (t / y)));
} else if (t <= 1.65e-107) {
tmp = z / b;
} else if (t <= 9.2e-65) {
tmp = x / (1.0 + ((y * b) / t));
} else if (t <= 4.15e-50) {
tmp = (t * (x + (y / (t / z)))) * (1.0 / (y * b));
} else {
tmp = (x + (z * (y / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.42e-185: tmp = x / ((a + 1.0) + (b / (t / y))) elif t <= 1.65e-107: tmp = z / b elif t <= 9.2e-65: tmp = x / (1.0 + ((y * b) / t)) elif t <= 4.15e-50: tmp = (t * (x + (y / (t / z)))) * (1.0 / (y * b)) else: tmp = (x + (z * (y / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.42e-185) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(b / Float64(t / y)))); elseif (t <= 1.65e-107) tmp = Float64(z / b); elseif (t <= 9.2e-65) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); elseif (t <= 4.15e-50) tmp = Float64(Float64(t * Float64(x + Float64(y / Float64(t / z)))) * Float64(1.0 / Float64(y * b))); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.42e-185) tmp = x / ((a + 1.0) + (b / (t / y))); elseif (t <= 1.65e-107) tmp = z / b; elseif (t <= 9.2e-65) tmp = x / (1.0 + ((y * b) / t)); elseif (t <= 4.15e-50) tmp = (t * (x + (y / (t / z)))) * (1.0 / (y * b)); else tmp = (x + (z * (y / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.42e-185], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e-107], N[(z / b), $MachinePrecision], If[LessEqual[t, 9.2e-65], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.15e-50], N[(N[(t * N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.42 \cdot 10^{-185}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{b}{\frac{t}{y}}}\\
\mathbf{elif}\;t \leq 1.65 \cdot 10^{-107}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 9.2 \cdot 10^{-65}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;t \leq 4.15 \cdot 10^{-50}:\\
\;\;\;\;\left(t \cdot \left(x + \frac{y}{\frac{t}{z}}\right)\right) \cdot \frac{1}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -1.42000000000000003e-185Initial program 80.4%
div-inv80.5%
Applied egg-rr80.5%
Taylor expanded in x around inf 63.3%
associate-+r+63.3%
associate-/l*66.1%
Simplified66.1%
if -1.42000000000000003e-185 < t < 1.65000000000000002e-107Initial program 56.0%
Taylor expanded in y around inf 70.5%
if 1.65000000000000002e-107 < t < 9.1999999999999999e-65Initial program 81.3%
div-inv81.1%
Applied egg-rr81.1%
Taylor expanded in x around inf 71.6%
associate-+r+71.6%
associate-/l*71.6%
Simplified71.6%
Taylor expanded in a around 0 71.7%
if 9.1999999999999999e-65 < t < 4.1499999999999998e-50Initial program 99.7%
Taylor expanded in b around inf 74.1%
div-inv74.1%
associate-/l*74.1%
*-commutative74.1%
Applied egg-rr74.1%
if 4.1499999999999998e-50 < t Initial program 82.6%
div-inv82.5%
Applied egg-rr82.5%
Taylor expanded in b around 0 73.8%
associate-/l*73.9%
associate-/r/75.3%
Simplified75.3%
Final simplification70.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.42e-185)
(/ x (+ (+ a 1.0) (/ b (/ t y))))
(if (<= t 2.3e-108)
(/ z b)
(if (<= t 9.5e-65)
(/ x (+ 1.0 (/ (* y b) t)))
(if (<= t 4.3e-47)
(* (/ z t) (/ y (+ a (+ 1.0 (/ y (/ t b))))))
(/ (+ x (* z (/ y t))) (+ a 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.42e-185) {
tmp = x / ((a + 1.0) + (b / (t / y)));
} else if (t <= 2.3e-108) {
tmp = z / b;
} else if (t <= 9.5e-65) {
tmp = x / (1.0 + ((y * b) / t));
} else if (t <= 4.3e-47) {
tmp = (z / t) * (y / (a + (1.0 + (y / (t / b)))));
} else {
tmp = (x + (z * (y / t))) / (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 <= (-1.42d-185)) then
tmp = x / ((a + 1.0d0) + (b / (t / y)))
else if (t <= 2.3d-108) then
tmp = z / b
else if (t <= 9.5d-65) then
tmp = x / (1.0d0 + ((y * b) / t))
else if (t <= 4.3d-47) then
tmp = (z / t) * (y / (a + (1.0d0 + (y / (t / b)))))
else
tmp = (x + (z * (y / t))) / (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 <= -1.42e-185) {
tmp = x / ((a + 1.0) + (b / (t / y)));
} else if (t <= 2.3e-108) {
tmp = z / b;
} else if (t <= 9.5e-65) {
tmp = x / (1.0 + ((y * b) / t));
} else if (t <= 4.3e-47) {
tmp = (z / t) * (y / (a + (1.0 + (y / (t / b)))));
} else {
tmp = (x + (z * (y / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.42e-185: tmp = x / ((a + 1.0) + (b / (t / y))) elif t <= 2.3e-108: tmp = z / b elif t <= 9.5e-65: tmp = x / (1.0 + ((y * b) / t)) elif t <= 4.3e-47: tmp = (z / t) * (y / (a + (1.0 + (y / (t / b))))) else: tmp = (x + (z * (y / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.42e-185) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(b / Float64(t / y)))); elseif (t <= 2.3e-108) tmp = Float64(z / b); elseif (t <= 9.5e-65) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); elseif (t <= 4.3e-47) tmp = Float64(Float64(z / t) * Float64(y / Float64(a + Float64(1.0 + Float64(y / Float64(t / b)))))); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.42e-185) tmp = x / ((a + 1.0) + (b / (t / y))); elseif (t <= 2.3e-108) tmp = z / b; elseif (t <= 9.5e-65) tmp = x / (1.0 + ((y * b) / t)); elseif (t <= 4.3e-47) tmp = (z / t) * (y / (a + (1.0 + (y / (t / b))))); else tmp = (x + (z * (y / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.42e-185], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.3e-108], N[(z / b), $MachinePrecision], If[LessEqual[t, 9.5e-65], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.3e-47], N[(N[(z / t), $MachinePrecision] * N[(y / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.42 \cdot 10^{-185}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{b}{\frac{t}{y}}}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-108}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-65}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-47}:\\
\;\;\;\;\frac{z}{t} \cdot \frac{y}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -1.42000000000000003e-185Initial program 80.4%
div-inv80.5%
Applied egg-rr80.5%
Taylor expanded in x around inf 63.3%
associate-+r+63.3%
associate-/l*66.1%
Simplified66.1%
if -1.42000000000000003e-185 < t < 2.29999999999999996e-108Initial program 56.0%
Taylor expanded in y around inf 70.5%
if 2.29999999999999996e-108 < t < 9.5000000000000004e-65Initial program 81.3%
div-inv81.1%
Applied egg-rr81.1%
Taylor expanded in x around inf 71.6%
associate-+r+71.6%
associate-/l*71.6%
Simplified71.6%
Taylor expanded in a around 0 71.7%
if 9.5000000000000004e-65 < t < 4.2999999999999998e-47Initial program 99.7%
Taylor expanded in x around 0 85.4%
associate-/l/85.4%
times-frac85.7%
associate-+l+85.7%
associate-/l*85.7%
Applied egg-rr85.7%
if 4.2999999999999998e-47 < t Initial program 82.6%
div-inv82.5%
Applied egg-rr82.5%
Taylor expanded in b around 0 73.8%
associate-/l*73.9%
associate-/r/75.3%
Simplified75.3%
Final simplification70.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -6.8e+34)
t_1
(if (<= t -1.4e-122)
(* (/ t y) (/ x b))
(if (<= t 4.9e-110)
(/ z b)
(if (<= t 4.3e-33)
(/ x (+ 1.0 (/ (* y b) t)))
(if (<= t 5.5e+87) (* (/ y t) (/ z (+ 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 <= -6.8e+34) {
tmp = t_1;
} else if (t <= -1.4e-122) {
tmp = (t / y) * (x / b);
} else if (t <= 4.9e-110) {
tmp = z / b;
} else if (t <= 4.3e-33) {
tmp = x / (1.0 + ((y * b) / t));
} else if (t <= 5.5e+87) {
tmp = (y / t) * (z / (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 <= (-6.8d+34)) then
tmp = t_1
else if (t <= (-1.4d-122)) then
tmp = (t / y) * (x / b)
else if (t <= 4.9d-110) then
tmp = z / b
else if (t <= 4.3d-33) then
tmp = x / (1.0d0 + ((y * b) / t))
else if (t <= 5.5d+87) then
tmp = (y / t) * (z / (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 <= -6.8e+34) {
tmp = t_1;
} else if (t <= -1.4e-122) {
tmp = (t / y) * (x / b);
} else if (t <= 4.9e-110) {
tmp = z / b;
} else if (t <= 4.3e-33) {
tmp = x / (1.0 + ((y * b) / t));
} else if (t <= 5.5e+87) {
tmp = (y / t) * (z / (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 <= -6.8e+34: tmp = t_1 elif t <= -1.4e-122: tmp = (t / y) * (x / b) elif t <= 4.9e-110: tmp = z / b elif t <= 4.3e-33: tmp = x / (1.0 + ((y * b) / t)) elif t <= 5.5e+87: tmp = (y / t) * (z / (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 <= -6.8e+34) tmp = t_1; elseif (t <= -1.4e-122) tmp = Float64(Float64(t / y) * Float64(x / b)); elseif (t <= 4.9e-110) tmp = Float64(z / b); elseif (t <= 4.3e-33) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); elseif (t <= 5.5e+87) tmp = Float64(Float64(y / t) * Float64(z / 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 <= -6.8e+34) tmp = t_1; elseif (t <= -1.4e-122) tmp = (t / y) * (x / b); elseif (t <= 4.9e-110) tmp = z / b; elseif (t <= 4.3e-33) tmp = x / (1.0 + ((y * b) / t)); elseif (t <= 5.5e+87) tmp = (y / t) * (z / (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, -6.8e+34], t$95$1, If[LessEqual[t, -1.4e-122], N[(N[(t / y), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.9e-110], N[(z / b), $MachinePrecision], If[LessEqual[t, 4.3e-33], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.5e+87], N[(N[(y / t), $MachinePrecision] * N[(z / 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 -6.8 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.4 \cdot 10^{-122}:\\
\;\;\;\;\frac{t}{y} \cdot \frac{x}{b}\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{-110}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-33}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;t \leq 5.5 \cdot 10^{+87}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.7999999999999999e34 or 5.50000000000000022e87 < t Initial program 82.6%
Taylor expanded in y around 0 69.6%
if -6.7999999999999999e34 < t < -1.3999999999999999e-122Initial program 79.7%
div-inv79.8%
Applied egg-rr79.8%
Taylor expanded in x around inf 53.7%
associate-+r+53.7%
associate-/l*53.8%
Simplified53.8%
Taylor expanded in b around inf 39.8%
*-commutative39.8%
times-frac46.3%
Simplified46.3%
if -1.3999999999999999e-122 < t < 4.8999999999999997e-110Initial program 59.8%
Taylor expanded in y around inf 67.1%
if 4.8999999999999997e-110 < t < 4.30000000000000031e-33Initial program 89.4%
div-inv89.3%
Applied egg-rr89.3%
Taylor expanded in x around inf 67.9%
associate-+r+67.9%
associate-/l*68.0%
Simplified68.0%
Taylor expanded in a around 0 62.7%
if 4.30000000000000031e-33 < t < 5.50000000000000022e87Initial program 81.8%
Taylor expanded in x around 0 55.9%
Taylor expanded in y around 0 42.1%
times-frac58.7%
Simplified58.7%
Final simplification64.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.2e-185)
(/ x (+ (+ a 1.0) (/ b (/ t y))))
(if (<= t 8.8e-107)
(/ z b)
(if (<= t 1.05e-64)
(/ x (+ 1.0 (/ (* y b) t)))
(if (<= t 2.1e-48)
(/ (* t (+ x (/ (* y z) t))) (* y b))
(/ (+ x (* z (/ y t))) (+ a 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.2e-185) {
tmp = x / ((a + 1.0) + (b / (t / y)));
} else if (t <= 8.8e-107) {
tmp = z / b;
} else if (t <= 1.05e-64) {
tmp = x / (1.0 + ((y * b) / t));
} else if (t <= 2.1e-48) {
tmp = (t * (x + ((y * z) / t))) / (y * b);
} else {
tmp = (x + (z * (y / t))) / (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 <= (-1.2d-185)) then
tmp = x / ((a + 1.0d0) + (b / (t / y)))
else if (t <= 8.8d-107) then
tmp = z / b
else if (t <= 1.05d-64) then
tmp = x / (1.0d0 + ((y * b) / t))
else if (t <= 2.1d-48) then
tmp = (t * (x + ((y * z) / t))) / (y * b)
else
tmp = (x + (z * (y / t))) / (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 <= -1.2e-185) {
tmp = x / ((a + 1.0) + (b / (t / y)));
} else if (t <= 8.8e-107) {
tmp = z / b;
} else if (t <= 1.05e-64) {
tmp = x / (1.0 + ((y * b) / t));
} else if (t <= 2.1e-48) {
tmp = (t * (x + ((y * z) / t))) / (y * b);
} else {
tmp = (x + (z * (y / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.2e-185: tmp = x / ((a + 1.0) + (b / (t / y))) elif t <= 8.8e-107: tmp = z / b elif t <= 1.05e-64: tmp = x / (1.0 + ((y * b) / t)) elif t <= 2.1e-48: tmp = (t * (x + ((y * z) / t))) / (y * b) else: tmp = (x + (z * (y / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.2e-185) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(b / Float64(t / y)))); elseif (t <= 8.8e-107) tmp = Float64(z / b); elseif (t <= 1.05e-64) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); elseif (t <= 2.1e-48) tmp = Float64(Float64(t * Float64(x + Float64(Float64(y * z) / t))) / Float64(y * b)); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.2e-185) tmp = x / ((a + 1.0) + (b / (t / y))); elseif (t <= 8.8e-107) tmp = z / b; elseif (t <= 1.05e-64) tmp = x / (1.0 + ((y * b) / t)); elseif (t <= 2.1e-48) tmp = (t * (x + ((y * z) / t))) / (y * b); else tmp = (x + (z * (y / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.2e-185], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.8e-107], N[(z / b), $MachinePrecision], If[LessEqual[t, 1.05e-64], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e-48], N[(N[(t * N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-185}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{b}{\frac{t}{y}}}\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{-107}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 1.05 \cdot 10^{-64}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-48}:\\
\;\;\;\;\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -1.2000000000000001e-185Initial program 80.4%
div-inv80.5%
Applied egg-rr80.5%
Taylor expanded in x around inf 63.3%
associate-+r+63.3%
associate-/l*66.1%
Simplified66.1%
if -1.2000000000000001e-185 < t < 8.8000000000000005e-107Initial program 56.0%
Taylor expanded in y around inf 70.5%
if 8.8000000000000005e-107 < t < 1.05000000000000006e-64Initial program 81.3%
div-inv81.1%
Applied egg-rr81.1%
Taylor expanded in x around inf 71.6%
associate-+r+71.6%
associate-/l*71.6%
Simplified71.6%
Taylor expanded in a around 0 71.7%
if 1.05000000000000006e-64 < t < 2.09999999999999989e-48Initial program 99.7%
Taylor expanded in b around inf 74.1%
if 2.09999999999999989e-48 < t Initial program 82.6%
div-inv82.5%
Applied egg-rr82.5%
Taylor expanded in b around 0 73.8%
associate-/l*73.9%
associate-/r/75.3%
Simplified75.3%
Final simplification70.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ x a) (* (/ y t) (/ z a)))))
(if (<= (+ a 1.0) -2e+101)
t_1
(if (<= (+ a 1.0) -2e+16)
(/ z b)
(if (<= (+ a 1.0) 4e+21) (/ x (+ 1.0 (/ (* y b) t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) + ((y / t) * (z / a));
double tmp;
if ((a + 1.0) <= -2e+101) {
tmp = t_1;
} else if ((a + 1.0) <= -2e+16) {
tmp = z / b;
} else if ((a + 1.0) <= 4e+21) {
tmp = x / (1.0 + ((y * b) / t));
} 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) + ((y / t) * (z / a))
if ((a + 1.0d0) <= (-2d+101)) then
tmp = t_1
else if ((a + 1.0d0) <= (-2d+16)) then
tmp = z / b
else if ((a + 1.0d0) <= 4d+21) then
tmp = x / (1.0d0 + ((y * b) / t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) + ((y / t) * (z / a));
double tmp;
if ((a + 1.0) <= -2e+101) {
tmp = t_1;
} else if ((a + 1.0) <= -2e+16) {
tmp = z / b;
} else if ((a + 1.0) <= 4e+21) {
tmp = x / (1.0 + ((y * b) / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / a) + ((y / t) * (z / a)) tmp = 0 if (a + 1.0) <= -2e+101: tmp = t_1 elif (a + 1.0) <= -2e+16: tmp = z / b elif (a + 1.0) <= 4e+21: tmp = x / (1.0 + ((y * b) / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / a) + Float64(Float64(y / t) * Float64(z / a))) tmp = 0.0 if (Float64(a + 1.0) <= -2e+101) tmp = t_1; elseif (Float64(a + 1.0) <= -2e+16) tmp = Float64(z / b); elseif (Float64(a + 1.0) <= 4e+21) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / a) + ((y / t) * (z / a)); tmp = 0.0; if ((a + 1.0) <= -2e+101) tmp = t_1; elseif ((a + 1.0) <= -2e+16) tmp = z / b; elseif ((a + 1.0) <= 4e+21) tmp = x / (1.0 + ((y * b) / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / a), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a + 1.0), $MachinePrecision], -2e+101], t$95$1, If[LessEqual[N[(a + 1.0), $MachinePrecision], -2e+16], N[(z / b), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], 4e+21], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a} + \frac{y}{t} \cdot \frac{z}{a}\\
\mathbf{if}\;a + 1 \leq -2 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a + 1 \leq -2 \cdot 10^{+16}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a + 1 \leq 4 \cdot 10^{+21}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 a 1) < -2e101 or 4e21 < (+.f64 a 1) Initial program 77.5%
Taylor expanded in a around inf 66.4%
Taylor expanded in x around 0 61.9%
*-commutative61.9%
times-frac73.0%
Simplified73.0%
if -2e101 < (+.f64 a 1) < -2e16Initial program 48.1%
Taylor expanded in y around inf 71.7%
if -2e16 < (+.f64 a 1) < 4e21Initial program 76.1%
div-inv76.1%
Applied egg-rr76.1%
Taylor expanded in x around inf 56.7%
associate-+r+56.7%
associate-/l*59.4%
Simplified59.4%
Taylor expanded in a around 0 56.7%
Final simplification64.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ x a) (* (/ y t) (/ z a)))))
(if (<= (+ a 1.0) -2e+101)
t_1
(if (<= (+ a 1.0) -1e+39)
(/ z b)
(if (<= (+ a 1.0) 1e+106) (/ x (+ (+ a 1.0) (/ b (/ t y)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x / a) + ((y / t) * (z / a));
double tmp;
if ((a + 1.0) <= -2e+101) {
tmp = t_1;
} else if ((a + 1.0) <= -1e+39) {
tmp = z / b;
} else if ((a + 1.0) <= 1e+106) {
tmp = x / ((a + 1.0) + (b / (t / y)));
} 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) + ((y / t) * (z / a))
if ((a + 1.0d0) <= (-2d+101)) then
tmp = t_1
else if ((a + 1.0d0) <= (-1d+39)) then
tmp = z / b
else if ((a + 1.0d0) <= 1d+106) then
tmp = x / ((a + 1.0d0) + (b / (t / y)))
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) + ((y / t) * (z / a));
double tmp;
if ((a + 1.0) <= -2e+101) {
tmp = t_1;
} else if ((a + 1.0) <= -1e+39) {
tmp = z / b;
} else if ((a + 1.0) <= 1e+106) {
tmp = x / ((a + 1.0) + (b / (t / y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x / a) + ((y / t) * (z / a)) tmp = 0 if (a + 1.0) <= -2e+101: tmp = t_1 elif (a + 1.0) <= -1e+39: tmp = z / b elif (a + 1.0) <= 1e+106: tmp = x / ((a + 1.0) + (b / (t / y))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x / a) + Float64(Float64(y / t) * Float64(z / a))) tmp = 0.0 if (Float64(a + 1.0) <= -2e+101) tmp = t_1; elseif (Float64(a + 1.0) <= -1e+39) tmp = Float64(z / b); elseif (Float64(a + 1.0) <= 1e+106) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(b / Float64(t / y)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x / a) + ((y / t) * (z / a)); tmp = 0.0; if ((a + 1.0) <= -2e+101) tmp = t_1; elseif ((a + 1.0) <= -1e+39) tmp = z / b; elseif ((a + 1.0) <= 1e+106) tmp = x / ((a + 1.0) + (b / (t / y))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x / a), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a + 1.0), $MachinePrecision], -2e+101], t$95$1, If[LessEqual[N[(a + 1.0), $MachinePrecision], -1e+39], N[(z / b), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], 1e+106], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a} + \frac{y}{t} \cdot \frac{z}{a}\\
\mathbf{if}\;a + 1 \leq -2 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a + 1 \leq -1 \cdot 10^{+39}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a + 1 \leq 10^{+106}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{b}{\frac{t}{y}}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 a 1) < -2e101 or 1.00000000000000009e106 < (+.f64 a 1) Initial program 76.3%
Taylor expanded in a around inf 68.3%
Taylor expanded in x around 0 63.0%
*-commutative63.0%
times-frac76.3%
Simplified76.3%
if -2e101 < (+.f64 a 1) < -9.9999999999999994e38Initial program 41.3%
Taylor expanded in y around inf 80.8%
if -9.9999999999999994e38 < (+.f64 a 1) < 1.00000000000000009e106Initial program 77.3%
div-inv77.3%
Applied egg-rr77.3%
Taylor expanded in x around inf 59.2%
associate-+r+59.2%
associate-/l*62.1%
Simplified62.1%
Final simplification68.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ (+ a 1.0) (* y (/ b t))))))
(if (<= t -5.4e-123)
t_1
(if (<= t 1.1e-106)
(/ z b)
(if (<= t 5e-40)
(/ x (+ 1.0 (/ (* y b) t)))
(if (<= t 2.05e+45) (+ (/ x a) (* (/ y t) (/ z a))) 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 <= -5.4e-123) {
tmp = t_1;
} else if (t <= 1.1e-106) {
tmp = z / b;
} else if (t <= 5e-40) {
tmp = x / (1.0 + ((y * b) / t));
} else if (t <= 2.05e+45) {
tmp = (x / a) + ((y / t) * (z / a));
} 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 <= (-5.4d-123)) then
tmp = t_1
else if (t <= 1.1d-106) then
tmp = z / b
else if (t <= 5d-40) then
tmp = x / (1.0d0 + ((y * b) / t))
else if (t <= 2.05d+45) then
tmp = (x / a) + ((y / t) * (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 b) {
double t_1 = x / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -5.4e-123) {
tmp = t_1;
} else if (t <= 1.1e-106) {
tmp = z / b;
} else if (t <= 5e-40) {
tmp = x / (1.0 + ((y * b) / t));
} else if (t <= 2.05e+45) {
tmp = (x / a) + ((y / t) * (z / a));
} 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 <= -5.4e-123: tmp = t_1 elif t <= 1.1e-106: tmp = z / b elif t <= 5e-40: tmp = x / (1.0 + ((y * b) / t)) elif t <= 2.05e+45: tmp = (x / a) + ((y / t) * (z / a)) 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 <= -5.4e-123) tmp = t_1; elseif (t <= 1.1e-106) tmp = Float64(z / b); elseif (t <= 5e-40) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); elseif (t <= 2.05e+45) tmp = Float64(Float64(x / a) + Float64(Float64(y / t) * Float64(z / a))); 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 <= -5.4e-123) tmp = t_1; elseif (t <= 1.1e-106) tmp = z / b; elseif (t <= 5e-40) tmp = x / (1.0 + ((y * b) / t)); elseif (t <= 2.05e+45) tmp = (x / a) + ((y / t) * (z / a)); 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, -5.4e-123], t$95$1, If[LessEqual[t, 1.1e-106], N[(z / b), $MachinePrecision], If[LessEqual[t, 5e-40], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.05e+45], N[(N[(x / a), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * N[(z / a), $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 -5.4 \cdot 10^{-123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-106}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{-40}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;t \leq 2.05 \cdot 10^{+45}:\\
\;\;\;\;\frac{x}{a} + \frac{y}{t} \cdot \frac{z}{a}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -5.4000000000000002e-123 or 2.05000000000000006e45 < t Initial program 82.4%
div-inv82.4%
Applied egg-rr82.4%
Taylor expanded in x around inf 66.8%
associate-+r+66.8%
associate-/l*70.3%
Simplified70.3%
associate-/r/70.4%
Applied egg-rr70.4%
if -5.4000000000000002e-123 < t < 1.09999999999999997e-106Initial program 59.8%
Taylor expanded in y around inf 67.1%
if 1.09999999999999997e-106 < t < 4.99999999999999965e-40Initial program 88.8%
div-inv88.7%
Applied egg-rr88.7%
Taylor expanded in x around inf 66.0%
associate-+r+66.0%
associate-/l*66.1%
Simplified66.1%
Taylor expanded in a around 0 66.1%
if 4.99999999999999965e-40 < t < 2.05000000000000006e45Initial program 78.9%
Taylor expanded in a around inf 54.3%
Taylor expanded in x around 0 54.0%
*-commutative54.0%
times-frac72.8%
Simplified72.8%
Final simplification69.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.15e-185)
(/ x (+ (+ a 1.0) (/ b (/ t y))))
(if (<= t 4.4e-107)
(/ z b)
(if (<= t 2.3e-64)
(/ x (+ 1.0 (/ (* y b) t)))
(if (<= t 8.5e-49)
(/ 1.0 (/ b z))
(/ (+ x (* z (/ y t))) (+ a 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.15e-185) {
tmp = x / ((a + 1.0) + (b / (t / y)));
} else if (t <= 4.4e-107) {
tmp = z / b;
} else if (t <= 2.3e-64) {
tmp = x / (1.0 + ((y * b) / t));
} else if (t <= 8.5e-49) {
tmp = 1.0 / (b / z);
} else {
tmp = (x + (z * (y / t))) / (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 <= (-1.15d-185)) then
tmp = x / ((a + 1.0d0) + (b / (t / y)))
else if (t <= 4.4d-107) then
tmp = z / b
else if (t <= 2.3d-64) then
tmp = x / (1.0d0 + ((y * b) / t))
else if (t <= 8.5d-49) then
tmp = 1.0d0 / (b / z)
else
tmp = (x + (z * (y / t))) / (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 <= -1.15e-185) {
tmp = x / ((a + 1.0) + (b / (t / y)));
} else if (t <= 4.4e-107) {
tmp = z / b;
} else if (t <= 2.3e-64) {
tmp = x / (1.0 + ((y * b) / t));
} else if (t <= 8.5e-49) {
tmp = 1.0 / (b / z);
} else {
tmp = (x + (z * (y / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.15e-185: tmp = x / ((a + 1.0) + (b / (t / y))) elif t <= 4.4e-107: tmp = z / b elif t <= 2.3e-64: tmp = x / (1.0 + ((y * b) / t)) elif t <= 8.5e-49: tmp = 1.0 / (b / z) else: tmp = (x + (z * (y / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.15e-185) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(b / Float64(t / y)))); elseif (t <= 4.4e-107) tmp = Float64(z / b); elseif (t <= 2.3e-64) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); elseif (t <= 8.5e-49) tmp = Float64(1.0 / Float64(b / z)); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.15e-185) tmp = x / ((a + 1.0) + (b / (t / y))); elseif (t <= 4.4e-107) tmp = z / b; elseif (t <= 2.3e-64) tmp = x / (1.0 + ((y * b) / t)); elseif (t <= 8.5e-49) tmp = 1.0 / (b / z); else tmp = (x + (z * (y / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.15e-185], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.4e-107], N[(z / b), $MachinePrecision], If[LessEqual[t, 2.3e-64], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e-49], N[(1.0 / N[(b / z), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.15 \cdot 10^{-185}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{b}{\frac{t}{y}}}\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-107}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 2.3 \cdot 10^{-64}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{-49}:\\
\;\;\;\;\frac{1}{\frac{b}{z}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -1.15e-185Initial program 80.4%
div-inv80.5%
Applied egg-rr80.5%
Taylor expanded in x around inf 63.3%
associate-+r+63.3%
associate-/l*66.1%
Simplified66.1%
if -1.15e-185 < t < 4.40000000000000025e-107Initial program 56.0%
Taylor expanded in y around inf 70.5%
if 4.40000000000000025e-107 < t < 2.3000000000000001e-64Initial program 81.3%
div-inv81.1%
Applied egg-rr81.1%
Taylor expanded in x around inf 71.6%
associate-+r+71.6%
associate-/l*71.6%
Simplified71.6%
Taylor expanded in a around 0 71.7%
if 2.3000000000000001e-64 < t < 8.50000000000000069e-49Initial program 99.7%
div-inv99.7%
Applied egg-rr99.7%
clear-num99.4%
associate-+l+99.4%
associate-*l/80.2%
div-inv80.5%
clear-num80.5%
associate-/l/80.5%
inv-pow80.5%
Applied egg-rr80.5%
unpow-180.5%
associate-/r/80.0%
Simplified80.0%
Taylor expanded in y around inf 74.1%
if 8.50000000000000069e-49 < t Initial program 82.6%
div-inv82.5%
Applied egg-rr82.5%
Taylor expanded in b around 0 73.8%
associate-/l*73.9%
associate-/r/75.3%
Simplified75.3%
Final simplification70.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* z (/ y t))) a)))
(if (<= (+ a 1.0) -2e+101)
t_1
(if (<= (+ a 1.0) -2e+16)
(/ z b)
(if (<= (+ a 1.0) 4e+21) (/ x (+ 1.0 (/ (* y b) t))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z * (y / t))) / a;
double tmp;
if ((a + 1.0) <= -2e+101) {
tmp = t_1;
} else if ((a + 1.0) <= -2e+16) {
tmp = z / b;
} else if ((a + 1.0) <= 4e+21) {
tmp = x / (1.0 + ((y * b) / t));
} 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 + (z * (y / t))) / a
if ((a + 1.0d0) <= (-2d+101)) then
tmp = t_1
else if ((a + 1.0d0) <= (-2d+16)) then
tmp = z / b
else if ((a + 1.0d0) <= 4d+21) then
tmp = x / (1.0d0 + ((y * b) / t))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z * (y / t))) / a;
double tmp;
if ((a + 1.0) <= -2e+101) {
tmp = t_1;
} else if ((a + 1.0) <= -2e+16) {
tmp = z / b;
} else if ((a + 1.0) <= 4e+21) {
tmp = x / (1.0 + ((y * b) / t));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (z * (y / t))) / a tmp = 0 if (a + 1.0) <= -2e+101: tmp = t_1 elif (a + 1.0) <= -2e+16: tmp = z / b elif (a + 1.0) <= 4e+21: tmp = x / (1.0 + ((y * b) / t)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(z * Float64(y / t))) / a) tmp = 0.0 if (Float64(a + 1.0) <= -2e+101) tmp = t_1; elseif (Float64(a + 1.0) <= -2e+16) tmp = Float64(z / b); elseif (Float64(a + 1.0) <= 4e+21) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (z * (y / t))) / a; tmp = 0.0; if ((a + 1.0) <= -2e+101) tmp = t_1; elseif ((a + 1.0) <= -2e+16) tmp = z / b; elseif ((a + 1.0) <= 4e+21) tmp = x / (1.0 + ((y * b) / t)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[N[(a + 1.0), $MachinePrecision], -2e+101], t$95$1, If[LessEqual[N[(a + 1.0), $MachinePrecision], -2e+16], N[(z / b), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], 4e+21], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + z \cdot \frac{y}{t}}{a}\\
\mathbf{if}\;a + 1 \leq -2 \cdot 10^{+101}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a + 1 \leq -2 \cdot 10^{+16}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a + 1 \leq 4 \cdot 10^{+21}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if (+.f64 a 1) < -2e101 or 4e21 < (+.f64 a 1) Initial program 77.5%
div-inv77.5%
Applied egg-rr77.5%
Taylor expanded in a around inf 66.4%
associate-/l*64.6%
associate-/r/68.2%
Simplified68.2%
if -2e101 < (+.f64 a 1) < -2e16Initial program 48.1%
Taylor expanded in y around inf 71.7%
if -2e16 < (+.f64 a 1) < 4e21Initial program 76.1%
div-inv76.1%
Applied egg-rr76.1%
Taylor expanded in x around inf 56.7%
associate-+r+56.7%
associate-/l*59.4%
Simplified59.4%
Taylor expanded in a around 0 56.7%
Final simplification62.6%
(FPCore (x y z t a b)
:precision binary64
(if (<= (+ a 1.0) -2e+101)
(/ (+ x (/ (* y z) t)) a)
(if (<= (+ a 1.0) -2e+16)
(/ z b)
(if (<= (+ a 1.0) 4e+21)
(/ x (+ 1.0 (/ (* y b) t)))
(/ (+ x (* z (/ y t))) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a + 1.0) <= -2e+101) {
tmp = (x + ((y * z) / t)) / a;
} else if ((a + 1.0) <= -2e+16) {
tmp = z / b;
} else if ((a + 1.0) <= 4e+21) {
tmp = x / (1.0 + ((y * b) / t));
} else {
tmp = (x + (z * (y / t))) / 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 + 1.0d0) <= (-2d+101)) then
tmp = (x + ((y * z) / t)) / a
else if ((a + 1.0d0) <= (-2d+16)) then
tmp = z / b
else if ((a + 1.0d0) <= 4d+21) then
tmp = x / (1.0d0 + ((y * b) / t))
else
tmp = (x + (z * (y / t))) / 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 + 1.0) <= -2e+101) {
tmp = (x + ((y * z) / t)) / a;
} else if ((a + 1.0) <= -2e+16) {
tmp = z / b;
} else if ((a + 1.0) <= 4e+21) {
tmp = x / (1.0 + ((y * b) / t));
} else {
tmp = (x + (z * (y / t))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a + 1.0) <= -2e+101: tmp = (x + ((y * z) / t)) / a elif (a + 1.0) <= -2e+16: tmp = z / b elif (a + 1.0) <= 4e+21: tmp = x / (1.0 + ((y * b) / t)) else: tmp = (x + (z * (y / t))) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(a + 1.0) <= -2e+101) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a); elseif (Float64(a + 1.0) <= -2e+16) tmp = Float64(z / b); elseif (Float64(a + 1.0) <= 4e+21) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a + 1.0) <= -2e+101) tmp = (x + ((y * z) / t)) / a; elseif ((a + 1.0) <= -2e+16) tmp = z / b; elseif ((a + 1.0) <= 4e+21) tmp = x / (1.0 + ((y * b) / t)); else tmp = (x + (z * (y / t))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(a + 1.0), $MachinePrecision], -2e+101], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], -2e+16], N[(z / b), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], 4e+21], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a + 1 \leq -2 \cdot 10^{+101}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\
\mathbf{elif}\;a + 1 \leq -2 \cdot 10^{+16}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a + 1 \leq 4 \cdot 10^{+21}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a}\\
\end{array}
\end{array}
if (+.f64 a 1) < -2e101Initial program 81.9%
Taylor expanded in a around inf 76.5%
if -2e101 < (+.f64 a 1) < -2e16Initial program 48.1%
Taylor expanded in y around inf 71.7%
if -2e16 < (+.f64 a 1) < 4e21Initial program 76.1%
div-inv76.1%
Applied egg-rr76.1%
Taylor expanded in x around inf 56.7%
associate-+r+56.7%
associate-/l*59.4%
Simplified59.4%
Taylor expanded in a around 0 56.7%
if 4e21 < (+.f64 a 1) Initial program 74.6%
div-inv74.6%
Applied egg-rr74.6%
Taylor expanded in a around inf 59.7%
associate-/l*58.3%
associate-/r/64.2%
Simplified64.2%
Final simplification62.9%
(FPCore (x y z t a b) :precision binary64 (if (<= y 1.12e+49) (/ (+ x (* z (/ y t))) (+ a (+ 1.0 (* b (/ y t))))) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= 1.12e+49) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (b * (y / t))));
} 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 (y <= 1.12d+49) then
tmp = (x + (z * (y / t))) / (a + (1.0d0 + (b * (y / t))))
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 (y <= 1.12e+49) {
tmp = (x + (z * (y / t))) / (a + (1.0 + (b * (y / t))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= 1.12e+49: tmp = (x + (z * (y / t))) / (a + (1.0 + (b * (y / t)))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= 1.12e+49) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(1.0 + Float64(b * Float64(y / t))))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= 1.12e+49) tmp = (x + (z * (y / t))) / (a + (1.0 + (b * (y / t)))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, 1.12e+49], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.12 \cdot 10^{+49}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < 1.12000000000000005e49Initial program 82.8%
associate-*l/84.3%
associate-+l+84.3%
associate-*l/84.8%
Simplified84.8%
if 1.12000000000000005e49 < y Initial program 52.4%
Taylor expanded in y around inf 62.6%
Final simplification79.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -6.4e+34)
t_1
(if (<= t -8.8e-123) (* (/ t y) (/ x b)) (if (<= t 7e-50) (/ z b) 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 <= -6.4e+34) {
tmp = t_1;
} else if (t <= -8.8e-123) {
tmp = (t / y) * (x / b);
} else if (t <= 7e-50) {
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 / (a + 1.0d0)
if (t <= (-6.4d+34)) then
tmp = t_1
else if (t <= (-8.8d-123)) then
tmp = (t / y) * (x / b)
else if (t <= 7d-50) 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 / (a + 1.0);
double tmp;
if (t <= -6.4e+34) {
tmp = t_1;
} else if (t <= -8.8e-123) {
tmp = (t / y) * (x / b);
} else if (t <= 7e-50) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -6.4e+34: tmp = t_1 elif t <= -8.8e-123: tmp = (t / y) * (x / b) elif t <= 7e-50: tmp = z / b 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 <= -6.4e+34) tmp = t_1; elseif (t <= -8.8e-123) tmp = Float64(Float64(t / y) * Float64(x / b)); elseif (t <= 7e-50) 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 / (a + 1.0); tmp = 0.0; if (t <= -6.4e+34) tmp = t_1; elseif (t <= -8.8e-123) tmp = (t / y) * (x / b); elseif (t <= 7e-50) tmp = z / b; 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, -6.4e+34], t$95$1, If[LessEqual[t, -8.8e-123], N[(N[(t / y), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-50], N[(z / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -6.4 \cdot 10^{+34}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8.8 \cdot 10^{-123}:\\
\;\;\;\;\frac{t}{y} \cdot \frac{x}{b}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-50}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.3999999999999997e34 or 6.99999999999999993e-50 < t Initial program 82.8%
Taylor expanded in y around 0 62.8%
if -6.3999999999999997e34 < t < -8.80000000000000025e-123Initial program 79.7%
div-inv79.8%
Applied egg-rr79.8%
Taylor expanded in x around inf 53.7%
associate-+r+53.7%
associate-/l*53.8%
Simplified53.8%
Taylor expanded in b around inf 39.8%
*-commutative39.8%
times-frac46.3%
Simplified46.3%
if -8.80000000000000025e-123 < t < 6.99999999999999993e-50Initial program 63.9%
Taylor expanded in y around inf 64.0%
Final simplification61.4%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.2e+36) (/ x a) (if (<= t 1.5e-47) (/ z b) (if (<= t 1.3e+166) (/ x a) x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.2e+36) {
tmp = x / a;
} else if (t <= 1.5e-47) {
tmp = z / b;
} else if (t <= 1.3e+166) {
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 (t <= (-1.2d+36)) then
tmp = x / a
else if (t <= 1.5d-47) then
tmp = z / b
else if (t <= 1.3d+166) 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 (t <= -1.2e+36) {
tmp = x / a;
} else if (t <= 1.5e-47) {
tmp = z / b;
} else if (t <= 1.3e+166) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.2e+36: tmp = x / a elif t <= 1.5e-47: tmp = z / b elif t <= 1.3e+166: tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.2e+36) tmp = Float64(x / a); elseif (t <= 1.5e-47) tmp = Float64(z / b); elseif (t <= 1.3e+166) 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 (t <= -1.2e+36) tmp = x / a; elseif (t <= 1.5e-47) tmp = z / b; elseif (t <= 1.3e+166) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.2e+36], N[(x / a), $MachinePrecision], If[LessEqual[t, 1.5e-47], N[(z / b), $MachinePrecision], If[LessEqual[t, 1.3e+166], N[(x / a), $MachinePrecision], x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{+36}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{-47}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+166}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if t < -1.19999999999999996e36 or 1.50000000000000008e-47 < t < 1.3e166Initial program 82.8%
Taylor expanded in y around 0 57.5%
Taylor expanded in a around inf 42.8%
if -1.19999999999999996e36 < t < 1.50000000000000008e-47Initial program 67.3%
Taylor expanded in y around inf 55.8%
if 1.3e166 < t Initial program 83.1%
Taylor expanded in y around 0 80.4%
Taylor expanded in a around 0 56.9%
Final simplification51.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -9e+34) (not (<= t 1.18e-45))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -9e+34) || !(t <= 1.18e-45)) {
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 <= (-9d+34)) .or. (.not. (t <= 1.18d-45))) 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 <= -9e+34) || !(t <= 1.18e-45)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -9e+34) or not (t <= 1.18e-45): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -9e+34) || !(t <= 1.18e-45)) 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 <= -9e+34) || ~((t <= 1.18e-45))) 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, -9e+34], N[Not[LessEqual[t, 1.18e-45]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \cdot 10^{+34} \lor \neg \left(t \leq 1.18 \cdot 10^{-45}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -9.0000000000000001e34 or 1.18e-45 < t Initial program 82.8%
Taylor expanded in y around 0 62.8%
if -9.0000000000000001e34 < t < 1.18e-45Initial program 67.3%
Taylor expanded in y around inf 55.8%
Final simplification59.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -7.5e-14) (not (<= a 2.9e-13))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -7.5e-14) || !(a <= 2.9e-13)) {
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 <= (-7.5d-14)) .or. (.not. (a <= 2.9d-13))) 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 <= -7.5e-14) || !(a <= 2.9e-13)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -7.5e-14) or not (a <= 2.9e-13): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -7.5e-14) || !(a <= 2.9e-13)) 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 <= -7.5e-14) || ~((a <= 2.9e-13))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -7.5e-14], N[Not[LessEqual[a, 2.9e-13]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.5 \cdot 10^{-14} \lor \neg \left(a \leq 2.9 \cdot 10^{-13}\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -7.4999999999999996e-14 or 2.8999999999999998e-13 < a Initial program 73.4%
Taylor expanded in y around 0 42.8%
Taylor expanded in a around inf 42.9%
if -7.4999999999999996e-14 < a < 2.8999999999999998e-13Initial program 76.4%
Taylor expanded in y around 0 34.0%
Taylor expanded in a around 0 34.0%
Final simplification38.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 74.8%
Taylor expanded in y around 0 38.6%
Taylor expanded in a around 0 18.5%
Final simplification18.5%
(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 2024034
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:herbie-target
(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))))