
(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 17 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)) (+ (+ a 1.0) t_1)))
(t_3 (+ 1.0 (+ a t_1))))
(if (<= t_2 (- INFINITY))
(* z (+ (/ x (* z t_3)) (/ y (* t t_3))))
(if (<= t_2 2e+297) t_2 (/ 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)) / ((a + 1.0) + t_1);
double t_3 = 1.0 + (a + t_1);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = z * ((x / (z * t_3)) + (y / (t * t_3)));
} else if (t_2 <= 2e+297) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_3 = 1.0 + (a + t_1);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = z * ((x / (z * t_3)) + (y / (t * t_3)));
} else if (t_2 <= 2e+297) {
tmp = t_2;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1) t_3 = 1.0 + (a + t_1) tmp = 0 if t_2 <= -math.inf: tmp = z * ((x / (z * t_3)) + (y / (t * t_3))) elif t_2 <= 2e+297: tmp = t_2 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + t_1)) t_3 = Float64(1.0 + Float64(a + t_1)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(x / Float64(z * t_3)) + Float64(y / Float64(t * t_3)))); elseif (t_2 <= 2e+297) tmp = t_2; 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 = (x + ((y * z) / t)) / ((a + 1.0) + t_1); t_3 = 1.0 + (a + t_1); tmp = 0.0; if (t_2 <= -Inf) tmp = z * ((x / (z * t_3)) + (y / (t * t_3))); elseif (t_2 <= 2e+297) tmp = t_2; 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[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(N[(x / N[(z * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+297], t$95$2, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + t\_1}\\
t_3 := 1 + \left(a + t\_1\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_3} + \frac{y}{t \cdot t\_3}\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+297}:\\
\;\;\;\;t\_2\\
\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 36.1%
associate-/l*52.0%
associate-/l*51.6%
Simplified51.6%
Taylor expanded in z around inf 99.5%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2e297Initial program 92.9%
if 2e297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 9.3%
associate-/l*21.5%
associate-/l*21.4%
Simplified21.4%
Taylor expanded in y around inf 90.0%
Final simplification92.7%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))) (if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+297))) (/ z b) t_1)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+297)) {
tmp = z / b;
} else {
tmp = t_1;
}
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)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+297)) {
tmp = z / b;
} 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 <= -math.inf) or not (t_1 <= 2e+297): tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+297)) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 2e+297))) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+297]], $MachinePrecision]], N[(z / b), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 2 \cdot 10^{+297}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\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 2e297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 15.6%
associate-/l*28.7%
associate-/l*28.5%
Simplified28.5%
Taylor expanded in y around inf 88.5%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2e297Initial program 92.9%
Final simplification92.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ (* t (/ x b)) (* y (/ z b))) y))
(t_2 (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))))
(if (<= t -2.9e-18)
t_2
(if (<= t -1.2e-52)
(* z (+ (/ (/ x z) (+ 1.0 (* b (/ y t)))) (/ 1.0 b)))
(if (<= t -1.45e-84)
t_2
(if (<= t -3.5e-196)
t_1
(if (<= t -3e-218)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(if (<= t 7e-212) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((t * (x / b)) + (y * (z / b))) / y;
double t_2 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -2.9e-18) {
tmp = t_2;
} else if (t <= -1.2e-52) {
tmp = z * (((x / z) / (1.0 + (b * (y / t)))) + (1.0 / b));
} else if (t <= -1.45e-84) {
tmp = t_2;
} else if (t <= -3.5e-196) {
tmp = t_1;
} else if (t <= -3e-218) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (t <= 7e-212) {
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 = ((t * (x / b)) + (y * (z / b))) / y
t_2 = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
if (t <= (-2.9d-18)) then
tmp = t_2
else if (t <= (-1.2d-52)) then
tmp = z * (((x / z) / (1.0d0 + (b * (y / t)))) + (1.0d0 / b))
else if (t <= (-1.45d-84)) then
tmp = t_2
else if (t <= (-3.5d-196)) then
tmp = t_1
else if (t <= (-3d-218)) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else if (t <= 7d-212) 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 = ((t * (x / b)) + (y * (z / b))) / y;
double t_2 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -2.9e-18) {
tmp = t_2;
} else if (t <= -1.2e-52) {
tmp = z * (((x / z) / (1.0 + (b * (y / t)))) + (1.0 / b));
} else if (t <= -1.45e-84) {
tmp = t_2;
} else if (t <= -3.5e-196) {
tmp = t_1;
} else if (t <= -3e-218) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (t <= 7e-212) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((t * (x / b)) + (y * (z / b))) / y t_2 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) tmp = 0 if t <= -2.9e-18: tmp = t_2 elif t <= -1.2e-52: tmp = z * (((x / z) / (1.0 + (b * (y / t)))) + (1.0 / b)) elif t <= -1.45e-84: tmp = t_2 elif t <= -3.5e-196: tmp = t_1 elif t <= -3e-218: tmp = (x + (z * (y / t))) / (a + 1.0) elif t <= 7e-212: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y) t_2 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))) tmp = 0.0 if (t <= -2.9e-18) tmp = t_2; elseif (t <= -1.2e-52) tmp = Float64(z * Float64(Float64(Float64(x / z) / Float64(1.0 + Float64(b * Float64(y / t)))) + Float64(1.0 / b))); elseif (t <= -1.45e-84) tmp = t_2; elseif (t <= -3.5e-196) tmp = t_1; elseif (t <= -3e-218) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); elseif (t <= 7e-212) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((t * (x / b)) + (y * (z / b))) / y; t_2 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); tmp = 0.0; if (t <= -2.9e-18) tmp = t_2; elseif (t <= -1.2e-52) tmp = z * (((x / z) / (1.0 + (b * (y / t)))) + (1.0 / b)); elseif (t <= -1.45e-84) tmp = t_2; elseif (t <= -3.5e-196) tmp = t_1; elseif (t <= -3e-218) tmp = (x + (z * (y / t))) / (a + 1.0); elseif (t <= 7e-212) 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[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$2 = 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, -2.9e-18], t$95$2, If[LessEqual[t, -1.2e-52], N[(z * N[(N[(N[(x / z), $MachinePrecision] / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.45e-84], t$95$2, If[LessEqual[t, -3.5e-196], t$95$1, If[LessEqual[t, -3e-218], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7e-212], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\
t_2 := \frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{if}\;t \leq -2.9 \cdot 10^{-18}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.2 \cdot 10^{-52}:\\
\;\;\;\;z \cdot \left(\frac{\frac{x}{z}}{1 + b \cdot \frac{y}{t}} + \frac{1}{b}\right)\\
\mathbf{elif}\;t \leq -1.45 \cdot 10^{-84}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-218}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{elif}\;t \leq 7 \cdot 10^{-212}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.9e-18 or -1.2000000000000001e-52 < t < -1.4500000000000001e-84 or 6.9999999999999995e-212 < t Initial program 88.1%
associate-/l*91.2%
associate-/l*92.8%
Simplified92.8%
if -2.9e-18 < t < -1.2000000000000001e-52Initial program 45.1%
associate-/l*45.0%
associate-/l*37.4%
Simplified37.4%
Taylor expanded in z around inf 69.3%
Taylor expanded in y around inf 93.5%
Taylor expanded in a around 0 93.5%
associate-/r*91.0%
associate-/l*91.0%
Simplified91.0%
if -1.4500000000000001e-84 < t < -3.50000000000000004e-196 or -2.9999999999999998e-218 < t < 6.9999999999999995e-212Initial program 56.6%
associate-/l*43.2%
associate-/l*40.3%
Simplified40.3%
Taylor expanded in b around inf 44.6%
Taylor expanded in y around 0 70.2%
associate-/l*67.4%
associate-/l*73.0%
Simplified73.0%
if -3.50000000000000004e-196 < t < -2.9999999999999998e-218Initial program 100.0%
associate-/l*83.8%
associate-/l*67.1%
Simplified67.1%
Taylor expanded in b around 0 100.0%
*-commutative100.0%
associate-/l*100.0%
Applied egg-rr100.0%
Final simplification87.3%
(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)))))
(t_3 (/ (+ (* t (/ x b)) (* y (/ z b))) y)))
(if (<= t -2.75e-18)
t_2
(if (<= t -3e-50)
(* z (+ (/ (/ x z) (+ 1.0 (* b (/ y t)))) (/ 1.0 b)))
(if (<= t -1.9e-77)
(/ t_1 (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t -4.4e-193)
t_3
(if (<= t -5.8e-219)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(if (<= t 7.4e-211) t_3 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 + 1.0) + (y * (b / t)));
double t_3 = ((t * (x / b)) + (y * (z / b))) / y;
double tmp;
if (t <= -2.75e-18) {
tmp = t_2;
} else if (t <= -3e-50) {
tmp = z * (((x / z) / (1.0 + (b * (y / t)))) + (1.0 / b));
} else if (t <= -1.9e-77) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else if (t <= -4.4e-193) {
tmp = t_3;
} else if (t <= -5.8e-219) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (t <= 7.4e-211) {
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 = x + (y * (z / t))
t_2 = t_1 / ((a + 1.0d0) + (y * (b / t)))
t_3 = ((t * (x / b)) + (y * (z / b))) / y
if (t <= (-2.75d-18)) then
tmp = t_2
else if (t <= (-3d-50)) then
tmp = z * (((x / z) / (1.0d0 + (b * (y / t)))) + (1.0d0 / b))
else if (t <= (-1.9d-77)) then
tmp = t_1 / ((a + 1.0d0) + (y / (t / b)))
else if (t <= (-4.4d-193)) then
tmp = t_3
else if (t <= (-5.8d-219)) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else if (t <= 7.4d-211) 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 = x + (y * (z / t));
double t_2 = t_1 / ((a + 1.0) + (y * (b / t)));
double t_3 = ((t * (x / b)) + (y * (z / b))) / y;
double tmp;
if (t <= -2.75e-18) {
tmp = t_2;
} else if (t <= -3e-50) {
tmp = z * (((x / z) / (1.0 + (b * (y / t)))) + (1.0 / b));
} else if (t <= -1.9e-77) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else if (t <= -4.4e-193) {
tmp = t_3;
} else if (t <= -5.8e-219) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (t <= 7.4e-211) {
tmp = t_3;
} 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 + 1.0) + (y * (b / t))) t_3 = ((t * (x / b)) + (y * (z / b))) / y tmp = 0 if t <= -2.75e-18: tmp = t_2 elif t <= -3e-50: tmp = z * (((x / z) / (1.0 + (b * (y / t)))) + (1.0 / b)) elif t <= -1.9e-77: tmp = t_1 / ((a + 1.0) + (y / (t / b))) elif t <= -4.4e-193: tmp = t_3 elif t <= -5.8e-219: tmp = (x + (z * (y / t))) / (a + 1.0) elif t <= 7.4e-211: tmp = t_3 else: tmp = t_2 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)))) t_3 = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y) tmp = 0.0 if (t <= -2.75e-18) tmp = t_2; elseif (t <= -3e-50) tmp = Float64(z * Float64(Float64(Float64(x / z) / Float64(1.0 + Float64(b * Float64(y / t)))) + Float64(1.0 / b))); elseif (t <= -1.9e-77) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t <= -4.4e-193) tmp = t_3; elseif (t <= -5.8e-219) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); elseif (t <= 7.4e-211) tmp = t_3; 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 + 1.0) + (y * (b / t))); t_3 = ((t * (x / b)) + (y * (z / b))) / y; tmp = 0.0; if (t <= -2.75e-18) tmp = t_2; elseif (t <= -3e-50) tmp = z * (((x / z) / (1.0 + (b * (y / t)))) + (1.0 / b)); elseif (t <= -1.9e-77) tmp = t_1 / ((a + 1.0) + (y / (t / b))); elseif (t <= -4.4e-193) tmp = t_3; elseif (t <= -5.8e-219) tmp = (x + (z * (y / t))) / (a + 1.0); elseif (t <= 7.4e-211) tmp = t_3; else tmp = t_2; 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]}, Block[{t$95$3 = N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -2.75e-18], t$95$2, If[LessEqual[t, -3e-50], N[(z * N[(N[(N[(x / z), $MachinePrecision] / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.9e-77], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -4.4e-193], t$95$3, If[LessEqual[t, -5.8e-219], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.4e-211], t$95$3, t$95$2]]]]]]]]]
\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}}\\
t_3 := \frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\
\mathbf{if}\;t \leq -2.75 \cdot 10^{-18}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3 \cdot 10^{-50}:\\
\;\;\;\;z \cdot \left(\frac{\frac{x}{z}}{1 + b \cdot \frac{y}{t}} + \frac{1}{b}\right)\\
\mathbf{elif}\;t \leq -1.9 \cdot 10^{-77}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t \leq -4.4 \cdot 10^{-193}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-219}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{elif}\;t \leq 7.4 \cdot 10^{-211}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.75e-18 or 7.3999999999999996e-211 < t Initial program 87.9%
associate-/l*91.2%
associate-/l*93.0%
Simplified93.0%
if -2.75e-18 < t < -2.9999999999999999e-50Initial program 45.1%
associate-/l*45.0%
associate-/l*37.4%
Simplified37.4%
Taylor expanded in z around inf 69.3%
Taylor expanded in y around inf 93.5%
Taylor expanded in a around 0 93.5%
associate-/r*91.0%
associate-/l*91.0%
Simplified91.0%
if -2.9999999999999999e-50 < t < -1.8999999999999999e-77Initial program 99.8%
associate-/l*99.8%
associate-/l*99.6%
Simplified99.6%
clear-num62.9%
un-div-inv63.1%
Applied egg-rr99.8%
if -1.8999999999999999e-77 < t < -4.39999999999999953e-193 or -5.79999999999999968e-219 < t < 7.3999999999999996e-211Initial program 56.5%
associate-/l*43.4%
associate-/l*40.6%
Simplified40.6%
Taylor expanded in b around inf 44.8%
Taylor expanded in y around 0 69.8%
associate-/l*67.1%
associate-/l*72.4%
Simplified72.4%
if -4.39999999999999953e-193 < t < -5.79999999999999968e-219Initial program 100.0%
associate-/l*83.8%
associate-/l*67.1%
Simplified67.1%
Taylor expanded in b around 0 100.0%
*-commutative100.0%
associate-/l*100.0%
Applied egg-rr100.0%
Final simplification87.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ a 1.0) (* y (/ b t))))
(t_2 (+ x (* y (/ z t))))
(t_3 (/ (+ (* t (/ x b)) (* y (/ z b))) y)))
(if (<= t -2.75e-18)
(/ t_2 t_1)
(if (<= t -8e-51)
(* z (+ (/ (/ x z) (+ 1.0 (* b (/ y t)))) (/ 1.0 b)))
(if (<= t -1.7e-77)
(/ t_2 (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t -3.5e-196)
t_3
(if (<= t -3.35e-217)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(if (<= t 2.5e-220) t_3 (/ (+ x (/ y (/ t z))) t_1)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + (y * (b / t));
double t_2 = x + (y * (z / t));
double t_3 = ((t * (x / b)) + (y * (z / b))) / y;
double tmp;
if (t <= -2.75e-18) {
tmp = t_2 / t_1;
} else if (t <= -8e-51) {
tmp = z * (((x / z) / (1.0 + (b * (y / t)))) + (1.0 / b));
} else if (t <= -1.7e-77) {
tmp = t_2 / ((a + 1.0) + (y / (t / b)));
} else if (t <= -3.5e-196) {
tmp = t_3;
} else if (t <= -3.35e-217) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (t <= 2.5e-220) {
tmp = t_3;
} else {
tmp = (x + (y / (t / z))) / 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) :: t_3
real(8) :: tmp
t_1 = (a + 1.0d0) + (y * (b / t))
t_2 = x + (y * (z / t))
t_3 = ((t * (x / b)) + (y * (z / b))) / y
if (t <= (-2.75d-18)) then
tmp = t_2 / t_1
else if (t <= (-8d-51)) then
tmp = z * (((x / z) / (1.0d0 + (b * (y / t)))) + (1.0d0 / b))
else if (t <= (-1.7d-77)) then
tmp = t_2 / ((a + 1.0d0) + (y / (t / b)))
else if (t <= (-3.5d-196)) then
tmp = t_3
else if (t <= (-3.35d-217)) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else if (t <= 2.5d-220) then
tmp = t_3
else
tmp = (x + (y / (t / z))) / 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 = (a + 1.0) + (y * (b / t));
double t_2 = x + (y * (z / t));
double t_3 = ((t * (x / b)) + (y * (z / b))) / y;
double tmp;
if (t <= -2.75e-18) {
tmp = t_2 / t_1;
} else if (t <= -8e-51) {
tmp = z * (((x / z) / (1.0 + (b * (y / t)))) + (1.0 / b));
} else if (t <= -1.7e-77) {
tmp = t_2 / ((a + 1.0) + (y / (t / b)));
} else if (t <= -3.5e-196) {
tmp = t_3;
} else if (t <= -3.35e-217) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (t <= 2.5e-220) {
tmp = t_3;
} else {
tmp = (x + (y / (t / z))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + 1.0) + (y * (b / t)) t_2 = x + (y * (z / t)) t_3 = ((t * (x / b)) + (y * (z / b))) / y tmp = 0 if t <= -2.75e-18: tmp = t_2 / t_1 elif t <= -8e-51: tmp = z * (((x / z) / (1.0 + (b * (y / t)))) + (1.0 / b)) elif t <= -1.7e-77: tmp = t_2 / ((a + 1.0) + (y / (t / b))) elif t <= -3.5e-196: tmp = t_3 elif t <= -3.35e-217: tmp = (x + (z * (y / t))) / (a + 1.0) elif t <= 2.5e-220: tmp = t_3 else: tmp = (x + (y / (t / z))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + 1.0) + Float64(y * Float64(b / t))) t_2 = Float64(x + Float64(y * Float64(z / t))) t_3 = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y) tmp = 0.0 if (t <= -2.75e-18) tmp = Float64(t_2 / t_1); elseif (t <= -8e-51) tmp = Float64(z * Float64(Float64(Float64(x / z) / Float64(1.0 + Float64(b * Float64(y / t)))) + Float64(1.0 / b))); elseif (t <= -1.7e-77) tmp = Float64(t_2 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t <= -3.5e-196) tmp = t_3; elseif (t <= -3.35e-217) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); elseif (t <= 2.5e-220) tmp = t_3; else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + 1.0) + (y * (b / t)); t_2 = x + (y * (z / t)); t_3 = ((t * (x / b)) + (y * (z / b))) / y; tmp = 0.0; if (t <= -2.75e-18) tmp = t_2 / t_1; elseif (t <= -8e-51) tmp = z * (((x / z) / (1.0 + (b * (y / t)))) + (1.0 / b)); elseif (t <= -1.7e-77) tmp = t_2 / ((a + 1.0) + (y / (t / b))); elseif (t <= -3.5e-196) tmp = t_3; elseif (t <= -3.35e-217) tmp = (x + (z * (y / t))) / (a + 1.0); elseif (t <= 2.5e-220) tmp = t_3; else tmp = (x + (y / (t / z))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t, -2.75e-18], N[(t$95$2 / t$95$1), $MachinePrecision], If[LessEqual[t, -8e-51], N[(z * N[(N[(N[(x / z), $MachinePrecision] / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.7e-77], N[(t$95$2 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.5e-196], t$95$3, If[LessEqual[t, -3.35e-217], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.5e-220], t$95$3, N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + 1\right) + y \cdot \frac{b}{t}\\
t_2 := x + y \cdot \frac{z}{t}\\
t_3 := \frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\
\mathbf{if}\;t \leq -2.75 \cdot 10^{-18}:\\
\;\;\;\;\frac{t\_2}{t\_1}\\
\mathbf{elif}\;t \leq -8 \cdot 10^{-51}:\\
\;\;\;\;z \cdot \left(\frac{\frac{x}{z}}{1 + b \cdot \frac{y}{t}} + \frac{1}{b}\right)\\
\mathbf{elif}\;t \leq -1.7 \cdot 10^{-77}:\\
\;\;\;\;\frac{t\_2}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t \leq -3.5 \cdot 10^{-196}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq -3.35 \cdot 10^{-217}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{elif}\;t \leq 2.5 \cdot 10^{-220}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{t\_1}\\
\end{array}
\end{array}
if t < -2.75e-18Initial program 90.3%
associate-/l*97.1%
associate-/l*97.1%
Simplified97.1%
if -2.75e-18 < t < -8.0000000000000001e-51Initial program 45.1%
associate-/l*45.0%
associate-/l*37.4%
Simplified37.4%
Taylor expanded in z around inf 69.3%
Taylor expanded in y around inf 93.5%
Taylor expanded in a around 0 93.5%
associate-/r*91.0%
associate-/l*91.0%
Simplified91.0%
if -8.0000000000000001e-51 < t < -1.69999999999999991e-77Initial program 99.8%
associate-/l*99.8%
associate-/l*99.6%
Simplified99.6%
clear-num62.9%
un-div-inv63.1%
Applied egg-rr99.8%
if -1.69999999999999991e-77 < t < -3.50000000000000004e-196 or -3.35e-217 < t < 2.5000000000000001e-220Initial program 56.5%
associate-/l*43.4%
associate-/l*40.6%
Simplified40.6%
Taylor expanded in b around inf 44.8%
Taylor expanded in y around 0 69.8%
associate-/l*67.1%
associate-/l*72.4%
Simplified72.4%
if -3.50000000000000004e-196 < t < -3.35e-217Initial program 100.0%
associate-/l*83.8%
associate-/l*67.1%
Simplified67.1%
Taylor expanded in b around 0 100.0%
*-commutative100.0%
associate-/l*100.0%
Applied egg-rr100.0%
if 2.5000000000000001e-220 < t Initial program 86.0%
associate-/l*86.4%
associate-/l*89.6%
Simplified89.6%
clear-num89.6%
un-div-inv90.8%
Applied egg-rr90.8%
Final simplification87.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.95e-16)
(/ (+ x (* y (/ z t))) (+ a 1.0))
(if (<= t -3.6e-195)
(* z (+ (/ (/ x z) (+ 1.0 (* b (/ y t)))) (/ 1.0 b)))
(if (<= t -2.1e-218)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(if (<= t 3.8e-224)
(/ (+ (* t (/ x b)) (* y (/ z b))) y)
(if (<= t 4.7e-37)
(/ (* y z) (* t (+ 1.0 (+ a (/ (* y b) t)))))
(/ 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.95e-16) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (t <= -3.6e-195) {
tmp = z * (((x / z) / (1.0 + (b * (y / t)))) + (1.0 / b));
} else if (t <= -2.1e-218) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (t <= 3.8e-224) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (t <= 4.7e-37) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} 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.95d-16)) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
else if (t <= (-3.6d-195)) then
tmp = z * (((x / z) / (1.0d0 + (b * (y / t)))) + (1.0d0 / b))
else if (t <= (-2.1d-218)) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else if (t <= 3.8d-224) then
tmp = ((t * (x / b)) + (y * (z / b))) / y
else if (t <= 4.7d-37) then
tmp = (y * z) / (t * (1.0d0 + (a + ((y * b) / t))))
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.95e-16) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else if (t <= -3.6e-195) {
tmp = z * (((x / z) / (1.0 + (b * (y / t)))) + (1.0 / b));
} else if (t <= -2.1e-218) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (t <= 3.8e-224) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (t <= 4.7e-37) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else {
tmp = x / (1.0 + (a + (y * (b / t))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.95e-16: tmp = (x + (y * (z / t))) / (a + 1.0) elif t <= -3.6e-195: tmp = z * (((x / z) / (1.0 + (b * (y / t)))) + (1.0 / b)) elif t <= -2.1e-218: tmp = (x + (z * (y / t))) / (a + 1.0) elif t <= 3.8e-224: tmp = ((t * (x / b)) + (y * (z / b))) / y elif t <= 4.7e-37: tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))) 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.95e-16) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); elseif (t <= -3.6e-195) tmp = Float64(z * Float64(Float64(Float64(x / z) / Float64(1.0 + Float64(b * Float64(y / t)))) + Float64(1.0 / b))); elseif (t <= -2.1e-218) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); elseif (t <= 3.8e-224) tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y); elseif (t <= 4.7e-37) tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))))); else tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y * Float64(b / t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.95e-16) tmp = (x + (y * (z / t))) / (a + 1.0); elseif (t <= -3.6e-195) tmp = z * (((x / z) / (1.0 + (b * (y / t)))) + (1.0 / b)); elseif (t <= -2.1e-218) tmp = (x + (z * (y / t))) / (a + 1.0); elseif (t <= 3.8e-224) tmp = ((t * (x / b)) + (y * (z / b))) / y; elseif (t <= 4.7e-37) tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))); 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.95e-16], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.6e-195], N[(z * N[(N[(N[(x / z), $MachinePrecision] / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.1e-218], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e-224], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t, 4.7e-37], N[(N[(y * z), $MachinePrecision] / N[(t * N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.95 \cdot 10^{-16}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{elif}\;t \leq -3.6 \cdot 10^{-195}:\\
\;\;\;\;z \cdot \left(\frac{\frac{x}{z}}{1 + b \cdot \frac{y}{t}} + \frac{1}{b}\right)\\
\mathbf{elif}\;t \leq -2.1 \cdot 10^{-218}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-224}:\\
\;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\
\mathbf{elif}\;t \leq 4.7 \cdot 10^{-37}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\end{array}
\end{array}
if t < -2.95000000000000011e-16Initial program 90.3%
associate-/l*97.1%
associate-/l*97.1%
Simplified97.1%
Taylor expanded in y around 0 80.8%
if -2.95000000000000011e-16 < t < -3.6e-195Initial program 60.4%
associate-/l*53.2%
associate-/l*49.5%
Simplified49.5%
Taylor expanded in z around inf 65.8%
Taylor expanded in y around inf 71.6%
Taylor expanded in a around 0 69.8%
associate-/r*70.7%
associate-/l*70.6%
Simplified70.6%
if -3.6e-195 < t < -2.09999999999999994e-218Initial program 100.0%
associate-/l*83.8%
associate-/l*67.1%
Simplified67.1%
Taylor expanded in b around 0 100.0%
*-commutative100.0%
associate-/l*100.0%
Applied egg-rr100.0%
if -2.09999999999999994e-218 < t < 3.80000000000000002e-224Initial program 56.4%
associate-/l*42.0%
associate-/l*39.3%
Simplified39.3%
Taylor expanded in b around inf 48.9%
Taylor expanded in y around 0 78.0%
associate-/l*73.0%
associate-/l*75.5%
Simplified75.5%
if 3.80000000000000002e-224 < t < 4.7000000000000003e-37Initial program 85.7%
associate-/l*83.4%
associate-/l*79.4%
Simplified79.4%
Taylor expanded in x around 0 73.4%
if 4.7000000000000003e-37 < t Initial program 86.1%
associate-/l*87.6%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in x around inf 75.3%
associate-*l/79.8%
*-commutative79.8%
Simplified79.8%
Final simplification77.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* z (/ y t))) (+ a 1.0))))
(if (<= y -4.3e+81)
(/ (+ (* t (/ x b)) (* y (/ z b))) y)
(if (<= y -2.8e-71)
t_1
(if (<= y -8.8e-92)
(/ (* y z) (* t (+ 1.0 (+ a (/ (* y b) t)))))
(if (<= y 2.4e-137)
t_1
(if (<= y 5.8e+92) (/ x (+ 1.0 (+ a (/ y (/ t b))))) (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z * (y / t))) / (a + 1.0);
double tmp;
if (y <= -4.3e+81) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (y <= -2.8e-71) {
tmp = t_1;
} else if (y <= -8.8e-92) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (y <= 2.4e-137) {
tmp = t_1;
} else if (y <= 5.8e+92) {
tmp = x / (1.0 + (a + (y / (t / b))));
} 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 + (z * (y / t))) / (a + 1.0d0)
if (y <= (-4.3d+81)) then
tmp = ((t * (x / b)) + (y * (z / b))) / y
else if (y <= (-2.8d-71)) then
tmp = t_1
else if (y <= (-8.8d-92)) then
tmp = (y * z) / (t * (1.0d0 + (a + ((y * b) / t))))
else if (y <= 2.4d-137) then
tmp = t_1
else if (y <= 5.8d+92) then
tmp = x / (1.0d0 + (a + (y / (t / b))))
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 + (z * (y / t))) / (a + 1.0);
double tmp;
if (y <= -4.3e+81) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (y <= -2.8e-71) {
tmp = t_1;
} else if (y <= -8.8e-92) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (y <= 2.4e-137) {
tmp = t_1;
} else if (y <= 5.8e+92) {
tmp = x / (1.0 + (a + (y / (t / b))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (z * (y / t))) / (a + 1.0) tmp = 0 if y <= -4.3e+81: tmp = ((t * (x / b)) + (y * (z / b))) / y elif y <= -2.8e-71: tmp = t_1 elif y <= -8.8e-92: tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))) elif y <= 2.4e-137: tmp = t_1 elif y <= 5.8e+92: tmp = x / (1.0 + (a + (y / (t / b)))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)) tmp = 0.0 if (y <= -4.3e+81) tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y); elseif (y <= -2.8e-71) tmp = t_1; elseif (y <= -8.8e-92) tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))))); elseif (y <= 2.4e-137) tmp = t_1; elseif (y <= 5.8e+92) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y / Float64(t / b))))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (z * (y / t))) / (a + 1.0); tmp = 0.0; if (y <= -4.3e+81) tmp = ((t * (x / b)) + (y * (z / b))) / y; elseif (y <= -2.8e-71) tmp = t_1; elseif (y <= -8.8e-92) tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))); elseif (y <= 2.4e-137) tmp = t_1; elseif (y <= 5.8e+92) tmp = x / (1.0 + (a + (y / (t / b)))); else tmp = z / b; 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] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.3e+81], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, -2.8e-71], t$95$1, If[LessEqual[y, -8.8e-92], 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[y, 2.4e-137], t$95$1, If[LessEqual[y, 5.8e+92], N[(x / N[(1.0 + N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{if}\;y \leq -4.3 \cdot 10^{+81}:\\
\;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-71}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -8.8 \cdot 10^{-92}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{-137}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{+92}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -4.3000000000000001e81Initial program 55.6%
associate-/l*60.7%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in b around inf 51.7%
Taylor expanded in y around 0 58.3%
associate-/l*58.3%
associate-/l*70.9%
Simplified70.9%
if -4.3000000000000001e81 < y < -2.8e-71 or -8.79999999999999949e-92 < y < 2.4e-137Initial program 95.0%
associate-/l*85.7%
associate-/l*82.1%
Simplified82.1%
Taylor expanded in b around 0 79.3%
*-commutative79.3%
associate-/l*80.4%
Applied egg-rr80.4%
if -2.8e-71 < y < -8.79999999999999949e-92Initial program 56.6%
associate-/l*56.6%
associate-/l*55.8%
Simplified55.8%
Taylor expanded in x around 0 73.7%
if 2.4e-137 < y < 5.8000000000000001e92Initial program 85.8%
associate-/l*87.8%
associate-/l*85.7%
Simplified85.7%
Taylor expanded in x around inf 79.8%
associate-*l/79.8%
*-commutative79.8%
Simplified79.8%
clear-num79.8%
un-div-inv79.9%
Applied egg-rr79.9%
if 5.8000000000000001e92 < y Initial program 51.1%
associate-/l*53.8%
associate-/l*56.6%
Simplified56.6%
Taylor expanded in y around inf 69.1%
Final simplification76.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (/ y t))))
(if (<= y -5.5e+243)
(/ (+ (* t (/ x b)) (* y (/ z b))) y)
(if (or (<= y -3.7e+84) (not (<= y 8.6e+101)))
(* z (+ (/ (/ x z) (+ 1.0 t_1)) (/ 1.0 b)))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (y / t);
double tmp;
if (y <= -5.5e+243) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if ((y <= -3.7e+84) || !(y <= 8.6e+101)) {
tmp = z * (((x / z) / (1.0 + t_1)) + (1.0 / b));
} else {
tmp = (x + ((y * z) / t)) / ((a + 1.0) + 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 = b * (y / t)
if (y <= (-5.5d+243)) then
tmp = ((t * (x / b)) + (y * (z / b))) / y
else if ((y <= (-3.7d+84)) .or. (.not. (y <= 8.6d+101))) then
tmp = z * (((x / z) / (1.0d0 + t_1)) + (1.0d0 / b))
else
tmp = (x + ((y * z) / t)) / ((a + 1.0d0) + 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 = b * (y / t);
double tmp;
if (y <= -5.5e+243) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if ((y <= -3.7e+84) || !(y <= 8.6e+101)) {
tmp = z * (((x / z) / (1.0 + t_1)) + (1.0 / b));
} else {
tmp = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (y / t) tmp = 0 if y <= -5.5e+243: tmp = ((t * (x / b)) + (y * (z / b))) / y elif (y <= -3.7e+84) or not (y <= 8.6e+101): tmp = z * (((x / z) / (1.0 + t_1)) + (1.0 / b)) else: tmp = (x + ((y * z) / t)) / ((a + 1.0) + t_1) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(y / t)) tmp = 0.0 if (y <= -5.5e+243) tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y); elseif ((y <= -3.7e+84) || !(y <= 8.6e+101)) tmp = Float64(z * Float64(Float64(Float64(x / z) / Float64(1.0 + t_1)) + Float64(1.0 / b))); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + t_1)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (y / t); tmp = 0.0; if (y <= -5.5e+243) tmp = ((t * (x / b)) + (y * (z / b))) / y; elseif ((y <= -3.7e+84) || ~((y <= 8.6e+101))) tmp = z * (((x / z) / (1.0 + t_1)) + (1.0 / b)); else tmp = (x + ((y * z) / t)) / ((a + 1.0) + t_1); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.5e+243], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[Or[LessEqual[y, -3.7e+84], N[Not[LessEqual[y, 8.6e+101]], $MachinePrecision]], N[(z * N[(N[(N[(x / z), $MachinePrecision] / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision] + N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \frac{y}{t}\\
\mathbf{if}\;y \leq -5.5 \cdot 10^{+243}:\\
\;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\
\mathbf{elif}\;y \leq -3.7 \cdot 10^{+84} \lor \neg \left(y \leq 8.6 \cdot 10^{+101}\right):\\
\;\;\;\;z \cdot \left(\frac{\frac{x}{z}}{1 + t\_1} + \frac{1}{b}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + t\_1}\\
\end{array}
\end{array}
if y < -5.50000000000000003e243Initial program 36.2%
associate-/l*36.2%
associate-/l*50.4%
Simplified50.4%
Taylor expanded in b around inf 49.6%
Taylor expanded in y around 0 54.7%
associate-/l*62.2%
associate-/l*69.7%
Simplified69.7%
if -5.50000000000000003e243 < y < -3.7e84 or 8.6000000000000002e101 < y Initial program 56.3%
associate-/l*61.3%
associate-/l*63.9%
Simplified63.9%
Taylor expanded in z around inf 68.4%
Taylor expanded in y around inf 81.7%
Taylor expanded in a around 0 80.4%
associate-/r*77.7%
associate-/l*80.2%
Simplified80.2%
if -3.7e84 < y < 8.6000000000000002e101Initial program 89.9%
*-commutative89.9%
associate-/l*89.3%
Applied egg-rr89.3%
Final simplification85.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -3.5e+79)
(/ z b)
(if (<= y 4e-142)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(if (<= y 3.8e+89) (/ x (+ 1.0 (+ a (/ y (/ t b))))) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.5e+79) {
tmp = z / b;
} else if (y <= 4e-142) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (y <= 3.8e+89) {
tmp = x / (1.0 + (a + (y / (t / b))));
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-3.5d+79)) then
tmp = z / b
else if (y <= 4d-142) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else if (y <= 3.8d+89) then
tmp = x / (1.0d0 + (a + (y / (t / b))))
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.5e+79) {
tmp = z / b;
} else if (y <= 4e-142) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (y <= 3.8e+89) {
tmp = x / (1.0 + (a + (y / (t / b))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.5e+79: tmp = z / b elif y <= 4e-142: tmp = (x + (z * (y / t))) / (a + 1.0) elif y <= 3.8e+89: tmp = x / (1.0 + (a + (y / (t / b)))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.5e+79) tmp = Float64(z / b); elseif (y <= 4e-142) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); elseif (y <= 3.8e+89) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y / Float64(t / b))))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.5e+79) tmp = z / b; elseif (y <= 4e-142) tmp = (x + (z * (y / t))) / (a + 1.0); elseif (y <= 3.8e+89) tmp = x / (1.0 + (a + (y / (t / b)))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.5e+79], N[(z / b), $MachinePrecision], If[LessEqual[y, 4e-142], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e+89], N[(x / N[(1.0 + N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.5 \cdot 10^{+79}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-142}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+89}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -3.4999999999999998e79 or 3.80000000000000023e89 < y Initial program 53.9%
associate-/l*58.1%
associate-/l*62.3%
Simplified62.3%
Taylor expanded in y around inf 68.6%
if -3.4999999999999998e79 < y < 4.0000000000000002e-142Initial program 91.5%
associate-/l*83.0%
associate-/l*79.7%
Simplified79.7%
Taylor expanded in b around 0 75.4%
*-commutative75.4%
associate-/l*76.4%
Applied egg-rr76.4%
if 4.0000000000000002e-142 < y < 3.80000000000000023e89Initial program 85.8%
associate-/l*87.8%
associate-/l*85.7%
Simplified85.7%
Taylor expanded in x around inf 79.8%
associate-*l/79.8%
*-commutative79.8%
Simplified79.8%
clear-num79.8%
un-div-inv79.9%
Applied egg-rr79.9%
Final simplification74.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.08e+80)
(/ (+ (* t (/ x b)) (* y (/ z b))) y)
(if (<= y 7.4e-137)
(/ (+ x (* z (/ y t))) (+ a 1.0))
(if (<= y 1.5e+94) (/ x (+ 1.0 (+ a (/ y (/ t b))))) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.08e+80) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (y <= 7.4e-137) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (y <= 1.5e+94) {
tmp = x / (1.0 + (a + (y / (t / b))));
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.08d+80)) then
tmp = ((t * (x / b)) + (y * (z / b))) / y
else if (y <= 7.4d-137) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else if (y <= 1.5d+94) then
tmp = x / (1.0d0 + (a + (y / (t / b))))
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.08e+80) {
tmp = ((t * (x / b)) + (y * (z / b))) / y;
} else if (y <= 7.4e-137) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else if (y <= 1.5e+94) {
tmp = x / (1.0 + (a + (y / (t / b))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.08e+80: tmp = ((t * (x / b)) + (y * (z / b))) / y elif y <= 7.4e-137: tmp = (x + (z * (y / t))) / (a + 1.0) elif y <= 1.5e+94: tmp = x / (1.0 + (a + (y / (t / b)))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.08e+80) tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y); elseif (y <= 7.4e-137) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); elseif (y <= 1.5e+94) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y / Float64(t / b))))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -1.08e+80) tmp = ((t * (x / b)) + (y * (z / b))) / y; elseif (y <= 7.4e-137) tmp = (x + (z * (y / t))) / (a + 1.0); elseif (y <= 1.5e+94) tmp = x / (1.0 + (a + (y / (t / b)))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.08e+80], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[y, 7.4e-137], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.5e+94], N[(x / N[(1.0 + N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.08 \cdot 10^{+80}:\\
\;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\
\mathbf{elif}\;y \leq 7.4 \cdot 10^{-137}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 1.5 \cdot 10^{+94}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -1.08e80Initial program 55.6%
associate-/l*60.7%
associate-/l*65.9%
Simplified65.9%
Taylor expanded in b around inf 51.7%
Taylor expanded in y around 0 58.3%
associate-/l*58.3%
associate-/l*70.9%
Simplified70.9%
if -1.08e80 < y < 7.4e-137Initial program 91.5%
associate-/l*83.0%
associate-/l*79.7%
Simplified79.7%
Taylor expanded in b around 0 75.4%
*-commutative75.4%
associate-/l*76.4%
Applied egg-rr76.4%
if 7.4e-137 < y < 1.5e94Initial program 85.8%
associate-/l*87.8%
associate-/l*85.7%
Simplified85.7%
Taylor expanded in x around inf 79.8%
associate-*l/79.8%
*-commutative79.8%
Simplified79.8%
clear-num79.8%
un-div-inv79.9%
Applied egg-rr79.9%
if 1.5e94 < y Initial program 51.1%
associate-/l*53.8%
associate-/l*56.6%
Simplified56.6%
Taylor expanded in y around inf 69.1%
Final simplification74.9%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -3.8e+212)
x
(if (<= t -2.7e+144)
(/ x a)
(if (<= t -5.8e-16) x (if (<= t 8e-8) (/ z b) (/ x a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.8e+212) {
tmp = x;
} else if (t <= -2.7e+144) {
tmp = x / a;
} else if (t <= -5.8e-16) {
tmp = x;
} else if (t <= 8e-8) {
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 (t <= (-3.8d+212)) then
tmp = x
else if (t <= (-2.7d+144)) then
tmp = x / a
else if (t <= (-5.8d-16)) then
tmp = x
else if (t <= 8d-8) 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 (t <= -3.8e+212) {
tmp = x;
} else if (t <= -2.7e+144) {
tmp = x / a;
} else if (t <= -5.8e-16) {
tmp = x;
} else if (t <= 8e-8) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -3.8e+212: tmp = x elif t <= -2.7e+144: tmp = x / a elif t <= -5.8e-16: tmp = x elif t <= 8e-8: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3.8e+212) tmp = x; elseif (t <= -2.7e+144) tmp = Float64(x / a); elseif (t <= -5.8e-16) tmp = x; elseif (t <= 8e-8) 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 (t <= -3.8e+212) tmp = x; elseif (t <= -2.7e+144) tmp = x / a; elseif (t <= -5.8e-16) tmp = x; elseif (t <= 8e-8) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3.8e+212], x, If[LessEqual[t, -2.7e+144], N[(x / a), $MachinePrecision], If[LessEqual[t, -5.8e-16], x, If[LessEqual[t, 8e-8], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{+212}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq -2.7 \cdot 10^{+144}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-16}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 8 \cdot 10^{-8}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if t < -3.79999999999999988e212 or -2.70000000000000015e144 < t < -5.7999999999999996e-16Initial program 88.4%
associate-/l*97.9%
associate-/l*98.0%
Simplified98.0%
Taylor expanded in y around 0 73.2%
Taylor expanded in a around 0 51.8%
if -3.79999999999999988e212 < t < -2.70000000000000015e144 or 8.0000000000000002e-8 < t Initial program 88.5%
associate-/l*91.1%
associate-/l*96.0%
Simplified96.0%
Taylor expanded in x around inf 74.8%
associate-*l/78.4%
*-commutative78.4%
Simplified78.4%
Taylor expanded in a around inf 44.9%
if -5.7999999999999996e-16 < t < 8.0000000000000002e-8Initial program 67.0%
associate-/l*57.7%
associate-/l*53.9%
Simplified53.9%
Taylor expanded in y around inf 56.9%
Final simplification52.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.4e-18) (not (<= t 4.5e-37))) (/ x (+ 1.0 (+ a (* y (/ b t))))) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.4e-18) || !(t <= 4.5e-37)) {
tmp = x / (1.0 + (a + (y * (b / t))));
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-4.4d-18)) .or. (.not. (t <= 4.5d-37))) then
tmp = x / (1.0d0 + (a + (y * (b / t))))
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.4e-18) || !(t <= 4.5e-37)) {
tmp = x / (1.0 + (a + (y * (b / t))));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.4e-18) or not (t <= 4.5e-37): tmp = x / (1.0 + (a + (y * (b / t)))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.4e-18) || !(t <= 4.5e-37)) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y * Float64(b / t))))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -4.4e-18) || ~((t <= 4.5e-37))) tmp = x / (1.0 + (a + (y * (b / t)))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4.4e-18], N[Not[LessEqual[t, 4.5e-37]], $MachinePrecision]], N[(x / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{-18} \lor \neg \left(t \leq 4.5 \cdot 10^{-37}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -4.3999999999999997e-18 or 4.5000000000000004e-37 < t Initial program 88.3%
associate-/l*92.7%
associate-/l*95.5%
Simplified95.5%
Taylor expanded in x around inf 76.9%
associate-*l/79.0%
*-commutative79.0%
Simplified79.0%
if -4.3999999999999997e-18 < t < 4.5000000000000004e-37Initial program 65.9%
associate-/l*56.9%
associate-/l*52.9%
Simplified52.9%
Taylor expanded in y around inf 58.3%
Final simplification69.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.05e+83) (not (<= y 9.5e+91))) (/ z 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 ((y <= -2.05e+83) || !(y <= 9.5e+91)) {
tmp = z / 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 ((y <= (-2.05d+83)) .or. (.not. (y <= 9.5d+91))) then
tmp = z / 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 ((y <= -2.05e+83) || !(y <= 9.5e+91)) {
tmp = z / b;
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.05e+83) or not (y <= 9.5e+91): tmp = z / b else: tmp = x / (1.0 + (a + ((y * b) / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.05e+83) || !(y <= 9.5e+91)) tmp = Float64(z / 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 ((y <= -2.05e+83) || ~((y <= 9.5e+91))) tmp = z / b; else tmp = x / (1.0 + (a + ((y * b) / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -2.05e+83], N[Not[LessEqual[y, 9.5e+91]], $MachinePrecision]], N[(z / 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}\;y \leq -2.05 \cdot 10^{+83} \lor \neg \left(y \leq 9.5 \cdot 10^{+91}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\end{array}
\end{array}
if y < -2.05e83 or 9.5000000000000001e91 < y Initial program 53.3%
associate-/l*57.6%
associate-/l*61.9%
Simplified61.9%
Taylor expanded in y around inf 68.3%
if -2.05e83 < y < 9.5000000000000001e91Initial program 89.9%
associate-/l*84.5%
associate-/l*81.5%
Simplified81.5%
Taylor expanded in x around inf 73.1%
Final simplification71.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.2e-16) (/ x (+ 1.0 (+ a (/ y (/ t b))))) (if (<= t 6.8e-36) (/ z 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 <= -1.2e-16) {
tmp = x / (1.0 + (a + (y / (t / b))));
} else if (t <= 6.8e-36) {
tmp = z / 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 <= (-1.2d-16)) then
tmp = x / (1.0d0 + (a + (y / (t / b))))
else if (t <= 6.8d-36) then
tmp = z / 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 <= -1.2e-16) {
tmp = x / (1.0 + (a + (y / (t / b))));
} else if (t <= 6.8e-36) {
tmp = z / b;
} else {
tmp = x / (1.0 + (a + (y * (b / t))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.2e-16: tmp = x / (1.0 + (a + (y / (t / b)))) elif t <= 6.8e-36: tmp = z / 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 <= -1.2e-16) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y / Float64(t / b))))); elseif (t <= 6.8e-36) tmp = Float64(z / b); else tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y * Float64(b / t))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.2e-16) tmp = x / (1.0 + (a + (y / (t / b)))); elseif (t <= 6.8e-36) tmp = z / 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, -1.2e-16], N[(x / N[(1.0 + N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.8e-36], N[(z / b), $MachinePrecision], N[(x / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.2 \cdot 10^{-16}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{elif}\;t \leq 6.8 \cdot 10^{-36}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\end{array}
\end{array}
if t < -1.20000000000000002e-16Initial program 90.3%
associate-/l*97.1%
associate-/l*97.1%
Simplified97.1%
Taylor expanded in x around inf 78.3%
associate-*l/78.3%
*-commutative78.3%
Simplified78.3%
clear-num78.3%
un-div-inv78.4%
Applied egg-rr78.4%
if -1.20000000000000002e-16 < t < 6.8000000000000005e-36Initial program 65.9%
associate-/l*56.9%
associate-/l*52.9%
Simplified52.9%
Taylor expanded in y around inf 58.3%
if 6.8000000000000005e-36 < t Initial program 86.1%
associate-/l*87.6%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in x around inf 75.3%
associate-*l/79.8%
*-commutative79.8%
Simplified79.8%
Final simplification69.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -3.5e-18) (not (<= t 1.35e-35))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3.5e-18) || !(t <= 1.35e-35)) {
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 <= (-3.5d-18)) .or. (.not. (t <= 1.35d-35))) 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 <= -3.5e-18) || !(t <= 1.35e-35)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -3.5e-18) or not (t <= 1.35e-35): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -3.5e-18) || !(t <= 1.35e-35)) 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 <= -3.5e-18) || ~((t <= 1.35e-35))) 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, -3.5e-18], N[Not[LessEqual[t, 1.35e-35]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.5 \cdot 10^{-18} \lor \neg \left(t \leq 1.35 \cdot 10^{-35}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -3.4999999999999999e-18 or 1.3499999999999999e-35 < t Initial program 88.3%
associate-/l*92.7%
associate-/l*95.5%
Simplified95.5%
Taylor expanded in y around 0 69.5%
if -3.4999999999999999e-18 < t < 1.3499999999999999e-35Initial program 65.9%
associate-/l*56.9%
associate-/l*52.9%
Simplified52.9%
Taylor expanded in y around inf 58.3%
Final simplification64.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4e-15) (not (<= a 2.1e-9))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4e-15) || !(a <= 2.1e-9)) {
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 <= (-4d-15)) .or. (.not. (a <= 2.1d-9))) 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 <= -4e-15) || !(a <= 2.1e-9)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4e-15) or not (a <= 2.1e-9): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4e-15) || !(a <= 2.1e-9)) 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 <= -4e-15) || ~((a <= 2.1e-9))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4e-15], N[Not[LessEqual[a, 2.1e-9]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{-15} \lor \neg \left(a \leq 2.1 \cdot 10^{-9}\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -4.0000000000000003e-15 or 2.10000000000000019e-9 < a Initial program 75.1%
associate-/l*72.2%
associate-/l*70.6%
Simplified70.6%
Taylor expanded in x around inf 54.9%
associate-*l/53.3%
*-commutative53.3%
Simplified53.3%
Taylor expanded in a around inf 44.6%
if -4.0000000000000003e-15 < a < 2.10000000000000019e-9Initial program 79.8%
associate-/l*78.3%
associate-/l*78.9%
Simplified78.9%
Taylor expanded in y around 0 40.3%
Taylor expanded in a around 0 40.2%
Final simplification42.4%
(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 77.5%
associate-/l*75.3%
associate-/l*74.8%
Simplified74.8%
Taylor expanded in y around 0 43.0%
Taylor expanded in a around 0 22.6%
Final simplification22.6%
(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 2024060
(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))))