
(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 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))
(t_2 (+ 1.0 (+ a (* b (/ y t)))))
(t_3 (+ (/ x t_2) (* (/ y t) (/ z t_2)))))
(if (<= t_1 (- INFINITY))
t_3
(if (<= t_1 -1e-297)
t_1
(if (<= t_1 0.0)
(+ (/ z b) (/ (* t (- (/ x b) (/ (* z (+ a 1.0)) (pow b 2.0)))) y))
(if (<= t_1 7.2e+255) t_1 (if (<= t_1 INFINITY) t_3 (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double t_2 = 1.0 + (a + (b * (y / t)));
double t_3 = (x / t_2) + ((y / t) * (z / t_2));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_1 <= -1e-297) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z / b) + ((t * ((x / b) - ((z * (a + 1.0)) / pow(b, 2.0)))) / y);
} else if (t_1 <= 7.2e+255) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double t_2 = 1.0 + (a + (b * (y / t)));
double t_3 = (x / t_2) + ((y / t) * (z / t_2));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if (t_1 <= -1e-297) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z / b) + ((t * ((x / b) - ((z * (a + 1.0)) / Math.pow(b, 2.0)))) / y);
} else if (t_1 <= 7.2e+255) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) t_2 = 1.0 + (a + (b * (y / t))) t_3 = (x / t_2) + ((y / t) * (z / t_2)) tmp = 0 if t_1 <= -math.inf: tmp = t_3 elif t_1 <= -1e-297: tmp = t_1 elif t_1 <= 0.0: tmp = (z / b) + ((t * ((x / b) - ((z * (a + 1.0)) / math.pow(b, 2.0)))) / y) elif t_1 <= 7.2e+255: tmp = t_1 elif t_1 <= math.inf: tmp = t_3 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) t_2 = Float64(1.0 + Float64(a + Float64(b * Float64(y / t)))) t_3 = Float64(Float64(x / t_2) + Float64(Float64(y / t) * Float64(z / t_2))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_3; elseif (t_1 <= -1e-297) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(z / b) + Float64(Float64(t * Float64(Float64(x / b) - Float64(Float64(z * Float64(a + 1.0)) / (b ^ 2.0)))) / y)); elseif (t_1 <= 7.2e+255) tmp = t_1; elseif (t_1 <= Inf) tmp = t_3; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)); t_2 = 1.0 + (a + (b * (y / t))); t_3 = (x / t_2) + ((y / t) * (z / t_2)); tmp = 0.0; if (t_1 <= -Inf) tmp = t_3; elseif (t_1 <= -1e-297) tmp = t_1; elseif (t_1 <= 0.0) tmp = (z / b) + ((t * ((x / b) - ((z * (a + 1.0)) / (b ^ 2.0)))) / y); elseif (t_1 <= 7.2e+255) tmp = t_1; elseif (t_1 <= Inf) tmp = t_3; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x / t$95$2), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * N[(z / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$3, If[LessEqual[t$95$1, -1e-297], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(t * N[(N[(x / b), $MachinePrecision] - N[(N[(z * N[(a + 1.0), $MachinePrecision]), $MachinePrecision] / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 7.2e+255], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$3, N[(z / b), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_2 := 1 + \left(a + b \cdot \frac{y}{t}\right)\\
t_3 := \frac{x}{t\_2} + \frac{y}{t} \cdot \frac{z}{t\_2}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-297}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot \left(\frac{x}{b} - \frac{z \cdot \left(a + 1\right)}{{b}^{2}}\right)}{y}\\
\mathbf{elif}\;t\_1 \leq 7.2 \cdot 10^{+255}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0 or 7.1999999999999998e255 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 36.7%
*-commutative36.7%
associate-/l*70.9%
Applied egg-rr70.9%
+-commutative70.9%
*-commutative70.9%
fma-define70.9%
Applied egg-rr70.9%
Taylor expanded in z around 0 55.6%
associate-/l*55.6%
times-frac97.2%
associate-/l*86.8%
Simplified86.8%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.00000000000000004e-297 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 7.1999999999999998e255Initial program 99.0%
if -1.00000000000000004e-297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 0.0Initial program 50.0%
associate-/l*52.2%
associate-/l*75.9%
Simplified75.9%
Taylor expanded in y around -inf 66.5%
+-commutative66.5%
associate-*r/66.5%
Simplified80.0%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.4%
associate-/l*8.1%
Simplified8.1%
Taylor expanded in y around inf 96.0%
Final simplification93.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))
(t_2 (+ 1.0 (+ a (* b (/ y t)))))
(t_3 (+ (/ x t_2) (* (/ y t) (/ z t_2)))))
(if (<= t_1 (- INFINITY))
t_3
(if (<= t_1 -1e-290)
t_1
(if (<= t_1 2e-222)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t_1 7.2e+255) t_1 (if (<= t_1 INFINITY) t_3 (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double t_2 = 1.0 + (a + (b * (y / t)));
double t_3 = (x / t_2) + ((y / t) * (z / t_2));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_1 <= -1e-290) {
tmp = t_1;
} else if (t_1 <= 2e-222) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else if (t_1 <= 7.2e+255) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_3;
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double t_2 = 1.0 + (a + (b * (y / t)));
double t_3 = (x / t_2) + ((y / t) * (z / t_2));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if (t_1 <= -1e-290) {
tmp = t_1;
} else if (t_1 <= 2e-222) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else if (t_1 <= 7.2e+255) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) t_2 = 1.0 + (a + (b * (y / t))) t_3 = (x / t_2) + ((y / t) * (z / t_2)) tmp = 0 if t_1 <= -math.inf: tmp = t_3 elif t_1 <= -1e-290: tmp = t_1 elif t_1 <= 2e-222: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))) elif t_1 <= 7.2e+255: tmp = t_1 elif t_1 <= math.inf: tmp = t_3 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) t_2 = Float64(1.0 + Float64(a + Float64(b * Float64(y / t)))) t_3 = Float64(Float64(x / t_2) + Float64(Float64(y / t) * Float64(z / t_2))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_3; elseif (t_1 <= -1e-290) tmp = t_1; elseif (t_1 <= 2e-222) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t_1 <= 7.2e+255) tmp = t_1; elseif (t_1 <= Inf) tmp = t_3; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)); t_2 = 1.0 + (a + (b * (y / t))); t_3 = (x / t_2) + ((y / t) * (z / t_2)); tmp = 0.0; if (t_1 <= -Inf) tmp = t_3; elseif (t_1 <= -1e-290) tmp = t_1; elseif (t_1 <= 2e-222) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))); elseif (t_1 <= 7.2e+255) tmp = t_1; elseif (t_1 <= Inf) tmp = t_3; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x / t$95$2), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * N[(z / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$3, If[LessEqual[t$95$1, -1e-290], t$95$1, If[LessEqual[t$95$1, 2e-222], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 7.2e+255], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$3, N[(z / b), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_2 := 1 + \left(a + b \cdot \frac{y}{t}\right)\\
t_3 := \frac{x}{t\_2} + \frac{y}{t} \cdot \frac{z}{t\_2}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-290}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-222}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t\_1 \leq 7.2 \cdot 10^{+255}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0 or 7.1999999999999998e255 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 36.7%
*-commutative36.7%
associate-/l*70.9%
Applied egg-rr70.9%
+-commutative70.9%
*-commutative70.9%
fma-define70.9%
Applied egg-rr70.9%
Taylor expanded in z around 0 55.6%
associate-/l*55.6%
times-frac97.2%
associate-/l*86.8%
Simplified86.8%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.0000000000000001e-290 or 2.0000000000000001e-222 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 7.1999999999999998e255Initial program 99.6%
if -1.0000000000000001e-290 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e-222Initial program 57.6%
associate-/l*61.0%
associate-/l*80.3%
Simplified80.3%
clear-num80.4%
un-div-inv80.4%
Applied egg-rr80.4%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.4%
associate-/l*8.1%
Simplified8.1%
Taylor expanded in y around inf 96.0%
Final simplification93.2%
(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 -1e-290)
(/ (+ x (/ z (/ t y))) t_1)
(if (<= t_2 2e-222)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t_2 2e+301) t_2 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_2 <= -1e-290) {
tmp = (x + (z / (t / y))) / t_1;
} else if (t_2 <= 2e-222) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else if (t_2 <= 2e+301) {
tmp = t_2;
} 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) :: t_2
real(8) :: tmp
t_1 = ((y * b) / t) + (a + 1.0d0)
t_2 = (x + ((y * z) / t)) / t_1
if (t_2 <= (-1d-290)) then
tmp = (x + (z / (t / y))) / t_1
else if (t_2 <= 2d-222) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y / (t / b)))
else if (t_2 <= 2d+301) then
tmp = t_2
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 = ((y * b) / t) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_2 <= -1e-290) {
tmp = (x + (z / (t / y))) / t_1;
} else if (t_2 <= 2e-222) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else if (t_2 <= 2e+301) {
tmp = t_2;
} else {
tmp = z / 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 <= -1e-290: tmp = (x + (z / (t / y))) / t_1 elif t_2 <= 2e-222: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))) elif t_2 <= 2e+301: tmp = t_2 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_1) tmp = 0.0 if (t_2 <= -1e-290) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / t_1); elseif (t_2 <= 2e-222) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t_2 <= 2e+301) 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) + (a + 1.0); t_2 = (x + ((y * z) / t)) / t_1; tmp = 0.0; if (t_2 <= -1e-290) tmp = (x + (z / (t / y))) / t_1; elseif (t_2 <= 2e-222) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))); elseif (t_2 <= 2e+301) 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[(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, -1e-290], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 2e-222], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+301], t$95$2, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t\_1}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-290}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{t\_1}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-222}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+301}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.0000000000000001e-290Initial program 87.3%
*-commutative87.3%
associate-/l*90.9%
Applied egg-rr90.9%
clear-num90.9%
un-div-inv92.3%
Applied egg-rr92.3%
if -1.0000000000000001e-290 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e-222Initial program 57.6%
associate-/l*61.0%
associate-/l*80.3%
Simplified80.3%
clear-num80.4%
un-div-inv80.4%
Applied egg-rr80.4%
if 2.0000000000000001e-222 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.00000000000000011e301Initial program 99.6%
if 2.00000000000000011e301 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 14.6%
associate-/l*29.0%
associate-/l*33.0%
Simplified33.0%
Taylor expanded in y around inf 79.4%
Final simplification89.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (/ (* x t) (* y b)))) (t_2 (/ x (+ a 1.0))))
(if (<= t -5.5e+95)
t_2
(if (<= t -8e+28)
t_1
(if (<= t -3.8e-40)
(/ (+ x (* z (/ y t))) a)
(if (<= t 1.6e-13)
t_1
(if (<= t 4.3e+71)
t_2
(if (<= t 4.5e+83)
(* (/ x b) (/ t y))
(if (<= t 1.6e+127) (* y (/ z (* t (+ a 1.0)))) t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((x * t) / (y * b));
double t_2 = x / (a + 1.0);
double tmp;
if (t <= -5.5e+95) {
tmp = t_2;
} else if (t <= -8e+28) {
tmp = t_1;
} else if (t <= -3.8e-40) {
tmp = (x + (z * (y / t))) / a;
} else if (t <= 1.6e-13) {
tmp = t_1;
} else if (t <= 4.3e+71) {
tmp = t_2;
} else if (t <= 4.5e+83) {
tmp = (x / b) * (t / y);
} else if (t <= 1.6e+127) {
tmp = y * (z / (t * (a + 1.0)));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z / b) + ((x * t) / (y * b))
t_2 = x / (a + 1.0d0)
if (t <= (-5.5d+95)) then
tmp = t_2
else if (t <= (-8d+28)) then
tmp = t_1
else if (t <= (-3.8d-40)) then
tmp = (x + (z * (y / t))) / a
else if (t <= 1.6d-13) then
tmp = t_1
else if (t <= 4.3d+71) then
tmp = t_2
else if (t <= 4.5d+83) then
tmp = (x / b) * (t / y)
else if (t <= 1.6d+127) then
tmp = y * (z / (t * (a + 1.0d0)))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((x * t) / (y * b));
double t_2 = x / (a + 1.0);
double tmp;
if (t <= -5.5e+95) {
tmp = t_2;
} else if (t <= -8e+28) {
tmp = t_1;
} else if (t <= -3.8e-40) {
tmp = (x + (z * (y / t))) / a;
} else if (t <= 1.6e-13) {
tmp = t_1;
} else if (t <= 4.3e+71) {
tmp = t_2;
} else if (t <= 4.5e+83) {
tmp = (x / b) * (t / y);
} else if (t <= 1.6e+127) {
tmp = y * (z / (t * (a + 1.0)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((x * t) / (y * b)) t_2 = x / (a + 1.0) tmp = 0 if t <= -5.5e+95: tmp = t_2 elif t <= -8e+28: tmp = t_1 elif t <= -3.8e-40: tmp = (x + (z * (y / t))) / a elif t <= 1.6e-13: tmp = t_1 elif t <= 4.3e+71: tmp = t_2 elif t <= 4.5e+83: tmp = (x / b) * (t / y) elif t <= 1.6e+127: tmp = y * (z / (t * (a + 1.0))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))) t_2 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -5.5e+95) tmp = t_2; elseif (t <= -8e+28) tmp = t_1; elseif (t <= -3.8e-40) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / a); elseif (t <= 1.6e-13) tmp = t_1; elseif (t <= 4.3e+71) tmp = t_2; elseif (t <= 4.5e+83) tmp = Float64(Float64(x / b) * Float64(t / y)); elseif (t <= 1.6e+127) tmp = Float64(y * Float64(z / Float64(t * Float64(a + 1.0)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((x * t) / (y * b)); t_2 = x / (a + 1.0); tmp = 0.0; if (t <= -5.5e+95) tmp = t_2; elseif (t <= -8e+28) tmp = t_1; elseif (t <= -3.8e-40) tmp = (x + (z * (y / t))) / a; elseif (t <= 1.6e-13) tmp = t_1; elseif (t <= 4.3e+71) tmp = t_2; elseif (t <= 4.5e+83) tmp = (x / b) * (t / y); elseif (t <= 1.6e+127) tmp = y * (z / (t * (a + 1.0))); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5.5e+95], t$95$2, If[LessEqual[t, -8e+28], t$95$1, If[LessEqual[t, -3.8e-40], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 1.6e-13], t$95$1, If[LessEqual[t, 4.3e+71], t$95$2, If[LessEqual[t, 4.5e+83], N[(N[(x / b), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.6e+127], N[(y * N[(z / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
t_2 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -5.5 \cdot 10^{+95}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -8 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -3.8 \cdot 10^{-40}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-13}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{+83}:\\
\;\;\;\;\frac{x}{b} \cdot \frac{t}{y}\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+127}:\\
\;\;\;\;y \cdot \frac{z}{t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -5.4999999999999997e95 or 1.6e-13 < t < 4.29999999999999984e71 or 1.59999999999999988e127 < t Initial program 74.0%
associate-/l*86.4%
associate-/l*95.0%
Simplified95.0%
Taylor expanded in y around 0 66.2%
if -5.4999999999999997e95 < t < -7.99999999999999967e28 or -3.7999999999999999e-40 < t < 1.6e-13Initial program 66.1%
associate-/l*58.9%
associate-/l*55.1%
Simplified55.1%
Taylor expanded in b around inf 46.8%
Taylor expanded in t around 0 70.9%
if -7.99999999999999967e28 < t < -3.7999999999999999e-40Initial program 92.2%
associate-/l*84.9%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in a around inf 78.3%
*-commutative92.2%
associate-/l*92.4%
Applied egg-rr78.5%
if 4.29999999999999984e71 < t < 4.4999999999999999e83Initial program 67.2%
associate-/l*67.2%
associate-/l*99.5%
Simplified99.5%
Taylor expanded in x around inf 66.2%
Taylor expanded in y around inf 66.1%
*-commutative66.1%
times-frac99.5%
Applied egg-rr99.5%
if 4.4999999999999999e83 < t < 1.59999999999999988e127Initial program 99.3%
associate-/l*99.6%
associate-/l*99.3%
Simplified99.3%
clear-num99.6%
un-div-inv99.6%
Applied egg-rr99.6%
Taylor expanded in x around 0 66.3%
associate-/l*66.3%
associate-*l/66.3%
*-commutative66.3%
Simplified66.3%
Taylor expanded in t around inf 66.7%
*-commutative66.7%
Simplified66.7%
Final simplification69.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (/ (* x t) (* y b))))
(t_2 (/ x (+ 1.0 (+ a (/ (* y b) t))))))
(if (<= t -3.3e+77)
t_2
(if (<= t -3.7e+28)
t_1
(if (<= t -9e-38)
(/ (+ x (* z (/ y t))) a)
(if (<= t 1.55e-16) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((x * t) / (y * b));
double t_2 = x / (1.0 + (a + ((y * b) / t)));
double tmp;
if (t <= -3.3e+77) {
tmp = t_2;
} else if (t <= -3.7e+28) {
tmp = t_1;
} else if (t <= -9e-38) {
tmp = (x + (z * (y / t))) / a;
} else if (t <= 1.55e-16) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z / b) + ((x * t) / (y * b))
t_2 = x / (1.0d0 + (a + ((y * b) / t)))
if (t <= (-3.3d+77)) then
tmp = t_2
else if (t <= (-3.7d+28)) then
tmp = t_1
else if (t <= (-9d-38)) then
tmp = (x + (z * (y / t))) / a
else if (t <= 1.55d-16) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((x * t) / (y * b));
double t_2 = x / (1.0 + (a + ((y * b) / t)));
double tmp;
if (t <= -3.3e+77) {
tmp = t_2;
} else if (t <= -3.7e+28) {
tmp = t_1;
} else if (t <= -9e-38) {
tmp = (x + (z * (y / t))) / a;
} else if (t <= 1.55e-16) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((x * t) / (y * b)) t_2 = x / (1.0 + (a + ((y * b) / t))) tmp = 0 if t <= -3.3e+77: tmp = t_2 elif t <= -3.7e+28: tmp = t_1 elif t <= -9e-38: tmp = (x + (z * (y / t))) / a elif t <= 1.55e-16: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))) t_2 = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))) tmp = 0.0 if (t <= -3.3e+77) tmp = t_2; elseif (t <= -3.7e+28) tmp = t_1; elseif (t <= -9e-38) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / a); elseif (t <= 1.55e-16) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((x * t) / (y * b)); t_2 = x / (1.0 + (a + ((y * b) / t))); tmp = 0.0; if (t <= -3.3e+77) tmp = t_2; elseif (t <= -3.7e+28) tmp = t_1; elseif (t <= -9e-38) tmp = (x + (z * (y / t))) / a; elseif (t <= 1.55e-16) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.3e+77], t$95$2, If[LessEqual[t, -3.7e+28], t$95$1, If[LessEqual[t, -9e-38], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 1.55e-16], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
t_2 := \frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{+77}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -3.7 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -9 \cdot 10^{-38}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a}\\
\mathbf{elif}\;t \leq 1.55 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -3.2999999999999998e77 or 1.55e-16 < t Initial program 76.0%
associate-/l*86.7%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in x around inf 65.4%
if -3.2999999999999998e77 < t < -3.6999999999999999e28 or -9.00000000000000018e-38 < t < 1.55e-16Initial program 65.0%
associate-/l*57.4%
associate-/l*52.7%
Simplified52.7%
Taylor expanded in b around inf 48.2%
Taylor expanded in t around 0 72.9%
if -3.6999999999999999e28 < t < -9.00000000000000018e-38Initial program 92.2%
associate-/l*84.9%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in a around inf 78.3%
*-commutative92.2%
associate-/l*92.4%
Applied egg-rr78.5%
Final simplification69.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (/ (* x t) (* y b))))
(t_2 (/ x (+ (* b (/ y t)) (+ a 1.0)))))
(if (<= t -3.3e+77)
t_2
(if (<= t -1.65e+40)
t_1
(if (<= t -8.2e-36)
(/ (+ x (* z (/ y t))) a)
(if (<= t 2.45e-17) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((x * t) / (y * b));
double t_2 = x / ((b * (y / t)) + (a + 1.0));
double tmp;
if (t <= -3.3e+77) {
tmp = t_2;
} else if (t <= -1.65e+40) {
tmp = t_1;
} else if (t <= -8.2e-36) {
tmp = (x + (z * (y / t))) / a;
} else if (t <= 2.45e-17) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z / b) + ((x * t) / (y * b))
t_2 = x / ((b * (y / t)) + (a + 1.0d0))
if (t <= (-3.3d+77)) then
tmp = t_2
else if (t <= (-1.65d+40)) then
tmp = t_1
else if (t <= (-8.2d-36)) then
tmp = (x + (z * (y / t))) / a
else if (t <= 2.45d-17) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((x * t) / (y * b));
double t_2 = x / ((b * (y / t)) + (a + 1.0));
double tmp;
if (t <= -3.3e+77) {
tmp = t_2;
} else if (t <= -1.65e+40) {
tmp = t_1;
} else if (t <= -8.2e-36) {
tmp = (x + (z * (y / t))) / a;
} else if (t <= 2.45e-17) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((x * t) / (y * b)) t_2 = x / ((b * (y / t)) + (a + 1.0)) tmp = 0 if t <= -3.3e+77: tmp = t_2 elif t <= -1.65e+40: tmp = t_1 elif t <= -8.2e-36: tmp = (x + (z * (y / t))) / a elif t <= 2.45e-17: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))) t_2 = Float64(x / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))) tmp = 0.0 if (t <= -3.3e+77) tmp = t_2; elseif (t <= -1.65e+40) tmp = t_1; elseif (t <= -8.2e-36) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / a); elseif (t <= 2.45e-17) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((x * t) / (y * b)); t_2 = x / ((b * (y / t)) + (a + 1.0)); tmp = 0.0; if (t <= -3.3e+77) tmp = t_2; elseif (t <= -1.65e+40) tmp = t_1; elseif (t <= -8.2e-36) tmp = (x + (z * (y / t))) / a; elseif (t <= 2.45e-17) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.3e+77], t$95$2, If[LessEqual[t, -1.65e+40], t$95$1, If[LessEqual[t, -8.2e-36], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 2.45e-17], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
t_2 := \frac{x}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{+77}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.65 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -8.2 \cdot 10^{-36}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a}\\
\mathbf{elif}\;t \leq 2.45 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -3.2999999999999998e77 or 2.45000000000000006e-17 < t Initial program 76.0%
associate-/l*86.7%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in x around inf 65.4%
associate-+r+65.4%
associate-*r/72.7%
Simplified72.7%
if -3.2999999999999998e77 < t < -1.6499999999999999e40 or -8.20000000000000025e-36 < t < 2.45000000000000006e-17Initial program 65.0%
associate-/l*57.4%
associate-/l*52.7%
Simplified52.7%
Taylor expanded in b around inf 48.2%
Taylor expanded in t around 0 72.9%
if -1.6499999999999999e40 < t < -8.20000000000000025e-36Initial program 92.2%
associate-/l*84.9%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in a around inf 78.3%
*-commutative92.2%
associate-/l*92.4%
Applied egg-rr78.5%
Final simplification73.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (/ (* x t) (* y b))))
(t_2 (/ x (+ (* b (/ y t)) (+ a 1.0)))))
(if (<= t -3.3e+77)
t_2
(if (<= t -1.25e+43)
t_1
(if (<= t -7.2e-56)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(if (<= t 2.4e-16) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((x * t) / (y * b));
double t_2 = x / ((b * (y / t)) + (a + 1.0));
double tmp;
if (t <= -3.3e+77) {
tmp = t_2;
} else if (t <= -1.25e+43) {
tmp = t_1;
} else if (t <= -7.2e-56) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (t <= 2.4e-16) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z / b) + ((x * t) / (y * b))
t_2 = x / ((b * (y / t)) + (a + 1.0d0))
if (t <= (-3.3d+77)) then
tmp = t_2
else if (t <= (-1.25d+43)) then
tmp = t_1
else if (t <= (-7.2d-56)) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else if (t <= 2.4d-16) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((x * t) / (y * b));
double t_2 = x / ((b * (y / t)) + (a + 1.0));
double tmp;
if (t <= -3.3e+77) {
tmp = t_2;
} else if (t <= -1.25e+43) {
tmp = t_1;
} else if (t <= -7.2e-56) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (t <= 2.4e-16) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((x * t) / (y * b)) t_2 = x / ((b * (y / t)) + (a + 1.0)) tmp = 0 if t <= -3.3e+77: tmp = t_2 elif t <= -1.25e+43: tmp = t_1 elif t <= -7.2e-56: tmp = (x + ((y * z) / t)) / (a + 1.0) elif t <= 2.4e-16: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))) t_2 = Float64(x / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))) tmp = 0.0 if (t <= -3.3e+77) tmp = t_2; elseif (t <= -1.25e+43) tmp = t_1; elseif (t <= -7.2e-56) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); elseif (t <= 2.4e-16) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((x * t) / (y * b)); t_2 = x / ((b * (y / t)) + (a + 1.0)); tmp = 0.0; if (t <= -3.3e+77) tmp = t_2; elseif (t <= -1.25e+43) tmp = t_1; elseif (t <= -7.2e-56) tmp = (x + ((y * z) / t)) / (a + 1.0); elseif (t <= 2.4e-16) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.3e+77], t$95$2, If[LessEqual[t, -1.25e+43], t$95$1, If[LessEqual[t, -7.2e-56], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.4e-16], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
t_2 := \frac{x}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t \leq -3.3 \cdot 10^{+77}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.25 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -7.2 \cdot 10^{-56}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -3.2999999999999998e77 or 2.40000000000000005e-16 < t Initial program 76.0%
associate-/l*86.7%
associate-/l*95.7%
Simplified95.7%
Taylor expanded in x around inf 65.4%
associate-+r+65.4%
associate-*r/72.7%
Simplified72.7%
if -3.2999999999999998e77 < t < -1.2500000000000001e43 or -7.19999999999999956e-56 < t < 2.40000000000000005e-16Initial program 63.6%
associate-/l*55.7%
associate-/l*50.7%
Simplified50.7%
Taylor expanded in b around inf 47.7%
Taylor expanded in t around 0 73.4%
if -1.2500000000000001e43 < t < -7.19999999999999956e-56Initial program 94.2%
associate-/l*88.9%
associate-/l*89.0%
Simplified89.0%
Taylor expanded in b around 0 78.1%
Final simplification73.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.9e+98)
(/ x a)
(if (<= t -3.3e+27)
(/ z b)
(if (<= t -1.6e-41)
(/ x a)
(if (<= t 1.3e+58)
(/ z b)
(if (<= t 2.1e+190) (- x (* x a)) (/ x a)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.9e+98) {
tmp = x / a;
} else if (t <= -3.3e+27) {
tmp = z / b;
} else if (t <= -1.6e-41) {
tmp = x / a;
} else if (t <= 1.3e+58) {
tmp = z / b;
} else if (t <= 2.1e+190) {
tmp = x - (x * a);
} 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 <= (-1.9d+98)) then
tmp = x / a
else if (t <= (-3.3d+27)) then
tmp = z / b
else if (t <= (-1.6d-41)) then
tmp = x / a
else if (t <= 1.3d+58) then
tmp = z / b
else if (t <= 2.1d+190) then
tmp = x - (x * a)
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 <= -1.9e+98) {
tmp = x / a;
} else if (t <= -3.3e+27) {
tmp = z / b;
} else if (t <= -1.6e-41) {
tmp = x / a;
} else if (t <= 1.3e+58) {
tmp = z / b;
} else if (t <= 2.1e+190) {
tmp = x - (x * a);
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.9e+98: tmp = x / a elif t <= -3.3e+27: tmp = z / b elif t <= -1.6e-41: tmp = x / a elif t <= 1.3e+58: tmp = z / b elif t <= 2.1e+190: tmp = x - (x * a) else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.9e+98) tmp = Float64(x / a); elseif (t <= -3.3e+27) tmp = Float64(z / b); elseif (t <= -1.6e-41) tmp = Float64(x / a); elseif (t <= 1.3e+58) tmp = Float64(z / b); elseif (t <= 2.1e+190) tmp = Float64(x - Float64(x * a)); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.9e+98) tmp = x / a; elseif (t <= -3.3e+27) tmp = z / b; elseif (t <= -1.6e-41) tmp = x / a; elseif (t <= 1.3e+58) tmp = z / b; elseif (t <= 2.1e+190) tmp = x - (x * a); else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.9e+98], N[(x / a), $MachinePrecision], If[LessEqual[t, -3.3e+27], N[(z / b), $MachinePrecision], If[LessEqual[t, -1.6e-41], N[(x / a), $MachinePrecision], If[LessEqual[t, 1.3e+58], N[(z / b), $MachinePrecision], If[LessEqual[t, 2.1e+190], N[(x - N[(x * a), $MachinePrecision]), $MachinePrecision], N[(x / a), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{+98}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;t \leq -3.3 \cdot 10^{+27}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -1.6 \cdot 10^{-41}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+58}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{+190}:\\
\;\;\;\;x - x \cdot a\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if t < -1.89999999999999995e98 or -3.2999999999999998e27 < t < -1.60000000000000006e-41 or 2.1000000000000001e190 < t Initial program 74.8%
associate-/l*86.3%
associate-/l*95.6%
Simplified95.6%
Taylor expanded in x around inf 74.6%
Taylor expanded in a around inf 45.4%
if -1.89999999999999995e98 < t < -3.2999999999999998e27 or -1.60000000000000006e-41 < t < 1.29999999999999994e58Initial program 66.7%
associate-/l*59.9%
associate-/l*56.3%
Simplified56.3%
Taylor expanded in y around inf 62.0%
if 1.29999999999999994e58 < t < 2.1000000000000001e190Initial program 87.0%
associate-/l*91.2%
associate-/l*95.3%
Simplified95.3%
clear-num95.1%
inv-pow95.1%
+-commutative95.1%
fma-define95.1%
+-commutative95.1%
fma-define95.1%
Applied egg-rr95.1%
unpow-195.1%
+-commutative95.1%
Simplified95.1%
Taylor expanded in y around 0 53.7%
Taylor expanded in a around 0 41.4%
mul-1-neg41.4%
unsub-neg41.4%
*-commutative41.4%
Simplified41.4%
Final simplification54.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.9e-86) (not (<= t 7e-88))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))) (+ (/ z b) (/ (* x t) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.9e-86) || !(t <= 7e-88)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.9d-86)) .or. (.not. (t <= 7d-88))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else
tmp = (z / b) + ((x * t) / (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.9e-86) || !(t <= 7e-88)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.9e-86) or not (t <= 7e-88): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.9e-86) || !(t <= 7e-88)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.9e-86) || ~((t <= 7e-88))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.9e-86], N[Not[LessEqual[t, 7e-88]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{-86} \lor \neg \left(t \leq 7 \cdot 10^{-88}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -1.9e-86 or 7.0000000000000002e-88 < t Initial program 76.6%
associate-/l*83.8%
associate-/l*91.5%
Simplified91.5%
if -1.9e-86 < t < 7.0000000000000002e-88Initial program 62.6%
associate-/l*52.6%
associate-/l*44.3%
Simplified44.3%
Taylor expanded in b around inf 46.8%
Taylor expanded in t around 0 74.4%
Final simplification85.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.6e-89) (not (<= t 4.2e-180))) (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ y (/ t b)))) (+ (/ z b) (/ (* x t) (* y b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.6e-89) || !(t <= 4.2e-180)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-1.6d-89)) .or. (.not. (t <= 4.2d-180))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y / (t / b)))
else
tmp = (z / b) + ((x * t) / (y * b))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.6e-89) || !(t <= 4.2e-180)) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.6e-89) or not (t <= 4.2e-180): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.6e-89) || !(t <= 4.2e-180)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); else tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.6e-89) || ~((t <= 4.2e-180))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b))); else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.6e-89], N[Not[LessEqual[t, 4.2e-180]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{-89} \lor \neg \left(t \leq 4.2 \cdot 10^{-180}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\end{array}
\end{array}
if t < -1.59999999999999999e-89 or 4.1999999999999997e-180 < t Initial program 76.2%
associate-/l*82.0%
associate-/l*87.7%
Simplified87.7%
clear-num87.7%
un-div-inv88.2%
Applied egg-rr88.2%
if -1.59999999999999999e-89 < t < 4.1999999999999997e-180Initial program 59.7%
associate-/l*48.1%
associate-/l*40.1%
Simplified40.1%
Taylor expanded in b around inf 47.2%
Taylor expanded in t around 0 77.7%
Final simplification85.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -1.6e+89)
t_1
(if (<= t -7.5e+35)
(/ z b)
(if (<= t -9.6e-39) (/ x a) (if (<= t 2.6e-11) (/ z b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -1.6e+89) {
tmp = t_1;
} else if (t <= -7.5e+35) {
tmp = z / b;
} else if (t <= -9.6e-39) {
tmp = x / a;
} else if (t <= 2.6e-11) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-1.6d+89)) then
tmp = t_1
else if (t <= (-7.5d+35)) then
tmp = z / b
else if (t <= (-9.6d-39)) then
tmp = x / a
else if (t <= 2.6d-11) then
tmp = z / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -1.6e+89) {
tmp = t_1;
} else if (t <= -7.5e+35) {
tmp = z / b;
} else if (t <= -9.6e-39) {
tmp = x / a;
} else if (t <= 2.6e-11) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -1.6e+89: tmp = t_1 elif t <= -7.5e+35: tmp = z / b elif t <= -9.6e-39: tmp = x / a elif t <= 2.6e-11: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -1.6e+89) tmp = t_1; elseif (t <= -7.5e+35) tmp = Float64(z / b); elseif (t <= -9.6e-39) tmp = Float64(x / a); elseif (t <= 2.6e-11) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -1.6e+89) tmp = t_1; elseif (t <= -7.5e+35) tmp = z / b; elseif (t <= -9.6e-39) tmp = x / a; elseif (t <= 2.6e-11) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+89], t$95$1, If[LessEqual[t, -7.5e+35], N[(z / b), $MachinePrecision], If[LessEqual[t, -9.6e-39], N[(x / a), $MachinePrecision], If[LessEqual[t, 2.6e-11], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -7.5 \cdot 10^{+35}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -9.6 \cdot 10^{-39}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{-11}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.59999999999999994e89 or 2.6000000000000001e-11 < t Initial program 75.6%
associate-/l*86.9%
associate-/l*95.4%
Simplified95.4%
Taylor expanded in y around 0 61.9%
if -1.59999999999999994e89 < t < -7.4999999999999999e35 or -9.60000000000000063e-39 < t < 2.6000000000000001e-11Initial program 65.9%
associate-/l*58.6%
associate-/l*54.8%
Simplified54.8%
Taylor expanded in y around inf 63.8%
if -7.4999999999999999e35 < t < -9.60000000000000063e-39Initial program 92.2%
associate-/l*84.9%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in x around inf 56.0%
Taylor expanded in a around inf 48.3%
Final simplification62.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ a 1.0))))
(if (<= t -6.8e+89)
t_1
(if (<= t -1.8e+37)
(/ z b)
(if (<= t -6.6e-38)
(/ (+ x (* z (/ y t))) a)
(if (<= t 3.2e-12) (/ z b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -6.8e+89) {
tmp = t_1;
} else if (t <= -1.8e+37) {
tmp = z / b;
} else if (t <= -6.6e-38) {
tmp = (x + (z * (y / t))) / a;
} else if (t <= 3.2e-12) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (a + 1.0d0)
if (t <= (-6.8d+89)) then
tmp = t_1
else if (t <= (-1.8d+37)) then
tmp = z / b
else if (t <= (-6.6d-38)) then
tmp = (x + (z * (y / t))) / a
else if (t <= 3.2d-12) then
tmp = z / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (a + 1.0);
double tmp;
if (t <= -6.8e+89) {
tmp = t_1;
} else if (t <= -1.8e+37) {
tmp = z / b;
} else if (t <= -6.6e-38) {
tmp = (x + (z * (y / t))) / a;
} else if (t <= 3.2e-12) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (a + 1.0) tmp = 0 if t <= -6.8e+89: tmp = t_1 elif t <= -1.8e+37: tmp = z / b elif t <= -6.6e-38: tmp = (x + (z * (y / t))) / a elif t <= 3.2e-12: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(a + 1.0)) tmp = 0.0 if (t <= -6.8e+89) tmp = t_1; elseif (t <= -1.8e+37) tmp = Float64(z / b); elseif (t <= -6.6e-38) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / a); elseif (t <= 3.2e-12) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (a + 1.0); tmp = 0.0; if (t <= -6.8e+89) tmp = t_1; elseif (t <= -1.8e+37) tmp = z / b; elseif (t <= -6.6e-38) tmp = (x + (z * (y / t))) / a; elseif (t <= 3.2e-12) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.8e+89], t$95$1, If[LessEqual[t, -1.8e+37], N[(z / b), $MachinePrecision], If[LessEqual[t, -6.6e-38], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 3.2e-12], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -6.8 \cdot 10^{+89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -1.8 \cdot 10^{+37}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -6.6 \cdot 10^{-38}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-12}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -6.8000000000000004e89 or 3.2000000000000001e-12 < t Initial program 75.6%
associate-/l*86.9%
associate-/l*95.4%
Simplified95.4%
Taylor expanded in y around 0 61.9%
if -6.8000000000000004e89 < t < -1.79999999999999999e37 or -6.6000000000000005e-38 < t < 3.2000000000000001e-12Initial program 65.9%
associate-/l*58.6%
associate-/l*54.8%
Simplified54.8%
Taylor expanded in y around inf 63.8%
if -1.79999999999999999e37 < t < -6.6000000000000005e-38Initial program 92.2%
associate-/l*84.9%
associate-/l*84.8%
Simplified84.8%
Taylor expanded in a around inf 78.3%
*-commutative92.2%
associate-/l*92.4%
Applied egg-rr78.5%
Final simplification63.7%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= t -8.2e+95)
(not (or (<= t -7.2e+36) (and (not (<= t -2e-40)) (<= t 2.05e+206)))))
(/ x a)
(/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -8.2e+95) || !((t <= -7.2e+36) || (!(t <= -2e-40) && (t <= 2.05e+206)))) {
tmp = x / a;
} 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 <= (-8.2d+95)) .or. (.not. (t <= (-7.2d+36)) .or. (.not. (t <= (-2d-40))) .and. (t <= 2.05d+206))) then
tmp = x / a
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 <= -8.2e+95) || !((t <= -7.2e+36) || (!(t <= -2e-40) && (t <= 2.05e+206)))) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -8.2e+95) or not ((t <= -7.2e+36) or (not (t <= -2e-40) and (t <= 2.05e+206))): tmp = x / a else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -8.2e+95) || !((t <= -7.2e+36) || (!(t <= -2e-40) && (t <= 2.05e+206)))) tmp = Float64(x / a); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -8.2e+95) || ~(((t <= -7.2e+36) || (~((t <= -2e-40)) && (t <= 2.05e+206))))) tmp = x / a; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8.2e+95], N[Not[Or[LessEqual[t, -7.2e+36], And[N[Not[LessEqual[t, -2e-40]], $MachinePrecision], LessEqual[t, 2.05e+206]]]], $MachinePrecision]], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{+95} \lor \neg \left(t \leq -7.2 \cdot 10^{+36} \lor \neg \left(t \leq -2 \cdot 10^{-40}\right) \land t \leq 2.05 \cdot 10^{+206}\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -8.19999999999999972e95 or -7.1999999999999995e36 < t < -1.9999999999999999e-40 or 2.0500000000000002e206 < t Initial program 74.0%
associate-/l*86.9%
associate-/l*96.5%
Simplified96.5%
Taylor expanded in x around inf 74.7%
Taylor expanded in a around inf 45.6%
if -8.19999999999999972e95 < t < -7.1999999999999995e36 or -1.9999999999999999e-40 < t < 2.0500000000000002e206Initial program 70.1%
associate-/l*64.4%
associate-/l*61.9%
Simplified61.9%
Taylor expanded in y around inf 56.3%
Final simplification52.5%
(FPCore (x y z t a b) :precision binary64 (/ x a))
double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
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 / a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
def code(x, y, z, t, a, b): return x / a
function code(x, y, z, t, a, b) return Float64(x / a) end
function tmp = code(x, y, z, t, a, b) tmp = x / a; end
code[x_, y_, z_, t_, a_, b_] := N[(x / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a}
\end{array}
Initial program 71.4%
associate-/l*72.2%
associate-/l*74.0%
Simplified74.0%
Taylor expanded in x around inf 49.3%
Taylor expanded in a around inf 25.5%
Final simplification25.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(if (< t -1.3659085366310088e-271)
t_1
(if (< t 3.036967103737246e-130) (/ z b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 * ((x + ((y / t) * z)) * (1.0d0 / ((a + 1.0d0) + ((y / t) * b))))
if (t < (-1.3659085366310088d-271)) then
tmp = t_1
else if (t < 3.036967103737246d-130) then
tmp = z / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))) tmp = 0 if t < -1.3659085366310088e-271: tmp = t_1 elif t < 3.036967103737246e-130: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 * Float64(Float64(x + Float64(Float64(y / t) * z)) * Float64(1.0 / Float64(Float64(a + 1.0) + Float64(Float64(y / t) * b))))) tmp = 0.0 if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))); tmp = 0.0; if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 * N[(N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.3659085366310088e-271], t$95$1, If[Less[t, 3.036967103737246e-130], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\
\mathbf{if}\;t < -1.3659085366310088 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024044
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:herbie-target
(if (< t -1.3659085366310088e-271) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))