
(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 19 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t)))
(t_2 (/ t_1 (+ (/ (* y b) t) (+ a 1.0))))
(t_3 (+ 1.0 (fma y (/ b t) a))))
(if (<= t_2 (- INFINITY))
(* z (+ (/ (/ x z) t_3) (/ (/ y t) t_3)))
(if (<= t_2 -2e-294)
(/ t_1 (+ (* b (* y (/ 1.0 t))) (+ a 1.0)))
(if (<= t_2 0.0)
(+ (/ z b) (/ (* t (/ x b)) y))
(if (<= t_2 1e+308) t_2 (/ (+ z (* t (/ x y))) b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double t_3 = 1.0 + fma(y, (b / t), a);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = z * (((x / z) / t_3) + ((y / t) / t_3));
} else if (t_2 <= -2e-294) {
tmp = t_1 / ((b * (y * (1.0 / t))) + (a + 1.0));
} else if (t_2 <= 0.0) {
tmp = (z / b) + ((t * (x / b)) / y);
} else if (t_2 <= 1e+308) {
tmp = t_2;
} else {
tmp = (z + (t * (x / y))) / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) t_3 = Float64(1.0 + fma(y, Float64(b / t), a)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(Float64(x / z) / t_3) + Float64(Float64(y / t) / t_3))); elseif (t_2 <= -2e-294) tmp = Float64(t_1 / Float64(Float64(b * Float64(y * Float64(1.0 / t))) + Float64(a + 1.0))); elseif (t_2 <= 0.0) tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)); elseif (t_2 <= 1e+308) tmp = t_2; else tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(N[(N[(x / z), $MachinePrecision] / t$95$3), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -2e-294], N[(t$95$1 / N[(N[(b * N[(y * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+308], t$95$2, N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_3 := 1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{\frac{x}{z}}{t\_3} + \frac{\frac{y}{t}}{t\_3}\right)\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-294}:\\
\;\;\;\;\frac{t\_1}{b \cdot \left(y \cdot \frac{1}{t}\right) + \left(a + 1\right)}\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\mathbf{elif}\;t\_2 \leq 10^{+308}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 23.6%
associate-/l*62.1%
associate-/l*62.1%
Simplified62.1%
Taylor expanded in z around inf 80.5%
associate-/r*86.9%
associate-*r/86.9%
+-commutative86.9%
associate-*r/86.9%
associate-*l/86.9%
*-commutative86.9%
fma-define86.9%
associate-/r*80.7%
associate-*r/73.0%
+-commutative73.0%
associate-*r/80.7%
associate-*l/80.7%
*-commutative80.7%
fma-define80.7%
Simplified80.7%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -2.00000000000000003e-294Initial program 99.6%
associate-*r/94.4%
*-commutative94.4%
div-inv94.4%
associate-*l*99.7%
Applied egg-rr99.7%
if -2.00000000000000003e-294 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0Initial program 48.5%
associate-/l*48.4%
associate-/l*69.0%
Simplified69.0%
Taylor expanded in y around -inf 63.8%
+-commutative63.8%
associate-*r/63.8%
Simplified79.3%
Taylor expanded in x around inf 68.1%
associate-/l*83.3%
Simplified83.3%
if 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1e308Initial program 99.4%
if 1e308 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 14.0%
associate-/l*24.6%
associate-/l*39.2%
Simplified39.2%
Taylor expanded in y around -inf 44.1%
+-commutative44.1%
associate-*r/44.1%
Simplified41.2%
Taylor expanded in b around inf 75.0%
associate-/l*77.6%
Simplified77.6%
Final simplification91.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))) (t_2 (/ t_1 (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_2 (- INFINITY))
(* z (+ (/ (/ x z) (+ a 1.0)) (/ (/ y t) (+ a 1.0))))
(if (<= t_2 -2e-294)
(/ t_1 (+ (* b (* y (/ 1.0 t))) (+ a 1.0)))
(if (<= t_2 0.0)
(+ (/ z b) (/ (* t (/ x b)) y))
(if (<= t_2 1e+308) t_2 (/ (+ z (* t (/ x y))) b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = z * (((x / z) / (a + 1.0)) + ((y / t) / (a + 1.0)));
} else if (t_2 <= -2e-294) {
tmp = t_1 / ((b * (y * (1.0 / t))) + (a + 1.0));
} else if (t_2 <= 0.0) {
tmp = (z / b) + ((t * (x / b)) / y);
} else if (t_2 <= 1e+308) {
tmp = t_2;
} else {
tmp = (z + (t * (x / y))) / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = z * (((x / z) / (a + 1.0)) + ((y / t) / (a + 1.0)));
} else if (t_2 <= -2e-294) {
tmp = t_1 / ((b * (y * (1.0 / t))) + (a + 1.0));
} else if (t_2 <= 0.0) {
tmp = (z / b) + ((t * (x / b)) / y);
} else if (t_2 <= 1e+308) {
tmp = t_2;
} else {
tmp = (z + (t * (x / y))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = t_1 / (((y * b) / t) + (a + 1.0)) tmp = 0 if t_2 <= -math.inf: tmp = z * (((x / z) / (a + 1.0)) + ((y / t) / (a + 1.0))) elif t_2 <= -2e-294: tmp = t_1 / ((b * (y * (1.0 / t))) + (a + 1.0)) elif t_2 <= 0.0: tmp = (z / b) + ((t * (x / b)) / y) elif t_2 <= 1e+308: tmp = t_2 else: tmp = (z + (t * (x / y))) / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(Float64(x / z) / Float64(a + 1.0)) + Float64(Float64(y / t) / Float64(a + 1.0)))); elseif (t_2 <= -2e-294) tmp = Float64(t_1 / Float64(Float64(b * Float64(y * Float64(1.0 / t))) + Float64(a + 1.0))); elseif (t_2 <= 0.0) tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)); elseif (t_2 <= 1e+308) tmp = t_2; else tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * z) / t); t_2 = t_1 / (((y * b) / t) + (a + 1.0)); tmp = 0.0; if (t_2 <= -Inf) tmp = z * (((x / z) / (a + 1.0)) + ((y / t) / (a + 1.0))); elseif (t_2 <= -2e-294) tmp = t_1 / ((b * (y * (1.0 / t))) + (a + 1.0)); elseif (t_2 <= 0.0) tmp = (z / b) + ((t * (x / b)) / y); elseif (t_2 <= 1e+308) tmp = t_2; else tmp = (z + (t * (x / y))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(N[(N[(x / z), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -2e-294], N[(t$95$1 / N[(N[(b * N[(y * N[(1.0 / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+308], t$95$2, N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{\frac{x}{z}}{a + 1} + \frac{\frac{y}{t}}{a + 1}\right)\\
\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-294}:\\
\;\;\;\;\frac{t\_1}{b \cdot \left(y \cdot \frac{1}{t}\right) + \left(a + 1\right)}\\
\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\mathbf{elif}\;t\_2 \leq 10^{+308}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 23.6%
associate-/l*62.1%
associate-/l*62.1%
Simplified62.1%
Taylor expanded in b around 0 16.3%
Taylor expanded in z around inf 54.2%
associate-/r*60.6%
associate-/r*67.0%
Simplified67.0%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -2.00000000000000003e-294Initial program 99.6%
associate-*r/94.4%
*-commutative94.4%
div-inv94.4%
associate-*l*99.7%
Applied egg-rr99.7%
if -2.00000000000000003e-294 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0Initial program 48.5%
associate-/l*48.4%
associate-/l*69.0%
Simplified69.0%
Taylor expanded in y around -inf 63.8%
+-commutative63.8%
associate-*r/63.8%
Simplified79.3%
Taylor expanded in x around inf 68.1%
associate-/l*83.3%
Simplified83.3%
if 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1e308Initial program 99.4%
if 1e308 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 14.0%
associate-/l*24.6%
associate-/l*39.2%
Simplified39.2%
Taylor expanded in y around -inf 44.1%
+-commutative44.1%
associate-*r/44.1%
Simplified41.2%
Taylor expanded in b around inf 75.0%
associate-/l*77.6%
Simplified77.6%
Final simplification91.1%
(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))
(* z (+ (/ (/ x z) (+ a 1.0)) (/ (/ y t) (+ a 1.0))))
(if (<= t_1 -2e-294)
t_1
(if (<= t_1 0.0)
(+ (/ z b) (/ (* t (/ x b)) y))
(if (<= t_1 1e+308) t_1 (/ (+ z (* t (/ x y))) 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 = z * (((x / z) / (a + 1.0)) + ((y / t) / (a + 1.0)));
} else if (t_1 <= -2e-294) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z / b) + ((t * (x / b)) / y);
} else if (t_1 <= 1e+308) {
tmp = t_1;
} else {
tmp = (z + (t * (x / y))) / 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 tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = z * (((x / z) / (a + 1.0)) + ((y / t) / (a + 1.0)));
} else if (t_1 <= -2e-294) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z / b) + ((t * (x / b)) / y);
} else if (t_1 <= 1e+308) {
tmp = t_1;
} else {
tmp = (z + (t * (x / y))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) tmp = 0 if t_1 <= -math.inf: tmp = z * (((x / z) / (a + 1.0)) + ((y / t) / (a + 1.0))) elif t_1 <= -2e-294: tmp = t_1 elif t_1 <= 0.0: tmp = (z / b) + ((t * (x / b)) / y) elif t_1 <= 1e+308: tmp = t_1 else: tmp = (z + (t * (x / y))) / 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(z * Float64(Float64(Float64(x / z) / Float64(a + 1.0)) + Float64(Float64(y / t) / Float64(a + 1.0)))); elseif (t_1 <= -2e-294) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)); elseif (t_1 <= 1e+308) tmp = t_1; else tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / 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)); tmp = 0.0; if (t_1 <= -Inf) tmp = z * (((x / z) / (a + 1.0)) + ((y / t) / (a + 1.0))); elseif (t_1 <= -2e-294) tmp = t_1; elseif (t_1 <= 0.0) tmp = (z / b) + ((t * (x / b)) / y); elseif (t_1 <= 1e+308) tmp = t_1; else tmp = (z + (t * (x / y))) / 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]}, If[LessEqual[t$95$1, (-Infinity)], N[(z * N[(N[(N[(x / z), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-294], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+308], t$95$1, N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / 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:\\
\;\;\;\;z \cdot \left(\frac{\frac{x}{z}}{a + 1} + \frac{\frac{y}{t}}{a + 1}\right)\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-294}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\mathbf{elif}\;t\_1 \leq 10^{+308}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 23.6%
associate-/l*62.1%
associate-/l*62.1%
Simplified62.1%
Taylor expanded in b around 0 16.3%
Taylor expanded in z around inf 54.2%
associate-/r*60.6%
associate-/r*67.0%
Simplified67.0%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -2.00000000000000003e-294 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1e308Initial program 99.5%
if -2.00000000000000003e-294 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 0.0Initial program 48.5%
associate-/l*48.4%
associate-/l*69.0%
Simplified69.0%
Taylor expanded in y around -inf 63.8%
+-commutative63.8%
associate-*r/63.8%
Simplified79.3%
Taylor expanded in x around inf 68.1%
associate-/l*83.3%
Simplified83.3%
if 1e308 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 14.0%
associate-/l*24.6%
associate-/l*39.2%
Simplified39.2%
Taylor expanded in y around -inf 44.1%
+-commutative44.1%
associate-*r/44.1%
Simplified41.2%
Taylor expanded in b around inf 75.0%
associate-/l*77.6%
Simplified77.6%
Final simplification91.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))) (t_2 (/ t_1 (+ (+ a 1.0) (* y (/ b t))))))
(if (<= t -1.05e-52)
t_2
(if (<= t -1.12e-176)
(/ (+ z (/ (* x t) y)) b)
(if (<= t -9e-226)
t_2
(if (<= t 3.2e-246)
(/ (+ z (* t (/ x y))) b)
(if (<= t 4.7e-163)
(/ (* y z) (* t (+ 1.0 (+ a (/ (* y b) t)))))
(if (<= t 2.1e-121)
(+ (/ z b) (/ (* t (/ x b)) y))
(/ t_1 (+ (+ a 1.0) (/ y (/ t b))))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double t_2 = t_1 / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -1.05e-52) {
tmp = t_2;
} else if (t <= -1.12e-176) {
tmp = (z + ((x * t) / y)) / b;
} else if (t <= -9e-226) {
tmp = t_2;
} else if (t <= 3.2e-246) {
tmp = (z + (t * (x / y))) / b;
} else if (t <= 4.7e-163) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (t <= 2.1e-121) {
tmp = (z / b) + ((t * (x / b)) / y);
} else {
tmp = t_1 / ((a + 1.0) + (y / (t / 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) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (y * (z / t))
t_2 = t_1 / ((a + 1.0d0) + (y * (b / t)))
if (t <= (-1.05d-52)) then
tmp = t_2
else if (t <= (-1.12d-176)) then
tmp = (z + ((x * t) / y)) / b
else if (t <= (-9d-226)) then
tmp = t_2
else if (t <= 3.2d-246) then
tmp = (z + (t * (x / y))) / b
else if (t <= 4.7d-163) then
tmp = (y * z) / (t * (1.0d0 + (a + ((y * b) / t))))
else if (t <= 2.1d-121) then
tmp = (z / b) + ((t * (x / b)) / y)
else
tmp = t_1 / ((a + 1.0d0) + (y / (t / b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double t_2 = t_1 / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -1.05e-52) {
tmp = t_2;
} else if (t <= -1.12e-176) {
tmp = (z + ((x * t) / y)) / b;
} else if (t <= -9e-226) {
tmp = t_2;
} else if (t <= 3.2e-246) {
tmp = (z + (t * (x / y))) / b;
} else if (t <= 4.7e-163) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (t <= 2.1e-121) {
tmp = (z / b) + ((t * (x / b)) / y);
} else {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * (z / t)) t_2 = t_1 / ((a + 1.0) + (y * (b / t))) tmp = 0 if t <= -1.05e-52: tmp = t_2 elif t <= -1.12e-176: tmp = (z + ((x * t) / y)) / b elif t <= -9e-226: tmp = t_2 elif t <= 3.2e-246: tmp = (z + (t * (x / y))) / b elif t <= 4.7e-163: tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))) elif t <= 2.1e-121: tmp = (z / b) + ((t * (x / b)) / y) else: tmp = t_1 / ((a + 1.0) + (y / (t / b))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * Float64(z / t))) t_2 = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))) tmp = 0.0 if (t <= -1.05e-52) tmp = t_2; elseif (t <= -1.12e-176) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (t <= -9e-226) tmp = t_2; elseif (t <= 3.2e-246) tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); elseif (t <= 4.7e-163) tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))))); elseif (t <= 2.1e-121) tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)); else tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * (z / t)); t_2 = t_1 / ((a + 1.0) + (y * (b / t))); tmp = 0.0; if (t <= -1.05e-52) tmp = t_2; elseif (t <= -1.12e-176) tmp = (z + ((x * t) / y)) / b; elseif (t <= -9e-226) tmp = t_2; elseif (t <= 3.2e-246) tmp = (z + (t * (x / y))) / b; elseif (t <= 4.7e-163) tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))); elseif (t <= 2.1e-121) tmp = (z / b) + ((t * (x / b)) / y); else tmp = t_1 / ((a + 1.0) + (y / (t / b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e-52], t$95$2, If[LessEqual[t, -1.12e-176], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t, -9e-226], t$95$2, If[LessEqual[t, 3.2e-246], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t, 4.7e-163], N[(N[(y * z), $MachinePrecision] / N[(t * N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e-121], N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
t_2 := \frac{t\_1}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{-52}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.12 \cdot 10^{-176}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-226}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-246}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{-163}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-121}:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\end{array}
\end{array}
if t < -1.0499999999999999e-52 or -1.11999999999999995e-176 < t < -9.00000000000000023e-226Initial program 71.8%
associate-/l*78.7%
associate-/l*91.4%
Simplified91.4%
if -1.0499999999999999e-52 < t < -1.11999999999999995e-176Initial program 61.0%
associate-/l*57.1%
associate-/l*53.1%
Simplified53.1%
Taylor expanded in y around -inf 70.6%
+-commutative70.6%
associate-*r/70.6%
Simplified70.6%
Taylor expanded in b around inf 83.5%
if -9.00000000000000023e-226 < t < 3.2000000000000001e-246Initial program 33.1%
associate-/l*25.7%
associate-/l*25.6%
Simplified25.6%
Taylor expanded in y around -inf 51.0%
+-commutative51.0%
associate-*r/51.0%
Simplified46.7%
Taylor expanded in b around inf 84.0%
associate-/l*87.9%
Simplified87.9%
if 3.2000000000000001e-246 < t < 4.7e-163Initial program 87.1%
associate-/l*80.5%
associate-/l*68.0%
Simplified68.0%
Taylor expanded in x around 0 80.7%
if 4.7e-163 < t < 2.0999999999999999e-121Initial program 46.1%
associate-/l*35.3%
associate-/l*14.0%
Simplified14.0%
Taylor expanded in y around -inf 67.1%
+-commutative67.1%
associate-*r/67.1%
Simplified67.1%
Taylor expanded in x around inf 78.2%
associate-/l*78.2%
Simplified78.2%
if 2.0999999999999999e-121 < t Initial program 85.9%
associate-/l*90.2%
associate-/l*95.4%
Simplified95.4%
clear-num95.4%
un-div-inv95.4%
Applied egg-rr95.4%
Final simplification90.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))))
(if (<= t -1.05e-52)
t_1
(if (<= t -2.6e-178)
(/ (+ z (/ (* x t) y)) b)
(if (<= t -9e-226)
t_1
(if (<= t 2.8e-246)
(/ (+ z (* t (/ x y))) b)
(if (<= t 2.65e-163)
(/ (* y z) (* t (+ 1.0 (+ a (/ (* y b) t)))))
(if (<= t 3.85e-121) (+ (/ z b) (/ (* t (/ x b)) y)) t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -1.05e-52) {
tmp = t_1;
} else if (t <= -2.6e-178) {
tmp = (z + ((x * t) / y)) / b;
} else if (t <= -9e-226) {
tmp = t_1;
} else if (t <= 2.8e-246) {
tmp = (z + (t * (x / y))) / b;
} else if (t <= 2.65e-163) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (t <= 3.85e-121) {
tmp = (z / b) + ((t * (x / b)) / 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 + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
if (t <= (-1.05d-52)) then
tmp = t_1
else if (t <= (-2.6d-178)) then
tmp = (z + ((x * t) / y)) / b
else if (t <= (-9d-226)) then
tmp = t_1
else if (t <= 2.8d-246) then
tmp = (z + (t * (x / y))) / b
else if (t <= 2.65d-163) then
tmp = (y * z) / (t * (1.0d0 + (a + ((y * b) / t))))
else if (t <= 3.85d-121) then
tmp = (z / b) + ((t * (x / b)) / 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 + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -1.05e-52) {
tmp = t_1;
} else if (t <= -2.6e-178) {
tmp = (z + ((x * t) / y)) / b;
} else if (t <= -9e-226) {
tmp = t_1;
} else if (t <= 2.8e-246) {
tmp = (z + (t * (x / y))) / b;
} else if (t <= 2.65e-163) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (t <= 3.85e-121) {
tmp = (z / b) + ((t * (x / b)) / y);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) tmp = 0 if t <= -1.05e-52: tmp = t_1 elif t <= -2.6e-178: tmp = (z + ((x * t) / y)) / b elif t <= -9e-226: tmp = t_1 elif t <= 2.8e-246: tmp = (z + (t * (x / y))) / b elif t <= 2.65e-163: tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))) elif t <= 3.85e-121: tmp = (z / b) + ((t * (x / b)) / y) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))) tmp = 0.0 if (t <= -1.05e-52) tmp = t_1; elseif (t <= -2.6e-178) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (t <= -9e-226) tmp = t_1; elseif (t <= 2.8e-246) tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); elseif (t <= 2.65e-163) tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))))); elseif (t <= 3.85e-121) tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); tmp = 0.0; if (t <= -1.05e-52) tmp = t_1; elseif (t <= -2.6e-178) tmp = (z + ((x * t) / y)) / b; elseif (t <= -9e-226) tmp = t_1; elseif (t <= 2.8e-246) tmp = (z + (t * (x / y))) / b; elseif (t <= 2.65e-163) tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))); elseif (t <= 3.85e-121) tmp = (z / b) + ((t * (x / b)) / y); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e-52], t$95$1, If[LessEqual[t, -2.6e-178], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t, -9e-226], t$95$1, If[LessEqual[t, 2.8e-246], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t, 2.65e-163], N[(N[(y * z), $MachinePrecision] / N[(t * N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.85e-121], N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{if}\;t \leq -1.05 \cdot 10^{-52}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{-178}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-226}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-246}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{elif}\;t \leq 2.65 \cdot 10^{-163}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\
\mathbf{elif}\;t \leq 3.85 \cdot 10^{-121}:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.0499999999999999e-52 or -2.59999999999999998e-178 < t < -9.00000000000000023e-226 or 3.85000000000000005e-121 < t Initial program 78.8%
associate-/l*84.5%
associate-/l*93.4%
Simplified93.4%
if -1.0499999999999999e-52 < t < -2.59999999999999998e-178Initial program 61.0%
associate-/l*57.1%
associate-/l*53.1%
Simplified53.1%
Taylor expanded in y around -inf 70.6%
+-commutative70.6%
associate-*r/70.6%
Simplified70.6%
Taylor expanded in b around inf 83.5%
if -9.00000000000000023e-226 < t < 2.7999999999999999e-246Initial program 33.1%
associate-/l*25.7%
associate-/l*25.6%
Simplified25.6%
Taylor expanded in y around -inf 51.0%
+-commutative51.0%
associate-*r/51.0%
Simplified46.7%
Taylor expanded in b around inf 84.0%
associate-/l*87.9%
Simplified87.9%
if 2.7999999999999999e-246 < t < 2.65000000000000008e-163Initial program 87.1%
associate-/l*80.5%
associate-/l*68.0%
Simplified68.0%
Taylor expanded in x around 0 80.7%
if 2.65000000000000008e-163 < t < 3.85000000000000005e-121Initial program 46.1%
associate-/l*35.3%
associate-/l*14.0%
Simplified14.0%
Taylor expanded in y around -inf 67.1%
+-commutative67.1%
associate-*r/67.1%
Simplified67.1%
Taylor expanded in x around inf 78.2%
associate-/l*78.2%
Simplified78.2%
Final simplification90.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -1.75e+164)
t_1
(if (<= t -1.4e+68)
(/ x (+ 1.0 (* y (/ b t))))
(if (<= t -7e-68)
t_1
(if (<= t -1.5e-139)
(* t (/ (/ x b) y))
(if (<= t 2.55e-17)
(/ z b)
(if (or (<= t 1.55e+131) (not (<= t 3.8e+156)))
t_1
(/ (* y (/ z t)) (+ a 1.0))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -1.75e+164) {
tmp = t_1;
} else if (t <= -1.4e+68) {
tmp = x / (1.0 + (y * (b / t)));
} else if (t <= -7e-68) {
tmp = t_1;
} else if (t <= -1.5e-139) {
tmp = t * ((x / b) / y);
} else if (t <= 2.55e-17) {
tmp = z / b;
} else if ((t <= 1.55e+131) || !(t <= 3.8e+156)) {
tmp = t_1;
} else {
tmp = (y * (z / 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) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-1.75d+164)) then
tmp = t_1
else if (t <= (-1.4d+68)) then
tmp = x / (1.0d0 + (y * (b / t)))
else if (t <= (-7d-68)) then
tmp = t_1
else if (t <= (-1.5d-139)) then
tmp = t * ((x / b) / y)
else if (t <= 2.55d-17) then
tmp = z / b
else if ((t <= 1.55d+131) .or. (.not. (t <= 3.8d+156))) then
tmp = t_1
else
tmp = (y * (z / 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 t_1 = x / (a + 1.0);
double tmp;
if (t <= -1.75e+164) {
tmp = t_1;
} else if (t <= -1.4e+68) {
tmp = x / (1.0 + (y * (b / t)));
} else if (t <= -7e-68) {
tmp = t_1;
} else if (t <= -1.5e-139) {
tmp = t * ((x / b) / y);
} else if (t <= 2.55e-17) {
tmp = z / b;
} else if ((t <= 1.55e+131) || !(t <= 3.8e+156)) {
tmp = t_1;
} else {
tmp = (y * (z / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -1.75e+164: tmp = t_1 elif t <= -1.4e+68: tmp = x / (1.0 + (y * (b / t))) elif t <= -7e-68: tmp = t_1 elif t <= -1.5e-139: tmp = t * ((x / b) / y) elif t <= 2.55e-17: tmp = z / b elif (t <= 1.55e+131) or not (t <= 3.8e+156): tmp = t_1 else: tmp = (y * (z / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.75e+164) tmp = t_1; elseif (t <= -1.4e+68) tmp = Float64(x / Float64(1.0 + Float64(y * Float64(b / t)))); elseif (t <= -7e-68) tmp = t_1; elseif (t <= -1.5e-139) tmp = Float64(t * Float64(Float64(x / b) / y)); elseif (t <= 2.55e-17) tmp = Float64(z / b); elseif ((t <= 1.55e+131) || !(t <= 3.8e+156)) tmp = t_1; else tmp = Float64(Float64(y * Float64(z / t)) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -1.75e+164) tmp = t_1; elseif (t <= -1.4e+68) tmp = x / (1.0 + (y * (b / t))); elseif (t <= -7e-68) tmp = t_1; elseif (t <= -1.5e-139) tmp = t * ((x / b) / y); elseif (t <= 2.55e-17) tmp = z / b; elseif ((t <= 1.55e+131) || ~((t <= 3.8e+156))) tmp = t_1; else tmp = (y * (z / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.75e+164], t$95$1, If[LessEqual[t, -1.4e+68], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7e-68], t$95$1, If[LessEqual[t, -1.5e-139], N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.55e-17], N[(z / b), $MachinePrecision], If[Or[LessEqual[t, 1.55e+131], N[Not[LessEqual[t, 3.8e+156]], $MachinePrecision]], t$95$1, N[(N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -1.75 \cdot 10^{+164}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.4 \cdot 10^{+68}:\\
\;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t \leq -7 \cdot 10^{-68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.5 \cdot 10^{-139}:\\
\;\;\;\;t \cdot \frac{\frac{x}{b}}{y}\\
\mathbf{elif}\;t \leq 2.55 \cdot 10^{-17}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{+131} \lor \neg \left(t \leq 3.8 \cdot 10^{+156}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot \frac{z}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -1.7499999999999999e164 or -1.4e68 < t < -7.00000000000000026e-68 or 2.5500000000000001e-17 < t < 1.55000000000000008e131 or 3.80000000000000024e156 < t Initial program 80.9%
associate-/l*87.3%
associate-/l*95.1%
Simplified95.1%
Taylor expanded in y around 0 58.3%
if -1.7499999999999999e164 < t < -1.4e68Initial program 60.0%
associate-/l*64.7%
associate-/l*90.8%
Simplified90.8%
Taylor expanded in x around inf 34.4%
associate-+r+34.4%
associate-*r/51.8%
Simplified51.8%
Taylor expanded in a around 0 34.9%
*-commutative34.9%
associate-/l*52.3%
Simplified52.3%
if -7.00000000000000026e-68 < t < -1.5e-139Initial program 75.9%
associate-/l*75.9%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in x around inf 63.4%
associate-+r+63.4%
associate-*r/63.6%
Simplified63.6%
Taylor expanded in b around inf 75.3%
associate-/l*75.5%
associate-/r*81.6%
Simplified81.6%
if -1.5e-139 < t < 2.5500000000000001e-17Initial program 60.5%
associate-/l*56.4%
associate-/l*50.9%
Simplified50.9%
Taylor expanded in y around inf 55.9%
if 1.55000000000000008e131 < t < 3.80000000000000024e156Initial program 78.1%
associate-/l*78.3%
associate-/l*88.8%
Simplified88.8%
Taylor expanded in b around 0 75.5%
Taylor expanded in x around 0 66.4%
associate-/r*77.0%
associate-/l*76.4%
Simplified76.4%
Final simplification59.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* z (/ y t))) a)))
(if (<= a -3.8e+124)
t_1
(if (<= a -4.4e-93)
(/ (+ z (* t (/ x y))) b)
(if (<= a -5e-236)
(/ x (+ 1.0 (* y (/ b t))))
(if (<= a 4.6e-248)
(/ (+ z (* x (/ t y))) b)
(if (<= a 4.1e-45)
(+ x (/ (* y z) t))
(if (<= a 6.4e+17) (+ (/ z b) (/ (* t (/ x b)) y)) 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 <= -3.8e+124) {
tmp = t_1;
} else if (a <= -4.4e-93) {
tmp = (z + (t * (x / y))) / b;
} else if (a <= -5e-236) {
tmp = x / (1.0 + (y * (b / t)));
} else if (a <= 4.6e-248) {
tmp = (z + (x * (t / y))) / b;
} else if (a <= 4.1e-45) {
tmp = x + ((y * z) / t);
} else if (a <= 6.4e+17) {
tmp = (z / b) + ((t * (x / b)) / 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 + (z * (y / t))) / a
if (a <= (-3.8d+124)) then
tmp = t_1
else if (a <= (-4.4d-93)) then
tmp = (z + (t * (x / y))) / b
else if (a <= (-5d-236)) then
tmp = x / (1.0d0 + (y * (b / t)))
else if (a <= 4.6d-248) then
tmp = (z + (x * (t / y))) / b
else if (a <= 4.1d-45) then
tmp = x + ((y * z) / t)
else if (a <= 6.4d+17) then
tmp = (z / b) + ((t * (x / b)) / 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 + (z * (y / t))) / a;
double tmp;
if (a <= -3.8e+124) {
tmp = t_1;
} else if (a <= -4.4e-93) {
tmp = (z + (t * (x / y))) / b;
} else if (a <= -5e-236) {
tmp = x / (1.0 + (y * (b / t)));
} else if (a <= 4.6e-248) {
tmp = (z + (x * (t / y))) / b;
} else if (a <= 4.1e-45) {
tmp = x + ((y * z) / t);
} else if (a <= 6.4e+17) {
tmp = (z / b) + ((t * (x / b)) / y);
} 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 <= -3.8e+124: tmp = t_1 elif a <= -4.4e-93: tmp = (z + (t * (x / y))) / b elif a <= -5e-236: tmp = x / (1.0 + (y * (b / t))) elif a <= 4.6e-248: tmp = (z + (x * (t / y))) / b elif a <= 4.1e-45: tmp = x + ((y * z) / t) elif a <= 6.4e+17: tmp = (z / b) + ((t * (x / b)) / y) 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 (a <= -3.8e+124) tmp = t_1; elseif (a <= -4.4e-93) tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); elseif (a <= -5e-236) tmp = Float64(x / Float64(1.0 + Float64(y * Float64(b / t)))); elseif (a <= 4.6e-248) tmp = Float64(Float64(z + Float64(x * Float64(t / y))) / b); elseif (a <= 4.1e-45) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (a <= 6.4e+17) tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)); 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 <= -3.8e+124) tmp = t_1; elseif (a <= -4.4e-93) tmp = (z + (t * (x / y))) / b; elseif (a <= -5e-236) tmp = x / (1.0 + (y * (b / t))); elseif (a <= 4.6e-248) tmp = (z + (x * (t / y))) / b; elseif (a <= 4.1e-45) tmp = x + ((y * z) / t); elseif (a <= 6.4e+17) tmp = (z / b) + ((t * (x / b)) / y); 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[a, -3.8e+124], t$95$1, If[LessEqual[a, -4.4e-93], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[a, -5e-236], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.6e-248], N[(N[(z + N[(x * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[a, 4.1e-45], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.4e+17], N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + z \cdot \frac{y}{t}}{a}\\
\mathbf{if}\;a \leq -3.8 \cdot 10^{+124}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -4.4 \cdot 10^{-93}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{elif}\;a \leq -5 \cdot 10^{-236}:\\
\;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;a \leq 4.6 \cdot 10^{-248}:\\
\;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\
\mathbf{elif}\;a \leq 4.1 \cdot 10^{-45}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq 6.4 \cdot 10^{+17}:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.7999999999999998e124 or 6.4e17 < a Initial program 73.0%
associate-/l*76.1%
associate-/l*80.9%
Simplified80.9%
Taylor expanded in a around inf 66.1%
*-commutative66.1%
associate-/l*73.1%
Applied egg-rr73.1%
if -3.7999999999999998e124 < a < -4.39999999999999991e-93Initial program 61.8%
associate-/l*62.7%
associate-/l*62.7%
Simplified62.7%
Taylor expanded in y around -inf 47.9%
+-commutative47.9%
associate-*r/47.9%
Simplified49.9%
Taylor expanded in b around inf 56.5%
associate-/l*56.5%
Simplified56.5%
if -4.39999999999999991e-93 < a < -4.9999999999999998e-236Initial program 82.7%
associate-/l*82.7%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in x around inf 63.6%
associate-+r+63.6%
associate-*r/70.4%
Simplified70.4%
Taylor expanded in a around 0 63.6%
*-commutative63.6%
associate-/l*70.4%
Simplified70.4%
if -4.9999999999999998e-236 < a < 4.6e-248Initial program 58.1%
associate-/l*61.5%
associate-/l*75.2%
Simplified75.2%
Taylor expanded in y around -inf 57.9%
+-commutative57.9%
associate-*r/57.9%
Simplified61.3%
Taylor expanded in b around inf 65.1%
associate-/l*68.5%
Applied egg-rr68.5%
associate-*r/65.1%
*-commutative65.1%
associate-*r/75.3%
Simplified75.3%
if 4.6e-248 < a < 4.0999999999999999e-45Initial program 85.3%
associate-/l*87.7%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in b around 0 66.3%
Taylor expanded in a around 0 66.3%
if 4.0999999999999999e-45 < a < 6.4e17Initial program 67.6%
associate-/l*67.6%
associate-/l*67.8%
Simplified67.8%
Taylor expanded in y around -inf 79.3%
+-commutative79.3%
associate-*r/79.3%
Simplified79.5%
Taylor expanded in x around inf 78.6%
associate-/l*78.8%
Simplified78.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -2.3e+163)
t_1
(if (<= t -5.9e+66)
(/ x (+ 1.0 (* y (/ b t))))
(if (<= t -3.25e-65)
t_1
(if (<= t -1.5e-139)
(* t (/ (/ x b) y))
(if (or (<= t 3.6e-105) (and (not (<= t 5.6e-73)) (<= t 5.2e-18)))
(/ 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 <= -2.3e+163) {
tmp = t_1;
} else if (t <= -5.9e+66) {
tmp = x / (1.0 + (y * (b / t)));
} else if (t <= -3.25e-65) {
tmp = t_1;
} else if (t <= -1.5e-139) {
tmp = t * ((x / b) / y);
} else if ((t <= 3.6e-105) || (!(t <= 5.6e-73) && (t <= 5.2e-18))) {
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 <= (-2.3d+163)) then
tmp = t_1
else if (t <= (-5.9d+66)) then
tmp = x / (1.0d0 + (y * (b / t)))
else if (t <= (-3.25d-65)) then
tmp = t_1
else if (t <= (-1.5d-139)) then
tmp = t * ((x / b) / y)
else if ((t <= 3.6d-105) .or. (.not. (t <= 5.6d-73)) .and. (t <= 5.2d-18)) 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 <= -2.3e+163) {
tmp = t_1;
} else if (t <= -5.9e+66) {
tmp = x / (1.0 + (y * (b / t)));
} else if (t <= -3.25e-65) {
tmp = t_1;
} else if (t <= -1.5e-139) {
tmp = t * ((x / b) / y);
} else if ((t <= 3.6e-105) || (!(t <= 5.6e-73) && (t <= 5.2e-18))) {
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 <= -2.3e+163: tmp = t_1 elif t <= -5.9e+66: tmp = x / (1.0 + (y * (b / t))) elif t <= -3.25e-65: tmp = t_1 elif t <= -1.5e-139: tmp = t * ((x / b) / y) elif (t <= 3.6e-105) or (not (t <= 5.6e-73) and (t <= 5.2e-18)): 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 <= -2.3e+163) tmp = t_1; elseif (t <= -5.9e+66) tmp = Float64(x / Float64(1.0 + Float64(y * Float64(b / t)))); elseif (t <= -3.25e-65) tmp = t_1; elseif (t <= -1.5e-139) tmp = Float64(t * Float64(Float64(x / b) / y)); elseif ((t <= 3.6e-105) || (!(t <= 5.6e-73) && (t <= 5.2e-18))) 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 <= -2.3e+163) tmp = t_1; elseif (t <= -5.9e+66) tmp = x / (1.0 + (y * (b / t))); elseif (t <= -3.25e-65) tmp = t_1; elseif (t <= -1.5e-139) tmp = t * ((x / b) / y); elseif ((t <= 3.6e-105) || (~((t <= 5.6e-73)) && (t <= 5.2e-18))) 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, -2.3e+163], t$95$1, If[LessEqual[t, -5.9e+66], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.25e-65], t$95$1, If[LessEqual[t, -1.5e-139], N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 3.6e-105], And[N[Not[LessEqual[t, 5.6e-73]], $MachinePrecision], LessEqual[t, 5.2e-18]]], N[(z / b), $MachinePrecision], t$95$1]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -2.3 \cdot 10^{+163}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -5.9 \cdot 10^{+66}:\\
\;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t \leq -3.25 \cdot 10^{-65}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.5 \cdot 10^{-139}:\\
\;\;\;\;t \cdot \frac{\frac{x}{b}}{y}\\
\mathbf{elif}\;t \leq 3.6 \cdot 10^{-105} \lor \neg \left(t \leq 5.6 \cdot 10^{-73}\right) \land t \leq 5.2 \cdot 10^{-18}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -2.30000000000000002e163 or -5.89999999999999988e66 < t < -3.25e-65 or 3.59999999999999964e-105 < t < 5.60000000000000023e-73 or 5.2000000000000001e-18 < t Initial program 81.4%
associate-/l*87.2%
associate-/l*94.8%
Simplified94.8%
Taylor expanded in y around 0 56.9%
if -2.30000000000000002e163 < t < -5.89999999999999988e66Initial program 60.0%
associate-/l*64.7%
associate-/l*90.8%
Simplified90.8%
Taylor expanded in x around inf 34.4%
associate-+r+34.4%
associate-*r/51.8%
Simplified51.8%
Taylor expanded in a around 0 34.9%
*-commutative34.9%
associate-/l*52.3%
Simplified52.3%
if -3.25e-65 < t < -1.5e-139Initial program 75.9%
associate-/l*75.9%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in x around inf 63.4%
associate-+r+63.4%
associate-*r/63.6%
Simplified63.6%
Taylor expanded in b around inf 75.3%
associate-/l*75.5%
associate-/r*81.6%
Simplified81.6%
if -1.5e-139 < t < 3.59999999999999964e-105 or 5.60000000000000023e-73 < t < 5.2000000000000001e-18Initial program 58.1%
associate-/l*53.8%
associate-/l*47.9%
Simplified47.9%
Taylor expanded in y around inf 59.1%
Final simplification58.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* z (/ y t))) a)))
(if (<= a -1.85e+124)
t_1
(if (<= a -1.2e-92)
(/ (+ z (* t (/ x y))) b)
(if (<= a -2.35e-229)
(/ x (+ 1.0 (* y (/ b t))))
(if (<= a 6e-243)
(/ (+ z (* x (/ t y))) b)
(if (<= a 1.9e-46)
(+ x (/ (* y z) t))
(if (<= a 40000000000000.0) (/ (+ z (/ (* x t) y)) b) t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z * (y / t))) / a;
double tmp;
if (a <= -1.85e+124) {
tmp = t_1;
} else if (a <= -1.2e-92) {
tmp = (z + (t * (x / y))) / b;
} else if (a <= -2.35e-229) {
tmp = x / (1.0 + (y * (b / t)));
} else if (a <= 6e-243) {
tmp = (z + (x * (t / y))) / b;
} else if (a <= 1.9e-46) {
tmp = x + ((y * z) / t);
} else if (a <= 40000000000000.0) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (z * (y / t))) / a
if (a <= (-1.85d+124)) then
tmp = t_1
else if (a <= (-1.2d-92)) then
tmp = (z + (t * (x / y))) / b
else if (a <= (-2.35d-229)) then
tmp = x / (1.0d0 + (y * (b / t)))
else if (a <= 6d-243) then
tmp = (z + (x * (t / y))) / b
else if (a <= 1.9d-46) then
tmp = x + ((y * z) / t)
else if (a <= 40000000000000.0d0) then
tmp = (z + ((x * t) / y)) / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z * (y / t))) / a;
double tmp;
if (a <= -1.85e+124) {
tmp = t_1;
} else if (a <= -1.2e-92) {
tmp = (z + (t * (x / y))) / b;
} else if (a <= -2.35e-229) {
tmp = x / (1.0 + (y * (b / t)));
} else if (a <= 6e-243) {
tmp = (z + (x * (t / y))) / b;
} else if (a <= 1.9e-46) {
tmp = x + ((y * z) / t);
} else if (a <= 40000000000000.0) {
tmp = (z + ((x * t) / y)) / b;
} 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.85e+124: tmp = t_1 elif a <= -1.2e-92: tmp = (z + (t * (x / y))) / b elif a <= -2.35e-229: tmp = x / (1.0 + (y * (b / t))) elif a <= 6e-243: tmp = (z + (x * (t / y))) / b elif a <= 1.9e-46: tmp = x + ((y * z) / t) elif a <= 40000000000000.0: tmp = (z + ((x * t) / y)) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(z * Float64(y / t))) / a) tmp = 0.0 if (a <= -1.85e+124) tmp = t_1; elseif (a <= -1.2e-92) tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); elseif (a <= -2.35e-229) tmp = Float64(x / Float64(1.0 + Float64(y * Float64(b / t)))); elseif (a <= 6e-243) tmp = Float64(Float64(z + Float64(x * Float64(t / y))) / b); elseif (a <= 1.9e-46) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (a <= 40000000000000.0) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (z * (y / t))) / a; tmp = 0.0; if (a <= -1.85e+124) tmp = t_1; elseif (a <= -1.2e-92) tmp = (z + (t * (x / y))) / b; elseif (a <= -2.35e-229) tmp = x / (1.0 + (y * (b / t))); elseif (a <= 6e-243) tmp = (z + (x * (t / y))) / b; elseif (a <= 1.9e-46) tmp = x + ((y * z) / t); elseif (a <= 40000000000000.0) tmp = (z + ((x * t) / y)) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -1.85e+124], t$95$1, If[LessEqual[a, -1.2e-92], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[a, -2.35e-229], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6e-243], N[(N[(z + N[(x * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[a, 1.9e-46], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 40000000000000.0], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + z \cdot \frac{y}{t}}{a}\\
\mathbf{if}\;a \leq -1.85 \cdot 10^{+124}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -1.2 \cdot 10^{-92}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{elif}\;a \leq -2.35 \cdot 10^{-229}:\\
\;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;a \leq 6 \cdot 10^{-243}:\\
\;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\
\mathbf{elif}\;a \leq 1.9 \cdot 10^{-46}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq 40000000000000:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.85000000000000004e124 or 4e13 < a Initial program 73.0%
associate-/l*76.1%
associate-/l*80.9%
Simplified80.9%
Taylor expanded in a around inf 66.1%
*-commutative66.1%
associate-/l*73.1%
Applied egg-rr73.1%
if -1.85000000000000004e124 < a < -1.2000000000000001e-92Initial program 61.8%
associate-/l*62.7%
associate-/l*62.7%
Simplified62.7%
Taylor expanded in y around -inf 47.9%
+-commutative47.9%
associate-*r/47.9%
Simplified49.9%
Taylor expanded in b around inf 56.5%
associate-/l*56.5%
Simplified56.5%
if -1.2000000000000001e-92 < a < -2.35000000000000017e-229Initial program 82.7%
associate-/l*82.7%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in x around inf 63.6%
associate-+r+63.6%
associate-*r/70.4%
Simplified70.4%
Taylor expanded in a around 0 63.6%
*-commutative63.6%
associate-/l*70.4%
Simplified70.4%
if -2.35000000000000017e-229 < a < 6.0000000000000002e-243Initial program 58.1%
associate-/l*61.5%
associate-/l*75.2%
Simplified75.2%
Taylor expanded in y around -inf 57.9%
+-commutative57.9%
associate-*r/57.9%
Simplified61.3%
Taylor expanded in b around inf 65.1%
associate-/l*68.5%
Applied egg-rr68.5%
associate-*r/65.1%
*-commutative65.1%
associate-*r/75.3%
Simplified75.3%
if 6.0000000000000002e-243 < a < 1.8999999999999998e-46Initial program 85.3%
associate-/l*87.7%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in b around 0 66.3%
Taylor expanded in a around 0 66.3%
if 1.8999999999999998e-46 < a < 4e13Initial program 67.6%
associate-/l*67.6%
associate-/l*67.8%
Simplified67.8%
Taylor expanded in y around -inf 79.3%
+-commutative79.3%
associate-*r/79.3%
Simplified79.5%
Taylor expanded in b around inf 78.6%
Final simplification69.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (* x (/ t y))) b)) (t_2 (/ (+ x (* z (/ y t))) a)))
(if (<= a -1.85e+124)
t_2
(if (<= a -6.7e-96)
(/ (+ z (* t (/ x y))) b)
(if (<= a -2.05e-236)
(/ x (+ 1.0 (* y (/ b t))))
(if (<= a 2.2e-238)
t_1
(if (<= a 5.7e-46)
(+ x (/ (* y z) t))
(if (<= a 9.6e+17) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (x * (t / y))) / b;
double t_2 = (x + (z * (y / t))) / a;
double tmp;
if (a <= -1.85e+124) {
tmp = t_2;
} else if (a <= -6.7e-96) {
tmp = (z + (t * (x / y))) / b;
} else if (a <= -2.05e-236) {
tmp = x / (1.0 + (y * (b / t)));
} else if (a <= 2.2e-238) {
tmp = t_1;
} else if (a <= 5.7e-46) {
tmp = x + ((y * z) / t);
} else if (a <= 9.6e+17) {
tmp = t_1;
} else {
tmp = t_2;
}
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 = (z + (x * (t / y))) / b
t_2 = (x + (z * (y / t))) / a
if (a <= (-1.85d+124)) then
tmp = t_2
else if (a <= (-6.7d-96)) then
tmp = (z + (t * (x / y))) / b
else if (a <= (-2.05d-236)) then
tmp = x / (1.0d0 + (y * (b / t)))
else if (a <= 2.2d-238) then
tmp = t_1
else if (a <= 5.7d-46) then
tmp = x + ((y * z) / t)
else if (a <= 9.6d+17) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (x * (t / y))) / b;
double t_2 = (x + (z * (y / t))) / a;
double tmp;
if (a <= -1.85e+124) {
tmp = t_2;
} else if (a <= -6.7e-96) {
tmp = (z + (t * (x / y))) / b;
} else if (a <= -2.05e-236) {
tmp = x / (1.0 + (y * (b / t)));
} else if (a <= 2.2e-238) {
tmp = t_1;
} else if (a <= 5.7e-46) {
tmp = x + ((y * z) / t);
} else if (a <= 9.6e+17) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (x * (t / y))) / b t_2 = (x + (z * (y / t))) / a tmp = 0 if a <= -1.85e+124: tmp = t_2 elif a <= -6.7e-96: tmp = (z + (t * (x / y))) / b elif a <= -2.05e-236: tmp = x / (1.0 + (y * (b / t))) elif a <= 2.2e-238: tmp = t_1 elif a <= 5.7e-46: tmp = x + ((y * z) / t) elif a <= 9.6e+17: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(x * Float64(t / y))) / b) t_2 = Float64(Float64(x + Float64(z * Float64(y / t))) / a) tmp = 0.0 if (a <= -1.85e+124) tmp = t_2; elseif (a <= -6.7e-96) tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); elseif (a <= -2.05e-236) tmp = Float64(x / Float64(1.0 + Float64(y * Float64(b / t)))); elseif (a <= 2.2e-238) tmp = t_1; elseif (a <= 5.7e-46) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (a <= 9.6e+17) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + (x * (t / y))) / b; t_2 = (x + (z * (y / t))) / a; tmp = 0.0; if (a <= -1.85e+124) tmp = t_2; elseif (a <= -6.7e-96) tmp = (z + (t * (x / y))) / b; elseif (a <= -2.05e-236) tmp = x / (1.0 + (y * (b / t))); elseif (a <= 2.2e-238) tmp = t_1; elseif (a <= 5.7e-46) tmp = x + ((y * z) / t); elseif (a <= 9.6e+17) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(x * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -1.85e+124], t$95$2, If[LessEqual[a, -6.7e-96], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[a, -2.05e-236], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.2e-238], t$95$1, If[LessEqual[a, 5.7e-46], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.6e+17], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z + x \cdot \frac{t}{y}}{b}\\
t_2 := \frac{x + z \cdot \frac{y}{t}}{a}\\
\mathbf{if}\;a \leq -1.85 \cdot 10^{+124}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -6.7 \cdot 10^{-96}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{elif}\;a \leq -2.05 \cdot 10^{-236}:\\
\;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{-238}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 5.7 \cdot 10^{-46}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq 9.6 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.85000000000000004e124 or 9.6e17 < a Initial program 73.0%
associate-/l*76.1%
associate-/l*80.9%
Simplified80.9%
Taylor expanded in a around inf 66.1%
*-commutative66.1%
associate-/l*73.1%
Applied egg-rr73.1%
if -1.85000000000000004e124 < a < -6.7000000000000004e-96Initial program 61.8%
associate-/l*62.7%
associate-/l*62.7%
Simplified62.7%
Taylor expanded in y around -inf 47.9%
+-commutative47.9%
associate-*r/47.9%
Simplified49.9%
Taylor expanded in b around inf 56.5%
associate-/l*56.5%
Simplified56.5%
if -6.7000000000000004e-96 < a < -2.0500000000000002e-236Initial program 82.7%
associate-/l*82.7%
associate-/l*89.5%
Simplified89.5%
Taylor expanded in x around inf 63.6%
associate-+r+63.6%
associate-*r/70.4%
Simplified70.4%
Taylor expanded in a around 0 63.6%
*-commutative63.6%
associate-/l*70.4%
Simplified70.4%
if -2.0500000000000002e-236 < a < 2.19999999999999991e-238 or 5.7000000000000003e-46 < a < 9.6e17Initial program 61.3%
associate-/l*63.5%
associate-/l*72.7%
Simplified72.7%
Taylor expanded in y around -inf 65.1%
+-commutative65.1%
associate-*r/65.1%
Simplified67.4%
Taylor expanded in b around inf 69.6%
associate-/l*67.4%
Applied egg-rr67.4%
associate-*r/69.6%
*-commutative69.6%
associate-*r/76.4%
Simplified76.4%
if 2.19999999999999991e-238 < a < 5.7000000000000003e-46Initial program 85.3%
associate-/l*87.7%
associate-/l*90.1%
Simplified90.1%
Taylor expanded in b around 0 66.3%
Taylor expanded in a around 0 66.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (* t (/ x y))) b))
(t_2 (/ (+ x (* z (/ y t))) a))
(t_3 (/ x (+ 1.0 (* y (/ b t))))))
(if (<= a -1.85e+124)
t_2
(if (<= a -4e-100)
t_1
(if (<= a -8.8e-237)
t_3
(if (<= a -5.8e-292) t_1 (if (<= a 39000000000000.0) t_3 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (t * (x / y))) / b;
double t_2 = (x + (z * (y / t))) / a;
double t_3 = x / (1.0 + (y * (b / t)));
double tmp;
if (a <= -1.85e+124) {
tmp = t_2;
} else if (a <= -4e-100) {
tmp = t_1;
} else if (a <= -8.8e-237) {
tmp = t_3;
} else if (a <= -5.8e-292) {
tmp = t_1;
} else if (a <= 39000000000000.0) {
tmp = t_3;
} else {
tmp = t_2;
}
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) :: t_3
real(8) :: tmp
t_1 = (z + (t * (x / y))) / b
t_2 = (x + (z * (y / t))) / a
t_3 = x / (1.0d0 + (y * (b / t)))
if (a <= (-1.85d+124)) then
tmp = t_2
else if (a <= (-4d-100)) then
tmp = t_1
else if (a <= (-8.8d-237)) then
tmp = t_3
else if (a <= (-5.8d-292)) then
tmp = t_1
else if (a <= 39000000000000.0d0) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (t * (x / y))) / b;
double t_2 = (x + (z * (y / t))) / a;
double t_3 = x / (1.0 + (y * (b / t)));
double tmp;
if (a <= -1.85e+124) {
tmp = t_2;
} else if (a <= -4e-100) {
tmp = t_1;
} else if (a <= -8.8e-237) {
tmp = t_3;
} else if (a <= -5.8e-292) {
tmp = t_1;
} else if (a <= 39000000000000.0) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (t * (x / y))) / b t_2 = (x + (z * (y / t))) / a t_3 = x / (1.0 + (y * (b / t))) tmp = 0 if a <= -1.85e+124: tmp = t_2 elif a <= -4e-100: tmp = t_1 elif a <= -8.8e-237: tmp = t_3 elif a <= -5.8e-292: tmp = t_1 elif a <= 39000000000000.0: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(t * Float64(x / y))) / b) t_2 = Float64(Float64(x + Float64(z * Float64(y / t))) / a) t_3 = Float64(x / Float64(1.0 + Float64(y * Float64(b / t)))) tmp = 0.0 if (a <= -1.85e+124) tmp = t_2; elseif (a <= -4e-100) tmp = t_1; elseif (a <= -8.8e-237) tmp = t_3; elseif (a <= -5.8e-292) tmp = t_1; elseif (a <= 39000000000000.0) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + (t * (x / y))) / b; t_2 = (x + (z * (y / t))) / a; t_3 = x / (1.0 + (y * (b / t))); tmp = 0.0; if (a <= -1.85e+124) tmp = t_2; elseif (a <= -4e-100) tmp = t_1; elseif (a <= -8.8e-237) tmp = t_3; elseif (a <= -5.8e-292) tmp = t_1; elseif (a <= 39000000000000.0) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, Block[{t$95$3 = N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.85e+124], t$95$2, If[LessEqual[a, -4e-100], t$95$1, If[LessEqual[a, -8.8e-237], t$95$3, If[LessEqual[a, -5.8e-292], t$95$1, If[LessEqual[a, 39000000000000.0], t$95$3, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z + t \cdot \frac{x}{y}}{b}\\
t_2 := \frac{x + z \cdot \frac{y}{t}}{a}\\
t_3 := \frac{x}{1 + y \cdot \frac{b}{t}}\\
\mathbf{if}\;a \leq -1.85 \cdot 10^{+124}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -4 \cdot 10^{-100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -8.8 \cdot 10^{-237}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq -5.8 \cdot 10^{-292}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 39000000000000:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.85000000000000004e124 or 3.9e13 < a Initial program 73.0%
associate-/l*76.1%
associate-/l*80.9%
Simplified80.9%
Taylor expanded in a around inf 66.1%
*-commutative66.1%
associate-/l*73.1%
Applied egg-rr73.1%
if -1.85000000000000004e124 < a < -4.0000000000000001e-100 or -8.79999999999999992e-237 < a < -5.79999999999999985e-292Initial program 57.4%
associate-/l*59.7%
associate-/l*62.9%
Simplified62.9%
Taylor expanded in y around -inf 54.2%
+-commutative54.2%
associate-*r/54.2%
Simplified55.8%
Taylor expanded in b around inf 61.2%
associate-/l*62.8%
Simplified62.8%
if -4.0000000000000001e-100 < a < -8.79999999999999992e-237 or -5.79999999999999985e-292 < a < 3.9e13Initial program 79.6%
associate-/l*80.6%
associate-/l*85.5%
Simplified85.5%
Taylor expanded in x around inf 60.5%
associate-+r+60.5%
associate-*r/66.4%
Simplified66.4%
Taylor expanded in a around 0 59.1%
*-commutative59.1%
associate-/l*63.9%
Simplified63.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -1.5e+204)
(/ x a)
(if (<= a -6.8e-111)
(/ z b)
(if (<= a -3e-234)
x
(if (<= a 1.3e-305)
(/ z b)
(if (<= a 5.2e-111) x (if (<= a 1.75e+72) (/ z b) (/ x a))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.5e+204) {
tmp = x / a;
} else if (a <= -6.8e-111) {
tmp = z / b;
} else if (a <= -3e-234) {
tmp = x;
} else if (a <= 1.3e-305) {
tmp = z / b;
} else if (a <= 5.2e-111) {
tmp = x;
} else if (a <= 1.75e+72) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-1.5d+204)) then
tmp = x / a
else if (a <= (-6.8d-111)) then
tmp = z / b
else if (a <= (-3d-234)) then
tmp = x
else if (a <= 1.3d-305) then
tmp = z / b
else if (a <= 5.2d-111) then
tmp = x
else if (a <= 1.75d+72) then
tmp = z / b
else
tmp = x / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.5e+204) {
tmp = x / a;
} else if (a <= -6.8e-111) {
tmp = z / b;
} else if (a <= -3e-234) {
tmp = x;
} else if (a <= 1.3e-305) {
tmp = z / b;
} else if (a <= 5.2e-111) {
tmp = x;
} else if (a <= 1.75e+72) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.5e+204: tmp = x / a elif a <= -6.8e-111: tmp = z / b elif a <= -3e-234: tmp = x elif a <= 1.3e-305: tmp = z / b elif a <= 5.2e-111: tmp = x elif a <= 1.75e+72: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.5e+204) tmp = Float64(x / a); elseif (a <= -6.8e-111) tmp = Float64(z / b); elseif (a <= -3e-234) tmp = x; elseif (a <= 1.3e-305) tmp = Float64(z / b); elseif (a <= 5.2e-111) tmp = x; elseif (a <= 1.75e+72) tmp = Float64(z / b); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.5e+204) tmp = x / a; elseif (a <= -6.8e-111) tmp = z / b; elseif (a <= -3e-234) tmp = x; elseif (a <= 1.3e-305) tmp = z / b; elseif (a <= 5.2e-111) tmp = x; elseif (a <= 1.75e+72) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.5e+204], N[(x / a), $MachinePrecision], If[LessEqual[a, -6.8e-111], N[(z / b), $MachinePrecision], If[LessEqual[a, -3e-234], x, If[LessEqual[a, 1.3e-305], N[(z / b), $MachinePrecision], If[LessEqual[a, 5.2e-111], x, If[LessEqual[a, 1.75e+72], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.5 \cdot 10^{+204}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq -6.8 \cdot 10^{-111}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq -3 \cdot 10^{-234}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.3 \cdot 10^{-305}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 5.2 \cdot 10^{-111}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 1.75 \cdot 10^{+72}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -1.49999999999999991e204 or 1.75000000000000005e72 < a Initial program 73.9%
associate-/l*75.4%
associate-/l*81.7%
Simplified81.7%
Taylor expanded in y around 0 56.5%
Taylor expanded in a around inf 56.5%
if -1.49999999999999991e204 < a < -6.79999999999999993e-111 or -2.99999999999999987e-234 < a < 1.3000000000000001e-305 or 5.19999999999999965e-111 < a < 1.75000000000000005e72Initial program 66.7%
associate-/l*70.3%
associate-/l*72.0%
Simplified72.0%
Taylor expanded in y around inf 42.5%
if -6.79999999999999993e-111 < a < -2.99999999999999987e-234 or 1.3000000000000001e-305 < a < 5.19999999999999965e-111Initial program 79.4%
associate-/l*79.4%
associate-/l*87.2%
Simplified87.2%
Taylor expanded in y around 0 49.7%
Taylor expanded in a around 0 49.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -2.45e+207)
(/ z b)
(if (<= b -4.4e+77)
(/ x (+ (+ a 1.0) (* b (/ y t))))
(if (<= b -4.6e+41)
(/ (+ z (* t (/ x y))) b)
(if (<= b 7.5e+102)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(+ (/ z b) (/ (* t (/ x b)) y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.45e+207) {
tmp = z / b;
} else if (b <= -4.4e+77) {
tmp = x / ((a + 1.0) + (b * (y / t)));
} else if (b <= -4.6e+41) {
tmp = (z + (t * (x / y))) / b;
} else if (b <= 7.5e+102) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = (z / b) + ((t * (x / b)) / y);
}
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 (b <= (-2.45d+207)) then
tmp = z / b
else if (b <= (-4.4d+77)) then
tmp = x / ((a + 1.0d0) + (b * (y / t)))
else if (b <= (-4.6d+41)) then
tmp = (z + (t * (x / y))) / b
else if (b <= 7.5d+102) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else
tmp = (z / b) + ((t * (x / b)) / y)
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 (b <= -2.45e+207) {
tmp = z / b;
} else if (b <= -4.4e+77) {
tmp = x / ((a + 1.0) + (b * (y / t)));
} else if (b <= -4.6e+41) {
tmp = (z + (t * (x / y))) / b;
} else if (b <= 7.5e+102) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = (z / b) + ((t * (x / b)) / y);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -2.45e+207: tmp = z / b elif b <= -4.4e+77: tmp = x / ((a + 1.0) + (b * (y / t))) elif b <= -4.6e+41: tmp = (z + (t * (x / y))) / b elif b <= 7.5e+102: tmp = (x + (z * (y / t))) / (a + 1.0) else: tmp = (z / b) + ((t * (x / b)) / y) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.45e+207) tmp = Float64(z / b); elseif (b <= -4.4e+77) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); elseif (b <= -4.6e+41) tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); elseif (b <= 7.5e+102) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); else tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(x / b)) / y)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -2.45e+207) tmp = z / b; elseif (b <= -4.4e+77) tmp = x / ((a + 1.0) + (b * (y / t))); elseif (b <= -4.6e+41) tmp = (z + (t * (x / y))) / b; elseif (b <= 7.5e+102) tmp = (x + (z * (y / t))) / (a + 1.0); else tmp = (z / b) + ((t * (x / b)) / y); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.45e+207], N[(z / b), $MachinePrecision], If[LessEqual[b, -4.4e+77], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, -4.6e+41], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[b, 7.5e+102], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.45 \cdot 10^{+207}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;b \leq -4.4 \cdot 10^{+77}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;b \leq -4.6 \cdot 10^{+41}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{+102}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\
\end{array}
\end{array}
if b < -2.45e207Initial program 52.5%
associate-/l*52.5%
associate-/l*52.4%
Simplified52.4%
Taylor expanded in y around inf 81.4%
if -2.45e207 < b < -4.4000000000000001e77Initial program 68.8%
associate-/l*66.7%
associate-/l*81.9%
Simplified81.9%
Taylor expanded in x around inf 57.1%
associate-+r+57.1%
associate-*r/67.3%
Simplified67.3%
if -4.4000000000000001e77 < b < -4.5999999999999997e41Initial program 55.8%
associate-/l*56.0%
associate-/l*66.8%
Simplified66.8%
Taylor expanded in y around -inf 57.3%
+-commutative57.3%
associate-*r/57.3%
Simplified57.3%
Taylor expanded in b around inf 67.9%
associate-/l*78.5%
Simplified78.5%
if -4.5999999999999997e41 < b < 7.5e102Initial program 80.6%
associate-/l*84.3%
associate-/l*84.9%
Simplified84.9%
Taylor expanded in b around 0 73.9%
*-commutative73.9%
associate-/l*76.5%
Applied egg-rr76.5%
if 7.5e102 < b Initial program 59.1%
associate-/l*61.3%
associate-/l*69.4%
Simplified69.4%
Taylor expanded in y around -inf 47.7%
+-commutative47.7%
associate-*r/47.7%
Simplified62.5%
Taylor expanded in x around inf 56.7%
associate-/l*71.1%
Simplified71.1%
Final simplification74.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ (+ a 1.0) (* b (/ y t))))))
(if (<= t -1.2e-15)
t_1
(if (<= t 3.7e-105)
(/ (+ z (/ (* x t) y)) b)
(if (<= t 5.6e-73)
(/ x (+ a 1.0))
(if (<= t 1.32e-17) (/ (+ z (* t (/ x y))) b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / ((a + 1.0) + (b * (y / t)));
double tmp;
if (t <= -1.2e-15) {
tmp = t_1;
} else if (t <= 3.7e-105) {
tmp = (z + ((x * t) / y)) / b;
} else if (t <= 5.6e-73) {
tmp = x / (a + 1.0);
} else if (t <= 1.32e-17) {
tmp = (z + (t * (x / y))) / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / ((a + 1.0d0) + (b * (y / t)))
if (t <= (-1.2d-15)) then
tmp = t_1
else if (t <= 3.7d-105) then
tmp = (z + ((x * t) / y)) / b
else if (t <= 5.6d-73) then
tmp = x / (a + 1.0d0)
else if (t <= 1.32d-17) then
tmp = (z + (t * (x / y))) / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / ((a + 1.0) + (b * (y / t)));
double tmp;
if (t <= -1.2e-15) {
tmp = t_1;
} else if (t <= 3.7e-105) {
tmp = (z + ((x * t) / y)) / b;
} else if (t <= 5.6e-73) {
tmp = x / (a + 1.0);
} else if (t <= 1.32e-17) {
tmp = (z + (t * (x / y))) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / ((a + 1.0) + (b * (y / t))) tmp = 0 if t <= -1.2e-15: tmp = t_1 elif t <= 3.7e-105: tmp = (z + ((x * t) / y)) / b elif t <= 5.6e-73: tmp = x / (a + 1.0) elif t <= 1.32e-17: tmp = (z + (t * (x / y))) / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))) tmp = 0.0 if (t <= -1.2e-15) tmp = t_1; elseif (t <= 3.7e-105) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (t <= 5.6e-73) tmp = Float64(x / Float64(a + 1.0)); elseif (t <= 1.32e-17) tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / 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) + (b * (y / t))); tmp = 0.0; if (t <= -1.2e-15) tmp = t_1; elseif (t <= 3.7e-105) tmp = (z + ((x * t) / y)) / b; elseif (t <= 5.6e-73) tmp = x / (a + 1.0); elseif (t <= 1.32e-17) tmp = (z + (t * (x / y))) / b; 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[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.2e-15], t$95$1, If[LessEqual[t, 3.7e-105], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t, 5.6e-73], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.32e-17], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{if}\;t \leq -1.2 \cdot 10^{-15}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{-105}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{-73}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;t \leq 1.32 \cdot 10^{-17}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.19999999999999997e-15 or 1.3200000000000001e-17 < t Initial program 78.9%
associate-/l*85.7%
associate-/l*97.0%
Simplified97.0%
Taylor expanded in x around inf 61.7%
associate-+r+61.7%
associate-*r/69.1%
Simplified69.1%
if -1.19999999999999997e-15 < t < 3.70000000000000008e-105Initial program 58.7%
associate-/l*54.0%
associate-/l*49.1%
Simplified49.1%
Taylor expanded in y around -inf 55.0%
+-commutative55.0%
associate-*r/55.0%
Simplified52.9%
Taylor expanded in b around inf 68.7%
if 3.70000000000000008e-105 < t < 5.60000000000000023e-73Initial program 100.0%
associate-/l*100.0%
associate-/l*100.0%
Simplified100.0%
Taylor expanded in y around 0 100.0%
if 5.60000000000000023e-73 < t < 1.3200000000000001e-17Initial program 81.8%
associate-/l*82.0%
associate-/l*81.9%
Simplified81.9%
Taylor expanded in y around -inf 46.3%
+-commutative46.3%
associate-*r/46.3%
Simplified46.3%
Taylor expanded in b around inf 73.6%
associate-/l*73.6%
Simplified73.6%
Final simplification69.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -1.95e-68)
t_1
(if (<= t -1.45e-139)
(* t (/ (/ x b) y))
(if (or (<= t 1.7e-105) (and (not (<= t 3.5e-68)) (<= t 4e-18)))
(/ 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 <= -1.95e-68) {
tmp = t_1;
} else if (t <= -1.45e-139) {
tmp = t * ((x / b) / y);
} else if ((t <= 1.7e-105) || (!(t <= 3.5e-68) && (t <= 4e-18))) {
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 <= (-1.95d-68)) then
tmp = t_1
else if (t <= (-1.45d-139)) then
tmp = t * ((x / b) / y)
else if ((t <= 1.7d-105) .or. (.not. (t <= 3.5d-68)) .and. (t <= 4d-18)) 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 <= -1.95e-68) {
tmp = t_1;
} else if (t <= -1.45e-139) {
tmp = t * ((x / b) / y);
} else if ((t <= 1.7e-105) || (!(t <= 3.5e-68) && (t <= 4e-18))) {
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 <= -1.95e-68: tmp = t_1 elif t <= -1.45e-139: tmp = t * ((x / b) / y) elif (t <= 1.7e-105) or (not (t <= 3.5e-68) and (t <= 4e-18)): 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 <= -1.95e-68) tmp = t_1; elseif (t <= -1.45e-139) tmp = Float64(t * Float64(Float64(x / b) / y)); elseif ((t <= 1.7e-105) || (!(t <= 3.5e-68) && (t <= 4e-18))) 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 <= -1.95e-68) tmp = t_1; elseif (t <= -1.45e-139) tmp = t * ((x / b) / y); elseif ((t <= 1.7e-105) || (~((t <= 3.5e-68)) && (t <= 4e-18))) 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, -1.95e-68], t$95$1, If[LessEqual[t, -1.45e-139], N[(t * N[(N[(x / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 1.7e-105], And[N[Not[LessEqual[t, 3.5e-68]], $MachinePrecision], LessEqual[t, 4e-18]]], N[(z / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -1.95 \cdot 10^{-68}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-139}:\\
\;\;\;\;t \cdot \frac{\frac{x}{b}}{y}\\
\mathbf{elif}\;t \leq 1.7 \cdot 10^{-105} \lor \neg \left(t \leq 3.5 \cdot 10^{-68}\right) \land t \leq 4 \cdot 10^{-18}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.95000000000000016e-68 or 1.69999999999999996e-105 < t < 3.50000000000000013e-68 or 4.0000000000000003e-18 < t Initial program 78.5%
associate-/l*84.1%
associate-/l*94.3%
Simplified94.3%
Taylor expanded in y around 0 53.1%
if -1.95000000000000016e-68 < t < -1.4499999999999999e-139Initial program 75.9%
associate-/l*75.9%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in x around inf 63.4%
associate-+r+63.4%
associate-*r/63.6%
Simplified63.6%
Taylor expanded in b around inf 75.3%
associate-/l*75.5%
associate-/r*81.6%
Simplified81.6%
if -1.4499999999999999e-139 < t < 1.69999999999999996e-105 or 3.50000000000000013e-68 < t < 4.0000000000000003e-18Initial program 58.1%
associate-/l*53.8%
associate-/l*47.9%
Simplified47.9%
Taylor expanded in y around inf 59.1%
Final simplification56.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* z (/ y t))) a)))
(if (<= a -9.2e+14)
t_1
(if (<= a -3.1e-262)
(+ x (/ (* y z) t))
(if (<= a -3.6e-292)
(/ z b)
(if (<= a 60000000000000.0) (/ 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 <= -9.2e+14) {
tmp = t_1;
} else if (a <= -3.1e-262) {
tmp = x + ((y * z) / t);
} else if (a <= -3.6e-292) {
tmp = z / b;
} else if (a <= 60000000000000.0) {
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 <= (-9.2d+14)) then
tmp = t_1
else if (a <= (-3.1d-262)) then
tmp = x + ((y * z) / t)
else if (a <= (-3.6d-292)) then
tmp = z / b
else if (a <= 60000000000000.0d0) 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 <= -9.2e+14) {
tmp = t_1;
} else if (a <= -3.1e-262) {
tmp = x + ((y * z) / t);
} else if (a <= -3.6e-292) {
tmp = z / b;
} else if (a <= 60000000000000.0) {
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 <= -9.2e+14: tmp = t_1 elif a <= -3.1e-262: tmp = x + ((y * z) / t) elif a <= -3.6e-292: tmp = z / b elif a <= 60000000000000.0: 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 (a <= -9.2e+14) tmp = t_1; elseif (a <= -3.1e-262) tmp = Float64(x + Float64(Float64(y * z) / t)); elseif (a <= -3.6e-292) tmp = Float64(z / b); elseif (a <= 60000000000000.0) tmp = Float64(x / Float64(1.0 + Float64(y * Float64(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 <= -9.2e+14) tmp = t_1; elseif (a <= -3.1e-262) tmp = x + ((y * z) / t); elseif (a <= -3.6e-292) tmp = z / b; elseif (a <= 60000000000000.0) 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[a, -9.2e+14], t$95$1, If[LessEqual[a, -3.1e-262], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.6e-292], N[(z / b), $MachinePrecision], If[LessEqual[a, 60000000000000.0], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $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 \leq -9.2 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -3.1 \cdot 10^{-262}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{elif}\;a \leq -3.6 \cdot 10^{-292}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 60000000000000:\\
\;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -9.2e14 or 6e13 < a Initial program 69.8%
associate-/l*72.3%
associate-/l*76.2%
Simplified76.2%
Taylor expanded in a around inf 61.1%
*-commutative61.1%
associate-/l*67.5%
Applied egg-rr67.5%
if -9.2e14 < a < -3.0999999999999998e-262Initial program 71.3%
associate-/l*73.7%
associate-/l*78.9%
Simplified78.9%
Taylor expanded in b around 0 51.3%
Taylor expanded in a around 0 50.2%
if -3.0999999999999998e-262 < a < -3.6000000000000002e-292Initial program 50.7%
associate-/l*50.6%
associate-/l*63.0%
Simplified63.0%
Taylor expanded in y around inf 100.0%
if -3.6000000000000002e-292 < a < 6e13Initial program 78.4%
associate-/l*79.7%
associate-/l*83.8%
Simplified83.8%
Taylor expanded in x around inf 59.3%
associate-+r+59.3%
associate-*r/64.9%
Simplified64.9%
Taylor expanded in a around 0 57.2%
*-commutative57.2%
associate-/l*61.4%
Simplified61.4%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= t -1.42e+16)
(not (or (<= t 3.7e-105) (and (not (<= t 3.1e-67)) (<= t 5e-18)))))
(/ x (+ a 1.0))
(/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.42e+16) || !((t <= 3.7e-105) || (!(t <= 3.1e-67) && (t <= 5e-18)))) {
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 <= (-1.42d+16)) .or. (.not. (t <= 3.7d-105) .or. (.not. (t <= 3.1d-67)) .and. (t <= 5d-18))) 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 <= -1.42e+16) || !((t <= 3.7e-105) || (!(t <= 3.1e-67) && (t <= 5e-18)))) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.42e+16) or not ((t <= 3.7e-105) or (not (t <= 3.1e-67) and (t <= 5e-18))): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.42e+16) || !((t <= 3.7e-105) || (!(t <= 3.1e-67) && (t <= 5e-18)))) 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 <= -1.42e+16) || ~(((t <= 3.7e-105) || (~((t <= 3.1e-67)) && (t <= 5e-18))))) 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, -1.42e+16], N[Not[Or[LessEqual[t, 3.7e-105], And[N[Not[LessEqual[t, 3.1e-67]], $MachinePrecision], LessEqual[t, 5e-18]]]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.42 \cdot 10^{+16} \lor \neg \left(t \leq 3.7 \cdot 10^{-105} \lor \neg \left(t \leq 3.1 \cdot 10^{-67}\right) \land t \leq 5 \cdot 10^{-18}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -1.42e16 or 3.70000000000000008e-105 < t < 3.1000000000000003e-67 or 5.00000000000000036e-18 < t Initial program 80.0%
associate-/l*86.7%
associate-/l*97.7%
Simplified97.7%
Taylor expanded in y around 0 55.6%
if -1.42e16 < t < 3.70000000000000008e-105 or 3.1000000000000003e-67 < t < 5.00000000000000036e-18Initial program 60.9%
associate-/l*56.8%
associate-/l*52.4%
Simplified52.4%
Taylor expanded in y around inf 53.7%
Final simplification54.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -8.2e-9) (not (<= a 1.0))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -8.2e-9) || !(a <= 1.0)) {
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 <= (-8.2d-9)) .or. (.not. (a <= 1.0d0))) 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 <= -8.2e-9) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -8.2e-9) or not (a <= 1.0): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -8.2e-9) || !(a <= 1.0)) 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 <= -8.2e-9) || ~((a <= 1.0))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -8.2e-9], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.2 \cdot 10^{-9} \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -8.2000000000000006e-9 or 1 < a Initial program 70.5%
associate-/l*73.1%
associate-/l*76.0%
Simplified76.0%
Taylor expanded in y around 0 43.3%
Taylor expanded in a around inf 42.2%
if -8.2000000000000006e-9 < a < 1Initial program 73.3%
associate-/l*74.9%
associate-/l*81.2%
Simplified81.2%
Taylor expanded in y around 0 33.6%
Taylor expanded in a around 0 33.1%
Final simplification37.8%
(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 71.9%
associate-/l*74.0%
associate-/l*78.4%
Simplified78.4%
Taylor expanded in y around 0 38.7%
Taylor expanded in a around 0 17.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(if (< t -1.3659085366310088e-271)
t_1
(if (< t 3.036967103737246e-130) (/ z b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 * ((x + ((y / t) * z)) * (1.0d0 / ((a + 1.0d0) + ((y / t) * b))))
if (t < (-1.3659085366310088d-271)) then
tmp = t_1
else if (t < 3.036967103737246d-130) then
tmp = z / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))) tmp = 0 if t < -1.3659085366310088e-271: tmp = t_1 elif t < 3.036967103737246e-130: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 * Float64(Float64(x + Float64(Float64(y / t) * z)) * Float64(1.0 / Float64(Float64(a + 1.0) + Float64(Float64(y / t) * b))))) tmp = 0.0 if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))); tmp = 0.0; if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 * N[(N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.3659085366310088e-271], t$95$1, If[Less[t, 3.036967103737246e-130], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\
\mathbf{if}\;t < -1.3659085366310088 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024100
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:alt
(if (< t -1.3659085366310088e-271) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))