
(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 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (+ x (/ (* y z) t)))
(t_3 (/ t_2 (+ t_1 (+ a 1.0))))
(t_4 (+ 1.0 (+ a t_1))))
(if (<= t_3 (- INFINITY))
(* z (+ (/ x (* z t_4)) (/ y (* t t_4))))
(if (<= t_3 2e+306)
(/ t_2 (+ (* b (/ y t)) (+ a 1.0)))
(if (<= t_3 INFINITY)
(* y (/ z (* t (fma y (/ b t) (+ a 1.0)))))
(/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / (t_1 + (a + 1.0));
double t_4 = 1.0 + (a + t_1);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = z * ((x / (z * t_4)) + (y / (t * t_4)));
} else if (t_3 <= 2e+306) {
tmp = t_2 / ((b * (y / t)) + (a + 1.0));
} else if (t_3 <= ((double) INFINITY)) {
tmp = y * (z / (t * fma(y, (b / t), (a + 1.0))));
} else {
tmp = z / b;
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(x + Float64(Float64(y * z) / t)) t_3 = Float64(t_2 / Float64(t_1 + Float64(a + 1.0))) t_4 = Float64(1.0 + Float64(a + t_1)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(x / Float64(z * t_4)) + Float64(y / Float64(t * t_4)))); elseif (t_3 <= 2e+306) tmp = Float64(t_2 / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); elseif (t_3 <= Inf) tmp = Float64(y * Float64(z / Float64(t * fma(y, Float64(b / t), Float64(a + 1.0))))); else tmp = Float64(z / b); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(z * N[(N[(x / N[(z * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+306], N[(t$95$2 / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(y * N[(z / N[(t * N[(y * N[(b / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := x + \frac{y \cdot z}{t}\\
t_3 := \frac{t\_2}{t\_1 + \left(a + 1\right)}\\
t_4 := 1 + \left(a + t\_1\right)\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_4} + \frac{y}{t \cdot t\_4}\right)\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;\frac{t\_2}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;y \cdot \frac{z}{t \cdot \mathsf{fma}\left(y, \frac{b}{t}, a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 50.5%
associate-/l*70.2%
associate-/l*70.3%
Simplified70.3%
Taylor expanded in z around inf 99.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.00000000000000003e306Initial program 91.0%
*-commutative91.0%
associate-/l*91.8%
Applied egg-rr91.8%
if 2.00000000000000003e306 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 18.1%
associate-/l*40.7%
associate-/l*40.7%
Simplified40.7%
Taylor expanded in x around 0 53.5%
associate-/l*99.4%
associate-+r+99.4%
associate-*r/62.9%
*-commutative62.9%
associate-/r/99.4%
+-commutative99.4%
associate-/r/62.9%
*-commutative62.9%
associate-*r/99.4%
associate-*l/99.4%
*-commutative99.4%
fma-define99.4%
Simplified99.4%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.0%
associate-/l*0.0%
Simplified0.0%
Taylor expanded in y around inf 100.0%
Final simplification93.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (+ 1.0 (+ a t_1)))
(t_3 (+ x (/ (* y z) t)))
(t_4 (/ t_3 (+ t_1 (+ a 1.0))))
(t_5 (* z (+ (/ x (* z t_2)) (/ y (* t t_2))))))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 5e+197)
(/ t_3 (+ (* b (/ y t)) (+ a 1.0)))
(if (<= t_4 INFINITY) t_5 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = 1.0 + (a + t_1);
double t_3 = x + ((y * z) / t);
double t_4 = t_3 / (t_1 + (a + 1.0));
double t_5 = z * ((x / (z * t_2)) + (y / (t * t_2)));
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= 5e+197) {
tmp = t_3 / ((b * (y / t)) + (a + 1.0));
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_5;
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = 1.0 + (a + t_1);
double t_3 = x + ((y * z) / t);
double t_4 = t_3 / (t_1 + (a + 1.0));
double t_5 = z * ((x / (z * t_2)) + (y / (t * t_2)));
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = t_5;
} else if (t_4 <= 5e+197) {
tmp = t_3 / ((b * (y / t)) + (a + 1.0));
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = t_5;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = 1.0 + (a + t_1) t_3 = x + ((y * z) / t) t_4 = t_3 / (t_1 + (a + 1.0)) t_5 = z * ((x / (z * t_2)) + (y / (t * t_2))) tmp = 0 if t_4 <= -math.inf: tmp = t_5 elif t_4 <= 5e+197: tmp = t_3 / ((b * (y / t)) + (a + 1.0)) elif t_4 <= math.inf: tmp = t_5 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(1.0 + Float64(a + t_1)) t_3 = Float64(x + Float64(Float64(y * z) / t)) t_4 = Float64(t_3 / Float64(t_1 + Float64(a + 1.0))) t_5 = Float64(z * Float64(Float64(x / Float64(z * t_2)) + Float64(y / Float64(t * t_2)))) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= 5e+197) tmp = Float64(t_3 / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); elseif (t_4 <= Inf) tmp = t_5; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = 1.0 + (a + t_1); t_3 = x + ((y * z) / t); t_4 = t_3 / (t_1 + (a + 1.0)); t_5 = z * ((x / (z * t_2)) + (y / (t * t_2))); tmp = 0.0; if (t_4 <= -Inf) tmp = t_5; elseif (t_4 <= 5e+197) tmp = t_3 / ((b * (y / t)) + (a + 1.0)); elseif (t_4 <= Inf) tmp = t_5; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(z * N[(N[(x / N[(z * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, 5e+197], N[(t$95$3 / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], t$95$5, N[(z / b), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := 1 + \left(a + t\_1\right)\\
t_3 := x + \frac{y \cdot z}{t}\\
t_4 := \frac{t\_3}{t\_1 + \left(a + 1\right)}\\
t_5 := z \cdot \left(\frac{x}{z \cdot t\_2} + \frac{y}{t \cdot t\_2}\right)\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq 5 \cdot 10^{+197}:\\
\;\;\;\;\frac{t\_3}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0 or 5.00000000000000009e197 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 55.6%
associate-/l*63.6%
associate-/l*63.6%
Simplified63.6%
Taylor expanded in z around inf 99.6%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 5.00000000000000009e197Initial program 90.6%
*-commutative90.6%
associate-/l*91.4%
Applied egg-rr91.4%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.0%
associate-/l*0.0%
Simplified0.0%
Taylor expanded in y around inf 100.0%
Final simplification93.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ (* y b) t) (+ a 1.0))) (t_2 (/ (+ x (/ (* y z) t)) t_1)))
(if (<= t_2 -4e-186)
(/ (+ x (* z (/ y t))) t_1)
(if (<= t_2 2e-180)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))
(if (<= t_2 2e+306) t_2 (/ (+ z (/ (* x t) y)) b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_2 <= -4e-186) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t_2 <= 2e-180) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = ((y * b) / t) + (a + 1.0d0)
t_2 = (x + ((y * z) / t)) / t_1
if (t_2 <= (-4d-186)) then
tmp = (x + (z * (y / t))) / t_1
else if (t_2 <= 2d-180) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else if (t_2 <= 2d+306) then
tmp = t_2
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_2 <= -4e-186) {
tmp = (x + (z * (y / t))) / t_1;
} else if (t_2 <= 2e-180) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else if (t_2 <= 2e+306) {
tmp = t_2;
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y * b) / t) + (a + 1.0) t_2 = (x + ((y * z) / t)) / t_1 tmp = 0 if t_2 <= -4e-186: tmp = (x + (z * (y / t))) / t_1 elif t_2 <= 2e-180: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) elif t_2 <= 2e+306: tmp = t_2 else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_1) tmp = 0.0 if (t_2 <= -4e-186) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_1); elseif (t_2 <= 2e-180) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t_2 <= 2e+306) tmp = t_2; else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((y * b) / t) + (a + 1.0); t_2 = (x + ((y * z) / t)) / t_1; tmp = 0.0; if (t_2 <= -4e-186) tmp = (x + (z * (y / t))) / t_1; elseif (t_2 <= 2e-180) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); elseif (t_2 <= 2e+306) tmp = t_2; else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, -4e-186], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 2e-180], 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$95$2, 2e+306], t$95$2, N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t\_1}\\
\mathbf{if}\;t\_2 \leq -4 \cdot 10^{-186}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t\_1}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-180}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{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))) < -3.9999999999999996e-186Initial program 89.8%
*-commutative89.8%
associate-/l*92.2%
Applied egg-rr92.2%
if -3.9999999999999996e-186 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2e-180Initial program 68.4%
associate-/l*71.5%
associate-/l*81.0%
Simplified81.0%
if 2e-180 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.00000000000000003e306Initial program 99.6%
if 2.00000000000000003e306 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 6.0%
associate-/l*13.6%
associate-/l*13.6%
Simplified13.6%
Taylor expanded in y around inf 58.8%
associate-/l*58.8%
associate-/r*58.8%
associate-/l*58.8%
associate-/l*70.9%
*-commutative70.9%
Simplified70.9%
Taylor expanded in b around inf 75.7%
Final simplification90.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) a)) (t_2 (+ x (/ (* y z) t))))
(if (<= a -3.25e+44)
t_1
(if (<= a -8.3e-156)
(/ z b)
(if (<= a 3.1e-158)
t_2
(if (<= a 1.85e-64)
(/ (* x t) (+ t (* y b)))
(if (<= a 1.9) t_2 t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / a;
double t_2 = x + ((y * z) / t);
double tmp;
if (a <= -3.25e+44) {
tmp = t_1;
} else if (a <= -8.3e-156) {
tmp = z / b;
} else if (a <= 3.1e-158) {
tmp = t_2;
} else if (a <= 1.85e-64) {
tmp = (x * t) / (t + (y * b));
} else if (a <= 1.9) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = (x + (y * (z / t))) / a
t_2 = x + ((y * z) / t)
if (a <= (-3.25d+44)) then
tmp = t_1
else if (a <= (-8.3d-156)) then
tmp = z / b
else if (a <= 3.1d-158) then
tmp = t_2
else if (a <= 1.85d-64) then
tmp = (x * t) / (t + (y * b))
else if (a <= 1.9d0) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / a;
double t_2 = x + ((y * z) / t);
double tmp;
if (a <= -3.25e+44) {
tmp = t_1;
} else if (a <= -8.3e-156) {
tmp = z / b;
} else if (a <= 3.1e-158) {
tmp = t_2;
} else if (a <= 1.85e-64) {
tmp = (x * t) / (t + (y * b));
} else if (a <= 1.9) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / a t_2 = x + ((y * z) / t) tmp = 0 if a <= -3.25e+44: tmp = t_1 elif a <= -8.3e-156: tmp = z / b elif a <= 3.1e-158: tmp = t_2 elif a <= 1.85e-64: tmp = (x * t) / (t + (y * b)) elif a <= 1.9: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / a) t_2 = Float64(x + Float64(Float64(y * z) / t)) tmp = 0.0 if (a <= -3.25e+44) tmp = t_1; elseif (a <= -8.3e-156) tmp = Float64(z / b); elseif (a <= 3.1e-158) tmp = t_2; elseif (a <= 1.85e-64) tmp = Float64(Float64(x * t) / Float64(t + Float64(y * b))); elseif (a <= 1.9) tmp = t_2; 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; t_2 = x + ((y * z) / t); tmp = 0.0; if (a <= -3.25e+44) tmp = t_1; elseif (a <= -8.3e-156) tmp = z / b; elseif (a <= 3.1e-158) tmp = t_2; elseif (a <= 1.85e-64) tmp = (x * t) / (t + (y * b)); elseif (a <= 1.9) tmp = t_2; 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] / a), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.25e+44], t$95$1, If[LessEqual[a, -8.3e-156], N[(z / b), $MachinePrecision], If[LessEqual[a, 3.1e-158], t$95$2, If[LessEqual[a, 1.85e-64], N[(N[(x * t), $MachinePrecision] / N[(t + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.9], t$95$2, t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{a}\\
t_2 := x + \frac{y \cdot z}{t}\\
\mathbf{if}\;a \leq -3.25 \cdot 10^{+44}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -8.3 \cdot 10^{-156}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-158}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{-64}:\\
\;\;\;\;\frac{x \cdot t}{t + y \cdot b}\\
\mathbf{elif}\;a \leq 1.9:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.25000000000000009e44 or 1.8999999999999999 < a Initial program 82.9%
associate-/l*78.1%
associate-/l*79.4%
Simplified79.4%
Taylor expanded in a around inf 68.2%
if -3.25000000000000009e44 < a < -8.29999999999999993e-156Initial program 72.5%
associate-/l*67.4%
associate-/l*62.4%
Simplified62.4%
Taylor expanded in y around inf 45.4%
if -8.29999999999999993e-156 < a < 3.10000000000000018e-158 or 1.84999999999999999e-64 < a < 1.8999999999999999Initial program 77.6%
associate-/l*76.5%
associate-/l*78.9%
Simplified78.9%
Taylor expanded in b around 0 59.9%
Taylor expanded in a around 0 59.3%
if 3.10000000000000018e-158 < a < 1.84999999999999999e-64Initial program 91.5%
associate-/l*91.5%
associate-/l*75.4%
Simplified75.4%
Taylor expanded in t around 0 91.6%
Taylor expanded in x around inf 75.6%
Taylor expanded in a around 0 75.6%
Final simplification62.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))) (t_2 (/ t_1 a)))
(if (<= a -6.4e+44)
t_2
(if (<= a -4.3e-156)
(/ z b)
(if (<= a 9.8e-158)
t_1
(if (<= a 2.95e-58)
(/ (* x t) (+ t (* y b)))
(if (<= a 1.0) t_1 t_2)))))))
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;
double tmp;
if (a <= -6.4e+44) {
tmp = t_2;
} else if (a <= -4.3e-156) {
tmp = z / b;
} else if (a <= 9.8e-158) {
tmp = t_1;
} else if (a <= 2.95e-58) {
tmp = (x * t) / (t + (y * b));
} else if (a <= 1.0) {
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 = x + ((y * z) / t)
t_2 = t_1 / a
if (a <= (-6.4d+44)) then
tmp = t_2
else if (a <= (-4.3d-156)) then
tmp = z / b
else if (a <= 9.8d-158) then
tmp = t_1
else if (a <= 2.95d-58) then
tmp = (x * t) / (t + (y * b))
else if (a <= 1.0d0) 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 = x + ((y * z) / t);
double t_2 = t_1 / a;
double tmp;
if (a <= -6.4e+44) {
tmp = t_2;
} else if (a <= -4.3e-156) {
tmp = z / b;
} else if (a <= 9.8e-158) {
tmp = t_1;
} else if (a <= 2.95e-58) {
tmp = (x * t) / (t + (y * b));
} else if (a <= 1.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = t_1 / a tmp = 0 if a <= -6.4e+44: tmp = t_2 elif a <= -4.3e-156: tmp = z / b elif a <= 9.8e-158: tmp = t_1 elif a <= 2.95e-58: tmp = (x * t) / (t + (y * b)) elif a <= 1.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / a) tmp = 0.0 if (a <= -6.4e+44) tmp = t_2; elseif (a <= -4.3e-156) tmp = Float64(z / b); elseif (a <= 9.8e-158) tmp = t_1; elseif (a <= 2.95e-58) tmp = Float64(Float64(x * t) / Float64(t + Float64(y * b))); elseif (a <= 1.0) tmp = t_1; else tmp = t_2; 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; tmp = 0.0; if (a <= -6.4e+44) tmp = t_2; elseif (a <= -4.3e-156) tmp = z / b; elseif (a <= 9.8e-158) tmp = t_1; elseif (a <= 2.95e-58) tmp = (x * t) / (t + (y * b)); elseif (a <= 1.0) tmp = t_1; else tmp = t_2; 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 / a), $MachinePrecision]}, If[LessEqual[a, -6.4e+44], t$95$2, If[LessEqual[a, -4.3e-156], N[(z / b), $MachinePrecision], If[LessEqual[a, 9.8e-158], t$95$1, If[LessEqual[a, 2.95e-58], N[(N[(x * t), $MachinePrecision] / N[(t + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.0], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{a}\\
\mathbf{if}\;a \leq -6.4 \cdot 10^{+44}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -4.3 \cdot 10^{-156}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 9.8 \cdot 10^{-158}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.95 \cdot 10^{-58}:\\
\;\;\;\;\frac{x \cdot t}{t + y \cdot b}\\
\mathbf{elif}\;a \leq 1:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -6.40000000000000009e44 or 1 < a Initial program 82.9%
associate-/l*78.1%
associate-/l*79.4%
Simplified79.4%
Taylor expanded in a around inf 71.3%
if -6.40000000000000009e44 < a < -4.29999999999999977e-156Initial program 72.5%
associate-/l*67.4%
associate-/l*62.4%
Simplified62.4%
Taylor expanded in y around inf 45.4%
if -4.29999999999999977e-156 < a < 9.79999999999999986e-158 or 2.95e-58 < a < 1Initial program 77.6%
associate-/l*76.5%
associate-/l*78.9%
Simplified78.9%
Taylor expanded in b around 0 59.9%
Taylor expanded in a around 0 59.3%
if 9.79999999999999986e-158 < a < 2.95e-58Initial program 91.5%
associate-/l*91.5%
associate-/l*75.4%
Simplified75.4%
Taylor expanded in t around 0 91.6%
Taylor expanded in x around inf 75.6%
Taylor expanded in a around 0 75.6%
Final simplification63.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))))
(if (<= t -3.3e-136)
t_1
(if (<= t -2.6e-273)
(/ (+ x (* z (/ y t))) (+ (/ (* y b) t) (+ a 1.0)))
(if (<= t 6e-211) (/ (* y z) (+ (* y b) (* t (+ a 1.0)))) 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 <= -3.3e-136) {
tmp = t_1;
} else if (t <= -2.6e-273) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else if (t <= 6e-211) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
if (t <= (-3.3d-136)) then
tmp = t_1
else if (t <= (-2.6d-273)) then
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0d0))
else if (t <= 6d-211) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -3.3e-136) {
tmp = t_1;
} else if (t <= -2.6e-273) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else if (t <= 6e-211) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} 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 <= -3.3e-136: tmp = t_1 elif t <= -2.6e-273: tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)) elif t <= 6e-211: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) 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 <= -3.3e-136) tmp = t_1; elseif (t <= -2.6e-273) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); elseif (t <= 6e-211) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); tmp = 0.0; if (t <= -3.3e-136) tmp = t_1; elseif (t <= -2.6e-273) tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)); elseif (t <= 6e-211) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(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, -3.3e-136], t$95$1, If[LessEqual[t, -2.6e-273], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-211], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $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 -3.3 \cdot 10^{-136}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.6 \cdot 10^{-273}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-211}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.30000000000000018e-136 or 6.00000000000000009e-211 < t Initial program 83.2%
associate-/l*85.6%
associate-/l*87.5%
Simplified87.5%
if -3.30000000000000018e-136 < t < -2.59999999999999983e-273Initial program 75.7%
*-commutative75.7%
associate-/l*78.0%
Applied egg-rr78.0%
if -2.59999999999999983e-273 < t < 6.00000000000000009e-211Initial program 65.5%
associate-/l*47.0%
associate-/l*43.4%
Simplified43.4%
Taylor expanded in t around 0 47.0%
Taylor expanded in x around 0 92.5%
Final simplification86.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ y (/ t z))) (+ (+ a 1.0) (* y (/ b t))))))
(if (<= t -7.5e-139)
t_1
(if (<= t -2.4e-273)
(/ (+ x (* z (/ y t))) (+ (/ (* y b) t) (+ a 1.0)))
(if (<= t 2.4e-213) (/ (* y z) (+ (* y b) (* t (+ a 1.0)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -7.5e-139) {
tmp = t_1;
} else if (t <= -2.4e-273) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else if (t <= 2.4e-213) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (y / (t / z))) / ((a + 1.0d0) + (y * (b / t)))
if (t <= (-7.5d-139)) then
tmp = t_1
else if (t <= (-2.4d-273)) then
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0d0))
else if (t <= 2.4d-213) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -7.5e-139) {
tmp = t_1;
} else if (t <= -2.4e-273) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else if (t <= 2.4e-213) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))) tmp = 0 if t <= -7.5e-139: tmp = t_1 elif t <= -2.4e-273: tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)) elif t <= 2.4e-213: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))) tmp = 0.0 if (t <= -7.5e-139) tmp = t_1; elseif (t <= -2.4e-273) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); elseif (t <= 2.4e-213) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))); tmp = 0.0; if (t <= -7.5e-139) tmp = t_1; elseif (t <= -2.4e-273) tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)); elseif (t <= 2.4e-213) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.5e-139], t$95$1, If[LessEqual[t, -2.4e-273], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e-213], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{if}\;t \leq -7.5 \cdot 10^{-139}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -2.4 \cdot 10^{-273}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-213}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.5000000000000001e-139 or 2.39999999999999996e-213 < t Initial program 83.2%
associate-/l*85.6%
associate-/l*87.5%
Simplified87.5%
clear-num87.6%
un-div-inv87.7%
Applied egg-rr87.7%
if -7.5000000000000001e-139 < t < -2.39999999999999982e-273Initial program 75.7%
*-commutative75.7%
associate-/l*78.0%
Applied egg-rr78.0%
if -2.39999999999999982e-273 < t < 2.39999999999999996e-213Initial program 65.5%
associate-/l*47.0%
associate-/l*43.4%
Simplified43.4%
Taylor expanded in t around 0 47.0%
Taylor expanded in x around 0 92.5%
Final simplification86.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -4.7e-142)
(/ (+ x (/ y (/ t z))) (+ (+ a 1.0) (* y (/ b t))))
(if (<= t -1.82e-273)
(/ (+ x (* z (/ y t))) (+ (/ (* y b) t) (+ a 1.0)))
(if (<= t 5.2e-211)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ (+ x (/ (* y z) t)) (+ (* b (/ y t)) (+ a 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.7e-142) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} else if (t <= -1.82e-273) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else if (t <= 5.2e-211) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + ((y * z) / t)) / ((b * (y / t)) + (a + 1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-4.7d-142)) then
tmp = (x + (y / (t / z))) / ((a + 1.0d0) + (y * (b / t)))
else if (t <= (-1.82d-273)) then
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0d0))
else if (t <= 5.2d-211) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = (x + ((y * z) / t)) / ((b * (y / t)) + (a + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -4.7e-142) {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
} else if (t <= -1.82e-273) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else if (t <= 5.2e-211) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + ((y * z) / t)) / ((b * (y / t)) + (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -4.7e-142: tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))) elif t <= -1.82e-273: tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)) elif t <= 5.2e-211: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = (x + ((y * z) / t)) / ((b * (y / t)) + (a + 1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -4.7e-142) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t <= -1.82e-273) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); elseif (t <= 5.2e-211) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -4.7e-142) tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))); elseif (t <= -1.82e-273) tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)); elseif (t <= 5.2e-211) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = (x + ((y * z) / t)) / ((b * (y / t)) + (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -4.7e-142], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.82e-273], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.2e-211], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.7 \cdot 10^{-142}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t \leq -1.82 \cdot 10^{-273}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 5.2 \cdot 10^{-211}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\
\end{array}
\end{array}
if t < -4.6999999999999999e-142Initial program 75.5%
associate-/l*77.4%
associate-/l*81.5%
Simplified81.5%
clear-num81.5%
un-div-inv81.8%
Applied egg-rr81.8%
if -4.6999999999999999e-142 < t < -1.81999999999999997e-273Initial program 75.7%
*-commutative75.7%
associate-/l*78.0%
Applied egg-rr78.0%
if -1.81999999999999997e-273 < t < 5.2e-211Initial program 65.5%
associate-/l*47.0%
associate-/l*43.4%
Simplified43.4%
Taylor expanded in t around 0 47.0%
Taylor expanded in x around 0 92.5%
if 5.2e-211 < t Initial program 90.9%
*-commutative90.9%
associate-/l*93.6%
Applied egg-rr93.6%
Final simplification87.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -6.2e+24)
t_1
(if (<= t 1.1e-16)
(/ (+ z (/ (* x t) y)) b)
(if (<= t 1.1e+75)
(/ (+ x (* y (/ z t))) a)
(if (<= t 5e+132) (* t (/ x (+ t (* 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);
double tmp;
if (t <= -6.2e+24) {
tmp = t_1;
} else if (t <= 1.1e-16) {
tmp = (z + ((x * t) / y)) / b;
} else if (t <= 1.1e+75) {
tmp = (x + (y * (z / t))) / a;
} else if (t <= 5e+132) {
tmp = t * (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 / (a + 1.0d0)
if (t <= (-6.2d+24)) then
tmp = t_1
else if (t <= 1.1d-16) then
tmp = (z + ((x * t) / y)) / b
else if (t <= 1.1d+75) then
tmp = (x + (y * (z / t))) / a
else if (t <= 5d+132) then
tmp = t * (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 / (a + 1.0);
double tmp;
if (t <= -6.2e+24) {
tmp = t_1;
} else if (t <= 1.1e-16) {
tmp = (z + ((x * t) / y)) / b;
} else if (t <= 1.1e+75) {
tmp = (x + (y * (z / t))) / a;
} else if (t <= 5e+132) {
tmp = t * (x / (t + (y * b)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -6.2e+24: tmp = t_1 elif t <= 1.1e-16: tmp = (z + ((x * t) / y)) / b elif t <= 1.1e+75: tmp = (x + (y * (z / t))) / a elif t <= 5e+132: tmp = t * (x / (t + (y * b))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -6.2e+24) tmp = t_1; elseif (t <= 1.1e-16) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (t <= 1.1e+75) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / a); elseif (t <= 5e+132) tmp = Float64(t * Float64(x / Float64(t + Float64(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); tmp = 0.0; if (t <= -6.2e+24) tmp = t_1; elseif (t <= 1.1e-16) tmp = (z + ((x * t) / y)) / b; elseif (t <= 1.1e+75) tmp = (x + (y * (z / t))) / a; elseif (t <= 5e+132) tmp = t * (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[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.2e+24], t$95$1, If[LessEqual[t, 1.1e-16], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t, 1.1e+75], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 5e+132], N[(t * N[(x / N[(t + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -6.2 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-16}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{+75}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+132}:\\
\;\;\;\;t \cdot \frac{x}{t + y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.20000000000000022e24 or 5.0000000000000001e132 < t Initial program 88.3%
associate-/l*92.1%
associate-/l*98.8%
Simplified98.8%
Taylor expanded in y around 0 68.6%
if -6.20000000000000022e24 < t < 1.1e-16Initial program 71.9%
associate-/l*61.3%
associate-/l*56.3%
Simplified56.3%
Taylor expanded in y around inf 45.8%
associate-/l*45.1%
associate-/r*46.4%
associate-/l*45.8%
associate-/l*48.0%
*-commutative48.0%
Simplified48.0%
Taylor expanded in b around inf 57.7%
if 1.1e-16 < t < 1.10000000000000006e75Initial program 91.1%
associate-/l*99.7%
associate-/l*99.6%
Simplified99.6%
Taylor expanded in a around inf 78.4%
if 1.10000000000000006e75 < t < 5.0000000000000001e132Initial program 93.0%
associate-/l*99.8%
associate-/l*99.7%
Simplified99.7%
Taylor expanded in t around 0 93.2%
Taylor expanded in x around inf 72.5%
Taylor expanded in a around 0 65.1%
associate-/l*65.5%
*-commutative65.5%
Simplified65.5%
Final simplification63.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -9.5e-159) (not (<= t 1.55e-211))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))) (/ (* y z) (+ (* y b) (* t (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -9.5e-159) || !(t <= 1.55e-211)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-9.5d-159)) .or. (.not. (t <= 1.55d-211))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -9.5e-159) || !(t <= 1.55e-211)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -9.5e-159) or not (t <= 1.55e-211): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -9.5e-159) || !(t <= 1.55e-211)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -9.5e-159) || ~((t <= 1.55e-211))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = (y * z) / ((y * b) + (t * (a + 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -9.5e-159], N[Not[LessEqual[t, 1.55e-211]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{-159} \lor \neg \left(t \leq 1.55 \cdot 10^{-211}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\end{array}
\end{array}
if t < -9.4999999999999997e-159 or 1.54999999999999998e-211 < t Initial program 83.8%
associate-/l*85.7%
associate-/l*87.5%
Simplified87.5%
if -9.4999999999999997e-159 < t < 1.54999999999999998e-211Initial program 67.2%
associate-/l*46.2%
associate-/l*39.4%
Simplified39.4%
Taylor expanded in t around 0 46.1%
Taylor expanded in x around 0 76.5%
Final simplification85.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= y -2.7e+14)
(/ z b)
(if (<= y 3.105e-135)
t_1
(if (<= y 6.4e-16)
(* y (/ (/ z (+ a 1.0)) t))
(if (<= y 4.5e+121) t_1 (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (y <= -2.7e+14) {
tmp = z / b;
} else if (y <= 3.105e-135) {
tmp = t_1;
} else if (y <= 6.4e-16) {
tmp = y * ((z / (a + 1.0)) / t);
} else if (y <= 4.5e+121) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (y <= (-2.7d+14)) then
tmp = z / b
else if (y <= 3.105d-135) then
tmp = t_1
else if (y <= 6.4d-16) then
tmp = y * ((z / (a + 1.0d0)) / t)
else if (y <= 4.5d+121) then
tmp = t_1
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 t_1 = x / (a + 1.0);
double tmp;
if (y <= -2.7e+14) {
tmp = z / b;
} else if (y <= 3.105e-135) {
tmp = t_1;
} else if (y <= 6.4e-16) {
tmp = y * ((z / (a + 1.0)) / t);
} else if (y <= 4.5e+121) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if y <= -2.7e+14: tmp = z / b elif y <= 3.105e-135: tmp = t_1 elif y <= 6.4e-16: tmp = y * ((z / (a + 1.0)) / t) elif y <= 4.5e+121: tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (y <= -2.7e+14) tmp = Float64(z / b); elseif (y <= 3.105e-135) tmp = t_1; elseif (y <= 6.4e-16) tmp = Float64(y * Float64(Float64(z / Float64(a + 1.0)) / t)); elseif (y <= 4.5e+121) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (y <= -2.7e+14) tmp = z / b; elseif (y <= 3.105e-135) tmp = t_1; elseif (y <= 6.4e-16) tmp = y * ((z / (a + 1.0)) / t); elseif (y <= 4.5e+121) tmp = t_1; else tmp = z / b; 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[y, -2.7e+14], N[(z / b), $MachinePrecision], If[LessEqual[y, 3.105e-135], t$95$1, If[LessEqual[y, 6.4e-16], N[(y * N[(N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.5e+121], t$95$1, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;y \leq -2.7 \cdot 10^{+14}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 3.105 \cdot 10^{-135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{-16}:\\
\;\;\;\;y \cdot \frac{\frac{z}{a + 1}}{t}\\
\mathbf{elif}\;y \leq 4.5 \cdot 10^{+121}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -2.7e14 or 4.5000000000000003e121 < y Initial program 55.9%
associate-/l*61.6%
associate-/l*68.2%
Simplified68.2%
Taylor expanded in y around inf 53.6%
if -2.7e14 < y < 3.1049999999999998e-135 or 6.40000000000000046e-16 < y < 4.5000000000000003e121Initial program 95.0%
associate-/l*85.5%
associate-/l*80.6%
Simplified80.6%
Taylor expanded in y around 0 63.5%
if 3.1049999999999998e-135 < y < 6.40000000000000046e-16Initial program 94.3%
*-commutative94.3%
associate-/l*94.2%
Applied egg-rr94.2%
Taylor expanded in x around 0 56.4%
Taylor expanded in y around 0 50.9%
associate-/l*50.8%
Simplified50.8%
*-un-lft-identity50.8%
times-frac56.0%
Applied egg-rr56.0%
associate-*l/55.9%
*-lft-identity55.9%
Simplified55.9%
Final simplification59.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.05e+24) (not (<= t 6e-211))) (/ x (+ 1.0 (+ a (/ (* y b) t)))) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.05e+24) || !(t <= 6e-211)) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-2.05d+24)) .or. (.not. (t <= 6d-211))) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.05e+24) || !(t <= 6e-211)) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.05e+24) or not (t <= 6e-211): tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.05e+24) || !(t <= 6e-211)) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.05e+24) || ~((t <= 6e-211))) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.05e+24], N[Not[LessEqual[t, 6e-211]], $MachinePrecision]], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.05 \cdot 10^{+24} \lor \neg \left(t \leq 6 \cdot 10^{-211}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -2.05e24 or 6.00000000000000009e-211 < t Initial program 89.0%
associate-/l*92.7%
associate-/l*95.2%
Simplified95.2%
Taylor expanded in x around inf 72.5%
if -2.05e24 < t < 6.00000000000000009e-211Initial program 67.7%
associate-/l*54.5%
associate-/l*50.8%
Simplified50.8%
Taylor expanded in y around inf 44.2%
associate-/l*43.3%
associate-/r*45.1%
associate-/l*44.2%
associate-/l*46.1%
*-commutative46.1%
Simplified46.1%
Taylor expanded in b around inf 58.9%
Final simplification66.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.15e+112) (not (<= y 6e+121))) (/ (+ z (/ (* x t) y)) b) (/ (+ x (/ (* y z) t)) (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.15e+112) || !(y <= 6e+121)) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = (x + ((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) :: tmp
if ((y <= (-2.15d+112)) .or. (.not. (y <= 6d+121))) then
tmp = (z + ((x * t) / y)) / b
else
tmp = (x + ((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 tmp;
if ((y <= -2.15e+112) || !(y <= 6e+121)) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.15e+112) or not (y <= 6e+121): tmp = (z + ((x * t) / y)) / b else: tmp = (x + ((y * z) / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.15e+112) || !(y <= 6e+121)) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -2.15e+112) || ~((y <= 6e+121))) tmp = (z + ((x * t) / y)) / b; else tmp = (x + ((y * z) / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.15e+112], N[Not[LessEqual[y, 6e+121]], $MachinePrecision]], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.15 \cdot 10^{+112} \lor \neg \left(y \leq 6 \cdot 10^{+121}\right):\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -2.14999999999999991e112 or 6.0000000000000005e121 < y Initial program 53.1%
associate-/l*60.1%
associate-/l*67.4%
Simplified67.4%
Taylor expanded in y around inf 43.3%
associate-/l*47.0%
associate-/r*51.7%
associate-/l*53.4%
associate-/l*57.1%
*-commutative57.1%
Simplified57.1%
Taylor expanded in b around inf 61.4%
if -2.14999999999999991e112 < y < 6.0000000000000005e121Initial program 92.2%
associate-/l*84.1%
associate-/l*80.6%
Simplified80.6%
Taylor expanded in b around 0 74.8%
Final simplification70.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -6.2e+111) (not (<= y 5.2e+121))) (/ (+ z (* x (/ t y))) b) (/ (+ x (/ (* y z) t)) (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -6.2e+111) || !(y <= 5.2e+121)) {
tmp = (z + (x * (t / y))) / b;
} else {
tmp = (x + ((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) :: tmp
if ((y <= (-6.2d+111)) .or. (.not. (y <= 5.2d+121))) then
tmp = (z + (x * (t / y))) / b
else
tmp = (x + ((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 tmp;
if ((y <= -6.2e+111) || !(y <= 5.2e+121)) {
tmp = (z + (x * (t / y))) / b;
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -6.2e+111) or not (y <= 5.2e+121): tmp = (z + (x * (t / y))) / b else: tmp = (x + ((y * z) / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -6.2e+111) || !(y <= 5.2e+121)) tmp = Float64(Float64(z + Float64(x * Float64(t / y))) / b); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -6.2e+111) || ~((y <= 5.2e+121))) tmp = (z + (x * (t / y))) / b; else tmp = (x + ((y * z) / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -6.2e+111], N[Not[LessEqual[y, 5.2e+121]], $MachinePrecision]], N[(N[(z + N[(x * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+111} \lor \neg \left(y \leq 5.2 \cdot 10^{+121}\right):\\
\;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -6.2000000000000001e111 or 5.1999999999999998e121 < y Initial program 53.1%
associate-/l*60.1%
associate-/l*67.4%
Simplified67.4%
Taylor expanded in y around inf 43.3%
associate-/l*47.0%
associate-/r*51.7%
associate-/l*53.4%
associate-/l*57.1%
*-commutative57.1%
Simplified57.1%
Taylor expanded in b around inf 61.4%
*-commutative61.4%
*-un-lft-identity61.4%
times-frac68.7%
Applied egg-rr68.7%
if -6.2000000000000001e111 < y < 5.1999999999999998e121Initial program 92.2%
associate-/l*84.1%
associate-/l*80.6%
Simplified80.6%
Taylor expanded in b around 0 74.8%
Final simplification72.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.05e+24)
(/ x (+ (+ a 1.0) (* y (/ b t))))
(if (<= t 6e-211)
(/ (+ z (/ (* x t) y)) b)
(/ x (+ 1.0 (+ a (/ (* y b) t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.05e+24) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else if (t <= 6e-211) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.05d+24)) then
tmp = x / ((a + 1.0d0) + (y * (b / t)))
else if (t <= 6d-211) then
tmp = (z + ((x * t) / y)) / b
else
tmp = x / (1.0d0 + (a + ((y * b) / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.05e+24) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else if (t <= 6e-211) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.05e+24: tmp = x / ((a + 1.0) + (y * (b / t))) elif t <= 6e-211: tmp = (z + ((x * t) / y)) / b else: tmp = x / (1.0 + (a + ((y * b) / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.05e+24) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t <= 6e-211) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); else tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.05e+24) tmp = x / ((a + 1.0) + (y * (b / t))); elseif (t <= 6e-211) tmp = (z + ((x * t) / y)) / b; else tmp = x / (1.0 + (a + ((y * b) / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.05e+24], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-211], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.05 \cdot 10^{+24}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-211}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\end{array}
\end{array}
if t < -2.05e24Initial program 85.6%
*-commutative85.6%
associate-/l*92.8%
Applied egg-rr92.8%
Taylor expanded in x around inf 71.7%
associate-+r+71.7%
*-commutative71.7%
associate-/l*75.4%
Simplified75.4%
if -2.05e24 < t < 6.00000000000000009e-211Initial program 67.7%
associate-/l*54.5%
associate-/l*50.8%
Simplified50.8%
Taylor expanded in y around inf 44.2%
associate-/l*43.3%
associate-/r*45.1%
associate-/l*44.2%
associate-/l*46.1%
*-commutative46.1%
Simplified46.1%
Taylor expanded in b around inf 58.9%
if 6.00000000000000009e-211 < t Initial program 90.9%
associate-/l*93.8%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in x around inf 72.9%
Final simplification67.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.05e+24)
(/ x (+ (+ a 1.0) (* y (/ b t))))
(if (<= t 6e-211)
(/ (+ z (/ (* x t) y)) b)
(/ x (+ (* b (/ y t)) (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.05e+24) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else if (t <= 6e-211) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = x / ((b * (y / t)) + (a + 1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.05d+24)) then
tmp = x / ((a + 1.0d0) + (y * (b / t)))
else if (t <= 6d-211) then
tmp = (z + ((x * t) / y)) / b
else
tmp = x / ((b * (y / t)) + (a + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.05e+24) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else if (t <= 6e-211) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = x / ((b * (y / t)) + (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.05e+24: tmp = x / ((a + 1.0) + (y * (b / t))) elif t <= 6e-211: tmp = (z + ((x * t) / y)) / b else: tmp = x / ((b * (y / t)) + (a + 1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.05e+24) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (t <= 6e-211) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); else tmp = Float64(x / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.05e+24) tmp = x / ((a + 1.0) + (y * (b / t))); elseif (t <= 6e-211) tmp = (z + ((x * t) / y)) / b; else tmp = x / ((b * (y / t)) + (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.05e+24], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-211], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(x / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.05 \cdot 10^{+24}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-211}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\
\end{array}
\end{array}
if t < -2.05e24Initial program 85.6%
*-commutative85.6%
associate-/l*92.8%
Applied egg-rr92.8%
Taylor expanded in x around inf 71.7%
associate-+r+71.7%
*-commutative71.7%
associate-/l*75.4%
Simplified75.4%
if -2.05e24 < t < 6.00000000000000009e-211Initial program 67.7%
associate-/l*54.5%
associate-/l*50.8%
Simplified50.8%
Taylor expanded in y around inf 44.2%
associate-/l*43.3%
associate-/r*45.1%
associate-/l*44.2%
associate-/l*46.1%
*-commutative46.1%
Simplified46.1%
Taylor expanded in b around inf 58.9%
if 6.00000000000000009e-211 < t Initial program 90.9%
*-commutative90.9%
associate-/l*93.6%
Applied egg-rr93.6%
Taylor expanded in x around inf 75.7%
Final simplification68.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.05e+24)
(/ (+ x (* y (/ z t))) (+ a 1.0))
(if (<= t 6e-211)
(/ (+ z (/ (* x t) y)) b)
(/ x (+ (* b (/ y t)) (+ a 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.05e+24) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (t <= 6e-211) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = x / ((b * (y / t)) + (a + 1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.05d+24)) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
else if (t <= 6d-211) then
tmp = (z + ((x * t) / y)) / b
else
tmp = x / ((b * (y / t)) + (a + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.05e+24) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (t <= 6e-211) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = x / ((b * (y / t)) + (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.05e+24: tmp = (x + (y * (z / t))) / (a + 1.0) elif t <= 6e-211: tmp = (z + ((x * t) / y)) / b else: tmp = x / ((b * (y / t)) + (a + 1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.05e+24) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); elseif (t <= 6e-211) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); else tmp = Float64(x / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.05e+24) tmp = (x + (y * (z / t))) / (a + 1.0); elseif (t <= 6e-211) tmp = (z + ((x * t) / y)) / b; else tmp = x / ((b * (y / t)) + (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.05e+24], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6e-211], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(x / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.05 \cdot 10^{+24}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-211}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\
\end{array}
\end{array}
if t < -2.05e24Initial program 85.6%
associate-/l*90.8%
associate-/l*98.0%
Simplified98.0%
Taylor expanded in y around 0 87.5%
if -2.05e24 < t < 6.00000000000000009e-211Initial program 67.7%
associate-/l*54.5%
associate-/l*50.8%
Simplified50.8%
Taylor expanded in y around inf 44.2%
associate-/l*43.3%
associate-/r*45.1%
associate-/l*44.2%
associate-/l*46.1%
*-commutative46.1%
Simplified46.1%
Taylor expanded in b around inf 58.9%
if 6.00000000000000009e-211 < t Initial program 90.9%
*-commutative90.9%
associate-/l*93.6%
Applied egg-rr93.6%
Taylor expanded in x around inf 75.7%
Final simplification71.0%
(FPCore (x y z t a b) :precision binary64 (if (<= a -2.9e+44) (/ x a) (if (<= a 1.5e-246) (/ z b) (if (<= a 1.0) x (/ x a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -2.9e+44) {
tmp = x / a;
} else if (a <= 1.5e-246) {
tmp = z / b;
} else if (a <= 1.0) {
tmp = x;
} 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 <= (-2.9d+44)) then
tmp = x / a
else if (a <= 1.5d-246) then
tmp = z / b
else if (a <= 1.0d0) then
tmp = x
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 <= -2.9e+44) {
tmp = x / a;
} else if (a <= 1.5e-246) {
tmp = z / b;
} else if (a <= 1.0) {
tmp = x;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -2.9e+44: tmp = x / a elif a <= 1.5e-246: tmp = z / b elif a <= 1.0: tmp = x else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -2.9e+44) tmp = Float64(x / a); elseif (a <= 1.5e-246) tmp = Float64(z / b); elseif (a <= 1.0) tmp = x; else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -2.9e+44) tmp = x / a; elseif (a <= 1.5e-246) tmp = z / b; elseif (a <= 1.0) tmp = x; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.9e+44], N[(x / a), $MachinePrecision], If[LessEqual[a, 1.5e-246], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.0], x, N[(x / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{+44}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq 1.5 \cdot 10^{-246}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 1:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -2.9000000000000002e44 or 1 < a Initial program 82.9%
associate-/l*78.1%
associate-/l*79.4%
Simplified79.4%
Taylor expanded in y around 0 49.4%
Taylor expanded in a around inf 49.2%
if -2.9000000000000002e44 < a < 1.5e-246Initial program 71.4%
associate-/l*66.9%
associate-/l*66.9%
Simplified66.9%
Taylor expanded in y around inf 42.5%
if 1.5e-246 < a < 1Initial program 89.1%
associate-/l*91.4%
associate-/l*87.1%
Simplified87.1%
Taylor expanded in y around 0 52.8%
Taylor expanded in a around 0 51.6%
Final simplification47.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.6e+24) (not (<= t 9.4e-64))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.6e+24) || !(t <= 9.4e-64)) {
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 <= (-2.6d+24)) .or. (.not. (t <= 9.4d-64))) 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 <= -2.6e+24) || !(t <= 9.4e-64)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.6e+24) or not (t <= 9.4e-64): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.6e+24) || !(t <= 9.4e-64)) 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 <= -2.6e+24) || ~((t <= 9.4e-64))) 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, -2.6e+24], N[Not[LessEqual[t, 9.4e-64]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{+24} \lor \neg \left(t \leq 9.4 \cdot 10^{-64}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -2.5999999999999998e24 or 9.3999999999999996e-64 < t Initial program 89.8%
associate-/l*94.1%
associate-/l*98.3%
Simplified98.3%
Taylor expanded in y around 0 64.0%
if -2.5999999999999998e24 < t < 9.3999999999999996e-64Initial program 69.9%
associate-/l*58.5%
associate-/l*53.9%
Simplified53.9%
Taylor expanded in y around inf 50.7%
Final simplification57.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4.4e-5) (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 <= -4.4e-5) || !(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 <= (-4.4d-5)) .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 <= -4.4e-5) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4.4e-5) 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 <= -4.4e-5) || !(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 <= -4.4e-5) || ~((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, -4.4e-5], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.4 \cdot 10^{-5} \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.3999999999999999e-5 or 1 < a Initial program 82.4%
associate-/l*77.9%
associate-/l*79.2%
Simplified79.2%
Taylor expanded in y around 0 46.6%
Taylor expanded in a around inf 46.4%
if -4.3999999999999999e-5 < a < 1Initial program 77.5%
associate-/l*75.2%
associate-/l*73.6%
Simplified73.6%
Taylor expanded in y around 0 39.0%
Taylor expanded in a around 0 38.0%
Final simplification42.3%
(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 80.0%
associate-/l*76.6%
associate-/l*76.5%
Simplified76.5%
Taylor expanded in y around 0 42.9%
Taylor expanded in a around 0 20.4%
Final simplification20.4%
(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 2024079
(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))))