
(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 23 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (+ x (/ (* y z) t)))
(t_3 (/ t_2 (+ t_1 (+ a 1.0))))
(t_4 (+ 1.0 (+ a t_1)))
(t_5 (fma y (/ b t) (+ a 1.0))))
(if (<= t_3 (- INFINITY))
(* z (+ (/ x (* z t_4)) (/ y (* t t_4))))
(if (<= t_3 2e+188)
(/ t_2 (+ (* b (/ y t)) (+ a 1.0)))
(if (<= t_3 INFINITY)
(* z (+ (/ (/ x z) t_5) (/ (/ y t) t_5)))
(+ (/ z b) (* (/ t b) (/ x y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / (t_1 + (a + 1.0));
double t_4 = 1.0 + (a + t_1);
double t_5 = fma(y, (b / t), (a + 1.0));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = z * ((x / (z * t_4)) + (y / (t * t_4)));
} else if (t_3 <= 2e+188) {
tmp = t_2 / ((b * (y / t)) + (a + 1.0));
} else if (t_3 <= ((double) INFINITY)) {
tmp = z * (((x / z) / t_5) + ((y / t) / t_5));
} else {
tmp = (z / b) + ((t / b) * (x / y));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(x + Float64(Float64(y * z) / t)) t_3 = Float64(t_2 / Float64(t_1 + Float64(a + 1.0))) t_4 = Float64(1.0 + Float64(a + t_1)) t_5 = fma(y, Float64(b / t), Float64(a + 1.0)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(x / Float64(z * t_4)) + Float64(y / Float64(t * t_4)))); elseif (t_3 <= 2e+188) tmp = Float64(t_2 / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); elseif (t_3 <= Inf) tmp = Float64(z * Float64(Float64(Float64(x / z) / t_5) + Float64(Float64(y / t) / t_5))); else tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(y * N[(b / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(z * N[(N[(x / N[(z * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+188], N[(t$95$2 / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(z * N[(N[(N[(x / z), $MachinePrecision] / t$95$5), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] / t$95$5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := x + \frac{y \cdot z}{t}\\
t_3 := \frac{t\_2}{t\_1 + \left(a + 1\right)}\\
t_4 := 1 + \left(a + t\_1\right)\\
t_5 := \mathsf{fma}\left(y, \frac{b}{t}, a + 1\right)\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_4} + \frac{y}{t \cdot t\_4}\right)\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+188}:\\
\;\;\;\;\frac{t\_2}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;z \cdot \left(\frac{\frac{x}{z}}{t\_5} + \frac{\frac{y}{t}}{t\_5}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\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 16.4%
associate-/l*40.8%
associate-/l*40.1%
Simplified40.1%
Taylor expanded in z around inf 89.2%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2e188Initial program 91.3%
*-commutative91.3%
associate-/l*93.8%
Applied egg-rr93.8%
if 2e188 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 50.1%
associate-/l*61.0%
associate-/l*61.0%
Simplified61.0%
Taylor expanded in z around inf 88.9%
associate-/r*92.5%
+-commutative92.5%
associate-*r/92.5%
+-commutative92.5%
associate-+r+92.5%
associate-*r/92.5%
associate-*l/92.6%
*-commutative92.6%
fma-undefine92.6%
+-commutative92.6%
associate-/r*92.7%
+-commutative92.7%
associate-*r/88.7%
+-commutative88.7%
associate-+r+88.7%
Simplified92.7%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.3%
associate-/l*9.3%
Simplified9.3%
Taylor expanded in b around inf 1.7%
Taylor expanded in z around inf 33.8%
Taylor expanded in z around 0 91.3%
times-frac91.3%
Simplified91.3%
Final simplification93.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (+ 1.0 (+ a t_1)))
(t_3 (+ x (/ (* y z) t)))
(t_4 (/ t_3 (+ t_1 (+ a 1.0))))
(t_5 (* z (+ (/ x (* z t_2)) (/ y (* t t_2))))))
(if (<= t_4 (- INFINITY))
t_5
(if (<= t_4 2e+241)
(/ t_3 (+ (* b (/ y t)) (+ a 1.0)))
(if (<= t_4 INFINITY) t_5 (+ (/ z b) (* (/ t b) (/ x y))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = 1.0 + (a + t_1);
double t_3 = x + ((y * z) / t);
double t_4 = t_3 / (t_1 + (a + 1.0));
double t_5 = z * ((x / (z * t_2)) + (y / (t * t_2)));
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = t_5;
} else if (t_4 <= 2e+241) {
tmp = t_3 / ((b * (y / t)) + (a + 1.0));
} else if (t_4 <= ((double) INFINITY)) {
tmp = t_5;
} else {
tmp = (z / b) + ((t / b) * (x / y));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = 1.0 + (a + t_1);
double t_3 = x + ((y * z) / t);
double t_4 = t_3 / (t_1 + (a + 1.0));
double t_5 = z * ((x / (z * t_2)) + (y / (t * t_2)));
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = t_5;
} else if (t_4 <= 2e+241) {
tmp = t_3 / ((b * (y / t)) + (a + 1.0));
} else if (t_4 <= Double.POSITIVE_INFINITY) {
tmp = t_5;
} else {
tmp = (z / b) + ((t / b) * (x / y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = 1.0 + (a + t_1) t_3 = x + ((y * z) / t) t_4 = t_3 / (t_1 + (a + 1.0)) t_5 = z * ((x / (z * t_2)) + (y / (t * t_2))) tmp = 0 if t_4 <= -math.inf: tmp = t_5 elif t_4 <= 2e+241: tmp = t_3 / ((b * (y / t)) + (a + 1.0)) elif t_4 <= math.inf: tmp = t_5 else: tmp = (z / b) + ((t / b) * (x / y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(1.0 + Float64(a + t_1)) t_3 = Float64(x + Float64(Float64(y * z) / t)) t_4 = Float64(t_3 / Float64(t_1 + Float64(a + 1.0))) t_5 = Float64(z * Float64(Float64(x / Float64(z * t_2)) + Float64(y / Float64(t * t_2)))) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = t_5; elseif (t_4 <= 2e+241) tmp = Float64(t_3 / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); elseif (t_4 <= Inf) tmp = t_5; else tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = 1.0 + (a + t_1); t_3 = x + ((y * z) / t); t_4 = t_3 / (t_1 + (a + 1.0)); t_5 = z * ((x / (z * t_2)) + (y / (t * t_2))); tmp = 0.0; if (t_4 <= -Inf) tmp = t_5; elseif (t_4 <= 2e+241) tmp = t_3 / ((b * (y / t)) + (a + 1.0)); elseif (t_4 <= Inf) tmp = t_5; else tmp = (z / b) + ((t / b) * (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(t$95$3 / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$5 = N[(z * N[(N[(x / N[(z * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], t$95$5, If[LessEqual[t$95$4, 2e+241], N[(t$95$3 / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$4, Infinity], t$95$5, N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := 1 + \left(a + t\_1\right)\\
t_3 := x + \frac{y \cdot z}{t}\\
t_4 := \frac{t\_3}{t\_1 + \left(a + 1\right)}\\
t_5 := z \cdot \left(\frac{x}{z \cdot t\_2} + \frac{y}{t \cdot t\_2}\right)\\
\mathbf{if}\;t\_4 \leq -\infty:\\
\;\;\;\;t\_5\\
\mathbf{elif}\;t\_4 \leq 2 \cdot 10^{+241}:\\
\;\;\;\;\frac{t\_3}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_5\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\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 2.0000000000000001e241 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 28.5%
associate-/l*49.2%
associate-/l*48.9%
Simplified48.9%
Taylor expanded in z around inf 90.1%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e241Initial program 91.5%
*-commutative91.5%
associate-/l*94.0%
Applied egg-rr94.0%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.3%
associate-/l*9.3%
Simplified9.3%
Taylor expanded in b around inf 1.7%
Taylor expanded in z around inf 33.8%
Taylor expanded in z around 0 91.3%
times-frac91.3%
Simplified91.3%
Final simplification93.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (+ x (/ (* y z) t)))
(t_3 (/ t_2 (+ t_1 (+ a 1.0)))))
(if (<= t_3 (- INFINITY))
(* z (+ (/ y (* t (+ 1.0 (+ a t_1)))) (/ (/ x a) z)))
(if (<= t_3 2e+281)
(/ t_2 (+ (* b (/ y t)) (+ a 1.0)))
(+ (/ z b) (/ (* x t) (* y b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / (t_1 + (a + 1.0));
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = z * ((y / (t * (1.0 + (a + t_1)))) + ((x / a) / z));
} else if (t_3 <= 2e+281) {
tmp = t_2 / ((b * (y / t)) + (a + 1.0));
} else {
tmp = (z / b) + ((x * t) / (y * 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);
double t_3 = t_2 / (t_1 + (a + 1.0));
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = z * ((y / (t * (1.0 + (a + t_1)))) + ((x / a) / z));
} else if (t_3 <= 2e+281) {
tmp = t_2 / ((b * (y / t)) + (a + 1.0));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = x + ((y * z) / t) t_3 = t_2 / (t_1 + (a + 1.0)) tmp = 0 if t_3 <= -math.inf: tmp = z * ((y / (t * (1.0 + (a + t_1)))) + ((x / a) / z)) elif t_3 <= 2e+281: tmp = t_2 / ((b * (y / t)) + (a + 1.0)) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(x + Float64(Float64(y * z) / t)) t_3 = Float64(t_2 / Float64(t_1 + Float64(a + 1.0))) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(y / Float64(t * Float64(1.0 + Float64(a + t_1)))) + Float64(Float64(x / a) / z))); elseif (t_3 <= 2e+281) tmp = Float64(t_2 / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); 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) t_1 = (y * b) / t; t_2 = x + ((y * z) / t); t_3 = t_2 / (t_1 + (a + 1.0)); tmp = 0.0; if (t_3 <= -Inf) tmp = z * ((y / (t * (1.0 + (a + t_1)))) + ((x / a) / z)); elseif (t_3 <= 2e+281) tmp = t_2 / ((b * (y / t)) + (a + 1.0)); else tmp = (z / b) + ((x * t) / (y * 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[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(z * N[(N[(y / N[(t * N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x / a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 2e+281], N[(t$95$2 / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $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}
t_1 := \frac{y \cdot b}{t}\\
t_2 := x + \frac{y \cdot z}{t}\\
t_3 := \frac{t\_2}{t\_1 + \left(a + 1\right)}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{y}{t \cdot \left(1 + \left(a + t\_1\right)\right)} + \frac{\frac{x}{a}}{z}\right)\\
\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+281}:\\
\;\;\;\;\frac{t\_2}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot 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 16.4%
associate-/l*40.8%
associate-/l*40.1%
Simplified40.1%
Taylor expanded in z around inf 89.2%
Taylor expanded in a around inf 79.0%
associate-/r*79.0%
Simplified79.0%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e281Initial program 91.6%
*-commutative91.6%
associate-/l*94.1%
Applied egg-rr94.1%
if 2.0000000000000001e281 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 13.5%
associate-/l*23.2%
associate-/l*28.0%
Simplified28.0%
Taylor expanded in b around inf 14.4%
Taylor expanded in t around 0 76.3%
Final simplification90.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))) (t_2 (/ t_1 (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_2 (- INFINITY))
(* (/ y t) (/ z (+ 1.0 (+ a (* y (/ b t))))))
(if (<= t_2 2e+281)
(/ t_1 (+ (* b (/ y t)) (+ a 1.0)))
(+ (/ z b) (/ (* x t) (* y b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (y / t) * (z / (1.0 + (a + (y * (b / t)))));
} else if (t_2 <= 2e+281) {
tmp = t_1 / ((b * (y / t)) + (a + 1.0));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / (1.0 + (a + (y * (b / t)))));
} else if (t_2 <= 2e+281) {
tmp = t_1 / ((b * (y / t)) + (a + 1.0));
} else {
tmp = (z / b) + ((x * t) / (y * b));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = t_1 / (((y * b) / t) + (a + 1.0)) tmp = 0 if t_2 <= -math.inf: tmp = (y / t) * (z / (1.0 + (a + (y * (b / t))))) elif t_2 <= 2e+281: tmp = t_1 / ((b * (y / t)) + (a + 1.0)) else: tmp = (z / b) + ((x * t) / (y * b)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(y / t) * Float64(z / Float64(1.0 + Float64(a + Float64(y * Float64(b / t)))))); elseif (t_2 <= 2e+281) tmp = Float64(t_1 / Float64(Float64(b * Float64(y / t)) + Float64(a + 1.0))); 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) t_1 = x + ((y * z) / t); t_2 = t_1 / (((y * b) / t) + (a + 1.0)); tmp = 0.0; if (t_2 <= -Inf) tmp = (y / t) * (z / (1.0 + (a + (y * (b / t))))); elseif (t_2 <= 2e+281) tmp = t_1 / ((b * (y / t)) + (a + 1.0)); else tmp = (z / b) + ((x * t) / (y * b)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(y / t), $MachinePrecision] * N[(z / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+281], N[(t$95$1 / N[(N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $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}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+281}:\\
\;\;\;\;\frac{t\_1}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot 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 16.4%
associate-/l*40.8%
associate-/l*40.1%
Simplified40.1%
Taylor expanded in x around 0 65.2%
times-frac85.0%
associate-*l/69.8%
*-commutative69.8%
Simplified69.8%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e281Initial program 91.6%
*-commutative91.6%
associate-/l*94.1%
Applied egg-rr94.1%
if 2.0000000000000001e281 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 13.5%
associate-/l*23.2%
associate-/l*28.0%
Simplified28.0%
Taylor expanded in b around inf 14.4%
Taylor expanded in t around 0 76.3%
Final simplification89.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* z (/ y t))) a)))
(if (<= a -1.35e+23)
t_1
(if (<= a -7.8e-66)
(/ z b)
(if (<= a -3.3e-283)
(/ x (+ 1.0 (* y (/ b t))))
(if (<= a 2.25e-217)
(/ z b)
(if (<= a 3.4e-166)
(/ x (+ 1.0 (/ y (/ t b))))
(if (<= a 3.8e+32) (/ z b) t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (z * (y / t))) / a;
double tmp;
if (a <= -1.35e+23) {
tmp = t_1;
} else if (a <= -7.8e-66) {
tmp = z / b;
} else if (a <= -3.3e-283) {
tmp = x / (1.0 + (y * (b / t)));
} else if (a <= 2.25e-217) {
tmp = z / b;
} else if (a <= 3.4e-166) {
tmp = x / (1.0 + (y / (t / b)));
} else if (a <= 3.8e+32) {
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 + (z * (y / t))) / a
if (a <= (-1.35d+23)) then
tmp = t_1
else if (a <= (-7.8d-66)) then
tmp = z / b
else if (a <= (-3.3d-283)) then
tmp = x / (1.0d0 + (y * (b / t)))
else if (a <= 2.25d-217) then
tmp = z / b
else if (a <= 3.4d-166) then
tmp = x / (1.0d0 + (y / (t / b)))
else if (a <= 3.8d+32) 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 + (z * (y / t))) / a;
double tmp;
if (a <= -1.35e+23) {
tmp = t_1;
} else if (a <= -7.8e-66) {
tmp = z / b;
} else if (a <= -3.3e-283) {
tmp = x / (1.0 + (y * (b / t)));
} else if (a <= 2.25e-217) {
tmp = z / b;
} else if (a <= 3.4e-166) {
tmp = x / (1.0 + (y / (t / b)));
} else if (a <= 3.8e+32) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (z * (y / t))) / a tmp = 0 if a <= -1.35e+23: tmp = t_1 elif a <= -7.8e-66: tmp = z / b elif a <= -3.3e-283: tmp = x / (1.0 + (y * (b / t))) elif a <= 2.25e-217: tmp = z / b elif a <= 3.4e-166: tmp = x / (1.0 + (y / (t / b))) elif a <= 3.8e+32: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(z * Float64(y / t))) / a) tmp = 0.0 if (a <= -1.35e+23) tmp = t_1; elseif (a <= -7.8e-66) tmp = Float64(z / b); elseif (a <= -3.3e-283) tmp = Float64(x / Float64(1.0 + Float64(y * Float64(b / t)))); elseif (a <= 2.25e-217) tmp = Float64(z / b); elseif (a <= 3.4e-166) tmp = Float64(x / Float64(1.0 + Float64(y / Float64(t / b)))); elseif (a <= 3.8e+32) 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 + (z * (y / t))) / a; tmp = 0.0; if (a <= -1.35e+23) tmp = t_1; elseif (a <= -7.8e-66) tmp = z / b; elseif (a <= -3.3e-283) tmp = x / (1.0 + (y * (b / t))); elseif (a <= 2.25e-217) tmp = z / b; elseif (a <= 3.4e-166) tmp = x / (1.0 + (y / (t / b))); elseif (a <= 3.8e+32) 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[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -1.35e+23], t$95$1, If[LessEqual[a, -7.8e-66], N[(z / b), $MachinePrecision], If[LessEqual[a, -3.3e-283], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.25e-217], N[(z / b), $MachinePrecision], If[LessEqual[a, 3.4e-166], N[(x / N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.8e+32], N[(z / b), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + z \cdot \frac{y}{t}}{a}\\
\mathbf{if}\;a \leq -1.35 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -7.8 \cdot 10^{-66}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq -3.3 \cdot 10^{-283}:\\
\;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;a \leq 2.25 \cdot 10^{-217}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-166}:\\
\;\;\;\;\frac{x}{1 + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{+32}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.3499999999999999e23 or 3.8000000000000003e32 < a Initial program 74.1%
*-commutative74.1%
associate-/l*74.9%
Applied egg-rr74.9%
Taylor expanded in a around inf 67.4%
if -1.3499999999999999e23 < a < -7.79999999999999965e-66 or -3.30000000000000019e-283 < a < 2.2499999999999999e-217 or 3.3999999999999997e-166 < a < 3.8000000000000003e32Initial program 70.7%
associate-/l*66.0%
associate-/l*63.6%
Simplified63.6%
Taylor expanded in y around inf 64.1%
if -7.79999999999999965e-66 < a < -3.30000000000000019e-283Initial program 72.6%
associate-/l*74.7%
associate-/l*78.8%
Simplified78.8%
Taylor expanded in x around inf 56.0%
associate-*l/60.0%
*-commutative60.0%
Simplified60.0%
Taylor expanded in a around 0 56.0%
associate-*l/60.0%
*-commutative60.0%
Simplified60.0%
if 2.2499999999999999e-217 < a < 3.3999999999999997e-166Initial program 91.3%
associate-/l*91.1%
associate-/l*91.0%
Simplified91.0%
Taylor expanded in x around inf 67.5%
associate-*l/67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in a around 0 67.5%
associate-*l/67.5%
*-commutative67.5%
Simplified67.5%
clear-num91.3%
un-div-inv91.4%
Applied egg-rr67.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) a)))
(if (<= a -1.1e+23)
t_1
(if (<= a -5.8e-66)
(/ z b)
(if (<= a -4.4e-284)
(/ x (+ 1.0 (* y (/ b t))))
(if (<= a 1.35e-217)
(/ z b)
(if (<= a 1.24e-166)
(/ x (+ 1.0 (/ y (/ t b))))
(if (<= a 8.2e+32) (/ 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;
double tmp;
if (a <= -1.1e+23) {
tmp = t_1;
} else if (a <= -5.8e-66) {
tmp = z / b;
} else if (a <= -4.4e-284) {
tmp = x / (1.0 + (y * (b / t)));
} else if (a <= 1.35e-217) {
tmp = z / b;
} else if (a <= 1.24e-166) {
tmp = x / (1.0 + (y / (t / b)));
} else if (a <= 8.2e+32) {
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 + (y * (z / t))) / a
if (a <= (-1.1d+23)) then
tmp = t_1
else if (a <= (-5.8d-66)) then
tmp = z / b
else if (a <= (-4.4d-284)) then
tmp = x / (1.0d0 + (y * (b / t)))
else if (a <= 1.35d-217) then
tmp = z / b
else if (a <= 1.24d-166) then
tmp = x / (1.0d0 + (y / (t / b)))
else if (a <= 8.2d+32) 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 + (y * (z / t))) / a;
double tmp;
if (a <= -1.1e+23) {
tmp = t_1;
} else if (a <= -5.8e-66) {
tmp = z / b;
} else if (a <= -4.4e-284) {
tmp = x / (1.0 + (y * (b / t)));
} else if (a <= 1.35e-217) {
tmp = z / b;
} else if (a <= 1.24e-166) {
tmp = x / (1.0 + (y / (t / b)));
} else if (a <= 8.2e+32) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / a tmp = 0 if a <= -1.1e+23: tmp = t_1 elif a <= -5.8e-66: tmp = z / b elif a <= -4.4e-284: tmp = x / (1.0 + (y * (b / t))) elif a <= 1.35e-217: tmp = z / b elif a <= 1.24e-166: tmp = x / (1.0 + (y / (t / b))) elif a <= 8.2e+32: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / a) tmp = 0.0 if (a <= -1.1e+23) tmp = t_1; elseif (a <= -5.8e-66) tmp = Float64(z / b); elseif (a <= -4.4e-284) tmp = Float64(x / Float64(1.0 + Float64(y * Float64(b / t)))); elseif (a <= 1.35e-217) tmp = Float64(z / b); elseif (a <= 1.24e-166) tmp = Float64(x / Float64(1.0 + Float64(y / Float64(t / b)))); elseif (a <= 8.2e+32) 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; tmp = 0.0; if (a <= -1.1e+23) tmp = t_1; elseif (a <= -5.8e-66) tmp = z / b; elseif (a <= -4.4e-284) tmp = x / (1.0 + (y * (b / t))); elseif (a <= 1.35e-217) tmp = z / b; elseif (a <= 1.24e-166) tmp = x / (1.0 + (y / (t / b))); elseif (a <= 8.2e+32) 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[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -1.1e+23], t$95$1, If[LessEqual[a, -5.8e-66], N[(z / b), $MachinePrecision], If[LessEqual[a, -4.4e-284], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.35e-217], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.24e-166], N[(x / N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 8.2e+32], N[(z / b), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{a}\\
\mathbf{if}\;a \leq -1.1 \cdot 10^{+23}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -5.8 \cdot 10^{-66}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq -4.4 \cdot 10^{-284}:\\
\;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{-217}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 1.24 \cdot 10^{-166}:\\
\;\;\;\;\frac{x}{1 + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{+32}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.10000000000000004e23 or 8.19999999999999961e32 < a Initial program 74.1%
associate-/l*71.6%
associate-/l*73.9%
Simplified73.9%
Taylor expanded in a around inf 64.7%
if -1.10000000000000004e23 < a < -5.80000000000000023e-66 or -4.4000000000000001e-284 < a < 1.35000000000000008e-217 or 1.24e-166 < a < 8.19999999999999961e32Initial program 70.7%
associate-/l*66.0%
associate-/l*63.6%
Simplified63.6%
Taylor expanded in y around inf 64.1%
if -5.80000000000000023e-66 < a < -4.4000000000000001e-284Initial program 72.6%
associate-/l*74.7%
associate-/l*78.8%
Simplified78.8%
Taylor expanded in x around inf 56.0%
associate-*l/60.0%
*-commutative60.0%
Simplified60.0%
Taylor expanded in a around 0 56.0%
associate-*l/60.0%
*-commutative60.0%
Simplified60.0%
if 1.35000000000000008e-217 < a < 1.24e-166Initial program 91.3%
associate-/l*91.1%
associate-/l*91.0%
Simplified91.0%
Taylor expanded in x around inf 67.5%
associate-*l/67.5%
*-commutative67.5%
Simplified67.5%
Taylor expanded in a around 0 67.5%
associate-*l/67.5%
*-commutative67.5%
Simplified67.5%
clear-num91.3%
un-div-inv91.4%
Applied egg-rr67.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -3.95e-75)
(/ x (+ 1.0 (+ a (* y (/ b t)))))
(if (<= t 4.9e-80)
(+ (/ z b) (/ (* x t) (* y b)))
(if (or (<= t 1.26e-67) (not (<= t 1e-10)))
(/ (+ x (* y (/ z t))) (+ a 1.0))
(+ (/ z b) (* (/ t b) (/ x y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.95e-75) {
tmp = x / (1.0 + (a + (y * (b / t))));
} else if (t <= 4.9e-80) {
tmp = (z / b) + ((x * t) / (y * b));
} else if ((t <= 1.26e-67) || !(t <= 1e-10)) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else {
tmp = (z / b) + ((t / b) * (x / y));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-3.95d-75)) then
tmp = x / (1.0d0 + (a + (y * (b / t))))
else if (t <= 4.9d-80) then
tmp = (z / b) + ((x * t) / (y * b))
else if ((t <= 1.26d-67) .or. (.not. (t <= 1d-10))) then
tmp = (x + (y * (z / t))) / (a + 1.0d0)
else
tmp = (z / b) + ((t / b) * (x / y))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.95e-75) {
tmp = x / (1.0 + (a + (y * (b / t))));
} else if (t <= 4.9e-80) {
tmp = (z / b) + ((x * t) / (y * b));
} else if ((t <= 1.26e-67) || !(t <= 1e-10)) {
tmp = (x + (y * (z / t))) / (a + 1.0);
} else {
tmp = (z / b) + ((t / b) * (x / y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -3.95e-75: tmp = x / (1.0 + (a + (y * (b / t)))) elif t <= 4.9e-80: tmp = (z / b) + ((x * t) / (y * b)) elif (t <= 1.26e-67) or not (t <= 1e-10): tmp = (x + (y * (z / t))) / (a + 1.0) else: tmp = (z / b) + ((t / b) * (x / y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3.95e-75) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y * Float64(b / t))))); elseif (t <= 4.9e-80) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif ((t <= 1.26e-67) || !(t <= 1e-10)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0)); else tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -3.95e-75) tmp = x / (1.0 + (a + (y * (b / t)))); elseif (t <= 4.9e-80) tmp = (z / b) + ((x * t) / (y * b)); elseif ((t <= 1.26e-67) || ~((t <= 1e-10))) tmp = (x + (y * (z / t))) / (a + 1.0); else tmp = (z / b) + ((t / b) * (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3.95e-75], N[(x / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.9e-80], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 1.26e-67], N[Not[LessEqual[t, 1e-10]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.95 \cdot 10^{-75}:\\
\;\;\;\;\frac{x}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{elif}\;t \leq 4.9 \cdot 10^{-80}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;t \leq 1.26 \cdot 10^{-67} \lor \neg \left(t \leq 10^{-10}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if t < -3.95e-75Initial program 82.9%
associate-/l*87.4%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in x around inf 71.9%
associate-*l/78.1%
*-commutative78.1%
Simplified78.1%
if -3.95e-75 < t < 4.8999999999999999e-80Initial program 63.3%
associate-/l*50.6%
associate-/l*45.0%
Simplified45.0%
Taylor expanded in b around inf 48.8%
Taylor expanded in t around 0 72.7%
if 4.8999999999999999e-80 < t < 1.26e-67 or 1.00000000000000004e-10 < t Initial program 80.4%
associate-/l*86.6%
associate-/l*89.2%
Simplified89.2%
Taylor expanded in y around 0 71.0%
if 1.26e-67 < t < 1.00000000000000004e-10Initial program 68.0%
associate-/l*67.8%
associate-/l*67.7%
Simplified67.7%
Taylor expanded in b around inf 58.2%
Taylor expanded in z around inf 58.0%
Taylor expanded in z around 0 83.7%
times-frac83.7%
Simplified83.7%
Final simplification74.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.9e-72)
(/ x (+ 1.0 (+ a (* y (/ b t)))))
(if (<= t 2.55e-23)
(+ (/ z b) (/ (* x t) (* y b)))
(if (or (<= t 7.8e+106) (not (<= t 5e+170)))
(/ x (+ 1.0 (+ a (/ y (/ t b)))))
(/ (+ x (* y (/ z t))) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.9e-72) {
tmp = x / (1.0 + (a + (y * (b / t))));
} else if (t <= 2.55e-23) {
tmp = (z / b) + ((x * t) / (y * b));
} else if ((t <= 7.8e+106) || !(t <= 5e+170)) {
tmp = x / (1.0 + (a + (y / (t / b))));
} else {
tmp = (x + (y * (z / t))) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.9d-72)) then
tmp = x / (1.0d0 + (a + (y * (b / t))))
else if (t <= 2.55d-23) then
tmp = (z / b) + ((x * t) / (y * b))
else if ((t <= 7.8d+106) .or. (.not. (t <= 5d+170))) then
tmp = x / (1.0d0 + (a + (y / (t / b))))
else
tmp = (x + (y * (z / t))) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.9e-72) {
tmp = x / (1.0 + (a + (y * (b / t))));
} else if (t <= 2.55e-23) {
tmp = (z / b) + ((x * t) / (y * b));
} else if ((t <= 7.8e+106) || !(t <= 5e+170)) {
tmp = x / (1.0 + (a + (y / (t / b))));
} else {
tmp = (x + (y * (z / t))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.9e-72: tmp = x / (1.0 + (a + (y * (b / t)))) elif t <= 2.55e-23: tmp = (z / b) + ((x * t) / (y * b)) elif (t <= 7.8e+106) or not (t <= 5e+170): tmp = x / (1.0 + (a + (y / (t / b)))) else: tmp = (x + (y * (z / t))) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.9e-72) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y * Float64(b / t))))); elseif (t <= 2.55e-23) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif ((t <= 7.8e+106) || !(t <= 5e+170)) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(y / Float64(t / b))))); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.9e-72) tmp = x / (1.0 + (a + (y * (b / t)))); elseif (t <= 2.55e-23) tmp = (z / b) + ((x * t) / (y * b)); elseif ((t <= 7.8e+106) || ~((t <= 5e+170))) tmp = x / (1.0 + (a + (y / (t / b)))); else tmp = (x + (y * (z / t))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.9e-72], N[(x / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.55e-23], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 7.8e+106], N[Not[LessEqual[t, 5e+170]], $MachinePrecision]], N[(x / N[(1.0 + N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{-72}:\\
\;\;\;\;\frac{x}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{elif}\;t \leq 2.55 \cdot 10^{-23}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+106} \lor \neg \left(t \leq 5 \cdot 10^{+170}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y}{\frac{t}{b}}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\
\end{array}
\end{array}
if t < -2.89999999999999998e-72Initial program 82.9%
associate-/l*87.4%
associate-/l*97.2%
Simplified97.2%
Taylor expanded in x around inf 71.9%
associate-*l/78.1%
*-commutative78.1%
Simplified78.1%
if -2.89999999999999998e-72 < t < 2.55000000000000005e-23Initial program 64.1%
associate-/l*52.8%
associate-/l*47.7%
Simplified47.7%
Taylor expanded in b around inf 46.4%
Taylor expanded in t around 0 69.9%
if 2.55000000000000005e-23 < t < 7.79999999999999937e106 or 4.99999999999999977e170 < t Initial program 78.9%
associate-/l*85.6%
associate-/l*89.0%
Simplified89.0%
Taylor expanded in x around inf 58.7%
associate-*l/62.1%
*-commutative62.1%
Simplified62.1%
clear-num89.1%
un-div-inv89.1%
Applied egg-rr62.1%
if 7.79999999999999937e106 < t < 4.99999999999999977e170Initial program 86.8%
associate-/l*93.0%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in a around inf 80.2%
Final simplification71.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ x (+ 1.0 (+ a (* y (/ b t)))))))
(if (<= t -2.8e-76)
t_1
(if (<= t 4.3e-26)
(+ (/ z b) (/ (* x t) (* y b)))
(if (or (<= t 7.8e+106) (not (<= t 5.2e+170)))
t_1
(/ (+ x (* y (/ z t))) a))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 + (a + (y * (b / t))));
double tmp;
if (t <= -2.8e-76) {
tmp = t_1;
} else if (t <= 4.3e-26) {
tmp = (z / b) + ((x * t) / (y * b));
} else if ((t <= 7.8e+106) || !(t <= 5.2e+170)) {
tmp = t_1;
} else {
tmp = (x + (y * (z / t))) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = x / (1.0d0 + (a + (y * (b / t))))
if (t <= (-2.8d-76)) then
tmp = t_1
else if (t <= 4.3d-26) then
tmp = (z / b) + ((x * t) / (y * b))
else if ((t <= 7.8d+106) .or. (.not. (t <= 5.2d+170))) then
tmp = t_1
else
tmp = (x + (y * (z / t))) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x / (1.0 + (a + (y * (b / t))));
double tmp;
if (t <= -2.8e-76) {
tmp = t_1;
} else if (t <= 4.3e-26) {
tmp = (z / b) + ((x * t) / (y * b));
} else if ((t <= 7.8e+106) || !(t <= 5.2e+170)) {
tmp = t_1;
} else {
tmp = (x + (y * (z / t))) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x / (1.0 + (a + (y * (b / t)))) tmp = 0 if t <= -2.8e-76: tmp = t_1 elif t <= 4.3e-26: tmp = (z / b) + ((x * t) / (y * b)) elif (t <= 7.8e+106) or not (t <= 5.2e+170): tmp = t_1 else: tmp = (x + (y * (z / t))) / a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x / Float64(1.0 + Float64(a + Float64(y * Float64(b / t))))) tmp = 0.0 if (t <= -2.8e-76) tmp = t_1; elseif (t <= 4.3e-26) tmp = Float64(Float64(z / b) + Float64(Float64(x * t) / Float64(y * b))); elseif ((t <= 7.8e+106) || !(t <= 5.2e+170)) tmp = t_1; else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x / (1.0 + (a + (y * (b / t)))); tmp = 0.0; if (t <= -2.8e-76) tmp = t_1; elseif (t <= 4.3e-26) tmp = (z / b) + ((x * t) / (y * b)); elseif ((t <= 7.8e+106) || ~((t <= 5.2e+170))) tmp = t_1; else tmp = (x + (y * (z / t))) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e-76], t$95$1, If[LessEqual[t, 4.3e-26], N[(N[(z / b), $MachinePrecision] + N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 7.8e+106], N[Not[LessEqual[t, 5.2e+170]], $MachinePrecision]], t$95$1, N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{if}\;t \leq -2.8 \cdot 10^{-76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 4.3 \cdot 10^{-26}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\
\mathbf{elif}\;t \leq 7.8 \cdot 10^{+106} \lor \neg \left(t \leq 5.2 \cdot 10^{+170}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\
\end{array}
\end{array}
if t < -2.8000000000000001e-76 or 4.29999999999999988e-26 < t < 7.79999999999999937e106 or 5.1999999999999996e170 < t Initial program 81.2%
associate-/l*86.6%
associate-/l*93.6%
Simplified93.6%
Taylor expanded in x around inf 66.0%
associate-*l/71.0%
*-commutative71.0%
Simplified71.0%
if -2.8000000000000001e-76 < t < 4.29999999999999988e-26Initial program 64.1%
associate-/l*52.8%
associate-/l*47.7%
Simplified47.7%
Taylor expanded in b around inf 46.4%
Taylor expanded in t around 0 69.9%
if 7.79999999999999937e106 < t < 5.1999999999999996e170Initial program 86.8%
associate-/l*93.0%
associate-/l*93.3%
Simplified93.3%
Taylor expanded in a around inf 80.2%
Final simplification71.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (/ (* x t) (* y b)))) (t_2 (/ (+ x (* z (/ y t))) a)))
(if (<= a -4.4e+79)
t_2
(if (<= a -1.15e-90)
t_1
(if (<= a -2.05e-215)
(/ x (+ 1.0 (* y (/ b t))))
(if (<= a 9e+31) 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 + (z * (y / t))) / a;
double tmp;
if (a <= -4.4e+79) {
tmp = t_2;
} else if (a <= -1.15e-90) {
tmp = t_1;
} else if (a <= -2.05e-215) {
tmp = x / (1.0 + (y * (b / t)));
} else if (a <= 9e+31) {
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 + (z * (y / t))) / a
if (a <= (-4.4d+79)) then
tmp = t_2
else if (a <= (-1.15d-90)) then
tmp = t_1
else if (a <= (-2.05d-215)) then
tmp = x / (1.0d0 + (y * (b / t)))
else if (a <= 9d+31) 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 + (z * (y / t))) / a;
double tmp;
if (a <= -4.4e+79) {
tmp = t_2;
} else if (a <= -1.15e-90) {
tmp = t_1;
} else if (a <= -2.05e-215) {
tmp = x / (1.0 + (y * (b / t)));
} else if (a <= 9e+31) {
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 + (z * (y / t))) / a tmp = 0 if a <= -4.4e+79: tmp = t_2 elif a <= -1.15e-90: tmp = t_1 elif a <= -2.05e-215: tmp = x / (1.0 + (y * (b / t))) elif a <= 9e+31: 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(Float64(x + Float64(z * Float64(y / t))) / a) tmp = 0.0 if (a <= -4.4e+79) tmp = t_2; elseif (a <= -1.15e-90) tmp = t_1; elseif (a <= -2.05e-215) tmp = Float64(x / Float64(1.0 + Float64(y * Float64(b / t)))); elseif (a <= 9e+31) 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 + (z * (y / t))) / a; tmp = 0.0; if (a <= -4.4e+79) tmp = t_2; elseif (a <= -1.15e-90) tmp = t_1; elseif (a <= -2.05e-215) tmp = x / (1.0 + (y * (b / t))); elseif (a <= 9e+31) 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[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -4.4e+79], t$95$2, If[LessEqual[a, -1.15e-90], t$95$1, If[LessEqual[a, -2.05e-215], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9e+31], 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 + z \cdot \frac{y}{t}}{a}\\
\mathbf{if}\;a \leq -4.4 \cdot 10^{+79}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1.15 \cdot 10^{-90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.05 \cdot 10^{-215}:\\
\;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;a \leq 9 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -4.3999999999999998e79 or 8.9999999999999992e31 < a Initial program 74.7%
*-commutative74.7%
associate-/l*75.6%
Applied egg-rr75.6%
Taylor expanded in a around inf 70.1%
if -4.3999999999999998e79 < a < -1.1499999999999999e-90 or -2.04999999999999992e-215 < a < 8.9999999999999992e31Initial program 71.0%
associate-/l*68.6%
associate-/l*67.7%
Simplified67.7%
Taylor expanded in b around inf 45.7%
Taylor expanded in t around 0 66.7%
if -1.1499999999999999e-90 < a < -2.04999999999999992e-215Initial program 81.5%
associate-/l*81.7%
associate-/l*85.3%
Simplified85.3%
Taylor expanded in x around inf 63.1%
associate-*l/66.8%
*-commutative66.8%
Simplified66.8%
Taylor expanded in a around 0 63.1%
associate-*l/66.8%
*-commutative66.8%
Simplified66.8%
Final simplification68.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (* (/ t b) (/ x y)))) (t_2 (/ (+ x (* z (/ y t))) a)))
(if (<= a -1e+83)
t_2
(if (<= a -2.9e-96)
t_1
(if (<= a -2.65e-215)
(/ x (+ 1.0 (* y (/ b t))))
(if (<= a 1.95e+31) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t / b) * (x / y));
double t_2 = (x + (z * (y / t))) / a;
double tmp;
if (a <= -1e+83) {
tmp = t_2;
} else if (a <= -2.9e-96) {
tmp = t_1;
} else if (a <= -2.65e-215) {
tmp = x / (1.0 + (y * (b / t)));
} else if (a <= 1.95e+31) {
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) + ((t / b) * (x / y))
t_2 = (x + (z * (y / t))) / a
if (a <= (-1d+83)) then
tmp = t_2
else if (a <= (-2.9d-96)) then
tmp = t_1
else if (a <= (-2.65d-215)) then
tmp = x / (1.0d0 + (y * (b / t)))
else if (a <= 1.95d+31) 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) + ((t / b) * (x / y));
double t_2 = (x + (z * (y / t))) / a;
double tmp;
if (a <= -1e+83) {
tmp = t_2;
} else if (a <= -2.9e-96) {
tmp = t_1;
} else if (a <= -2.65e-215) {
tmp = x / (1.0 + (y * (b / t)));
} else if (a <= 1.95e+31) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((t / b) * (x / y)) t_2 = (x + (z * (y / t))) / a tmp = 0 if a <= -1e+83: tmp = t_2 elif a <= -2.9e-96: tmp = t_1 elif a <= -2.65e-215: tmp = x / (1.0 + (y * (b / t))) elif a <= 1.95e+31: 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(t / b) * Float64(x / y))) t_2 = Float64(Float64(x + Float64(z * Float64(y / t))) / a) tmp = 0.0 if (a <= -1e+83) tmp = t_2; elseif (a <= -2.9e-96) tmp = t_1; elseif (a <= -2.65e-215) tmp = Float64(x / Float64(1.0 + Float64(y * Float64(b / t)))); elseif (a <= 1.95e+31) 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) + ((t / b) * (x / y)); t_2 = (x + (z * (y / t))) / a; tmp = 0.0; if (a <= -1e+83) tmp = t_2; elseif (a <= -2.9e-96) tmp = t_1; elseif (a <= -2.65e-215) tmp = x / (1.0 + (y * (b / t))); elseif (a <= 1.95e+31) 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[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -1e+83], t$95$2, If[LessEqual[a, -2.9e-96], t$95$1, If[LessEqual[a, -2.65e-215], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.95e+31], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
t_2 := \frac{x + z \cdot \frac{y}{t}}{a}\\
\mathbf{if}\;a \leq -1 \cdot 10^{+83}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -2.9 \cdot 10^{-96}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.65 \cdot 10^{-215}:\\
\;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;a \leq 1.95 \cdot 10^{+31}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.00000000000000003e83 or 1.95e31 < a Initial program 74.7%
*-commutative74.7%
associate-/l*75.6%
Applied egg-rr75.6%
Taylor expanded in a around inf 70.1%
if -1.00000000000000003e83 < a < -2.89999999999999994e-96 or -2.6499999999999998e-215 < a < 1.95e31Initial program 71.0%
associate-/l*68.6%
associate-/l*67.7%
Simplified67.7%
Taylor expanded in b around inf 45.7%
Taylor expanded in z around inf 54.0%
Taylor expanded in z around 0 66.7%
times-frac65.1%
Simplified65.1%
if -2.89999999999999994e-96 < a < -2.6499999999999998e-215Initial program 81.5%
associate-/l*81.7%
associate-/l*85.3%
Simplified85.3%
Taylor expanded in x around inf 63.1%
associate-*l/66.8%
*-commutative66.8%
Simplified66.8%
Taylor expanded in a around 0 63.1%
associate-*l/66.8%
*-commutative66.8%
Simplified66.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -5.2e-48)
(/ z b)
(if (<= y 2e-12)
(/ x (+ a 1.0))
(if (<= y 1.1e+68)
(/ (* y (/ z t)) (+ a 1.0))
(if (<= y 2.7e+105) (/ x (+ 1.0 (/ y (/ t b)))) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.2e-48) {
tmp = z / b;
} else if (y <= 2e-12) {
tmp = x / (a + 1.0);
} else if (y <= 1.1e+68) {
tmp = (y * (z / t)) / (a + 1.0);
} else if (y <= 2.7e+105) {
tmp = x / (1.0 + (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 <= (-5.2d-48)) then
tmp = z / b
else if (y <= 2d-12) then
tmp = x / (a + 1.0d0)
else if (y <= 1.1d+68) then
tmp = (y * (z / t)) / (a + 1.0d0)
else if (y <= 2.7d+105) then
tmp = x / (1.0d0 + (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 <= -5.2e-48) {
tmp = z / b;
} else if (y <= 2e-12) {
tmp = x / (a + 1.0);
} else if (y <= 1.1e+68) {
tmp = (y * (z / t)) / (a + 1.0);
} else if (y <= 2.7e+105) {
tmp = x / (1.0 + (y / (t / b)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -5.2e-48: tmp = z / b elif y <= 2e-12: tmp = x / (a + 1.0) elif y <= 1.1e+68: tmp = (y * (z / t)) / (a + 1.0) elif y <= 2.7e+105: tmp = x / (1.0 + (y / (t / b))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -5.2e-48) tmp = Float64(z / b); elseif (y <= 2e-12) tmp = Float64(x / Float64(a + 1.0)); elseif (y <= 1.1e+68) tmp = Float64(Float64(y * Float64(z / t)) / Float64(a + 1.0)); elseif (y <= 2.7e+105) tmp = Float64(x / Float64(1.0 + 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 <= -5.2e-48) tmp = z / b; elseif (y <= 2e-12) tmp = x / (a + 1.0); elseif (y <= 1.1e+68) tmp = (y * (z / t)) / (a + 1.0); elseif (y <= 2.7e+105) tmp = x / (1.0 + (y / (t / b))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5.2e-48], N[(z / b), $MachinePrecision], If[LessEqual[y, 2e-12], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.1e+68], N[(N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.7e+105], N[(x / N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{-48}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-12}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{+68}:\\
\;\;\;\;\frac{y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{+105}:\\
\;\;\;\;\frac{x}{1 + \frac{y}{\frac{t}{b}}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -5.19999999999999975e-48 or 2.70000000000000016e105 < y Initial program 53.9%
associate-/l*60.6%
associate-/l*66.4%
Simplified66.4%
Taylor expanded in y around inf 60.7%
if -5.19999999999999975e-48 < y < 1.99999999999999996e-12Initial program 92.7%
associate-/l*81.4%
associate-/l*76.5%
Simplified76.5%
Taylor expanded in y around 0 61.3%
if 1.99999999999999996e-12 < y < 1.09999999999999994e68Initial program 75.6%
*-commutative75.6%
associate-/l*69.4%
Applied egg-rr69.4%
Taylor expanded in y around 0 57.4%
Taylor expanded in x around 0 45.5%
associate-/l*45.5%
Simplified45.5%
if 1.09999999999999994e68 < y < 2.70000000000000016e105Initial program 58.3%
associate-/l*59.1%
associate-/l*86.1%
Simplified86.1%
Taylor expanded in x around inf 59.1%
associate-*l/86.1%
*-commutative86.1%
Simplified86.1%
Taylor expanded in a around 0 45.2%
associate-*l/72.1%
*-commutative72.1%
Simplified72.1%
clear-num86.1%
un-div-inv86.3%
Applied egg-rr72.3%
Final simplification60.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -7.4e+79) (not (<= y 1.32e+101))) (+ (/ z b) (* (/ t b) (/ x y))) (/ (+ x (* z (/ y t))) (+ (/ (* y b) t) (+ a 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.4e+79) || !(y <= 1.32e+101)) {
tmp = (z / b) + ((t / b) * (x / y));
} else {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-7.4d+79)) .or. (.not. (y <= 1.32d+101))) then
tmp = (z / b) + ((t / b) * (x / y))
else
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.4e+79) || !(y <= 1.32e+101)) {
tmp = (z / b) + ((t / b) * (x / y));
} else {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -7.4e+79) or not (y <= 1.32e+101): tmp = (z / b) + ((t / b) * (x / y)) else: tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -7.4e+79) || !(y <= 1.32e+101)) tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -7.4e+79) || ~((y <= 1.32e+101))) tmp = (z / b) + ((t / b) * (x / y)); else tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -7.4e+79], N[Not[LessEqual[y, 1.32e+101]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.4 \cdot 10^{+79} \lor \neg \left(y \leq 1.32 \cdot 10^{+101}\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\end{array}
\end{array}
if y < -7.40000000000000019e79 or 1.32e101 < y Initial program 41.4%
associate-/l*48.1%
associate-/l*58.3%
Simplified58.3%
Taylor expanded in b around inf 34.3%
Taylor expanded in z around inf 43.7%
Taylor expanded in z around 0 69.4%
times-frac77.2%
Simplified77.2%
if -7.40000000000000019e79 < y < 1.32e101Initial program 89.3%
*-commutative89.3%
associate-/l*90.3%
Applied egg-rr90.3%
Final simplification86.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.85e-77) (not (<= t 1.3e-94))) (/ (+ 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.85e-77) || !(t <= 1.3e-94)) {
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.85d-77)) .or. (.not. (t <= 1.3d-94))) 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.85e-77) || !(t <= 1.3e-94)) {
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.85e-77) or not (t <= 1.3e-94): 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.85e-77) || !(t <= 1.3e-94)) 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.85e-77) || ~((t <= 1.3e-94))) 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.85e-77], N[Not[LessEqual[t, 1.3e-94]], $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.85 \cdot 10^{-77} \lor \neg \left(t \leq 1.3 \cdot 10^{-94}\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.84999999999999998e-77 or 1.29999999999999997e-94 < t Initial program 81.2%
associate-/l*86.1%
associate-/l*91.7%
Simplified91.7%
clear-num91.6%
un-div-inv91.7%
Applied egg-rr91.7%
if -1.84999999999999998e-77 < t < 1.29999999999999997e-94Initial program 62.2%
associate-/l*49.2%
associate-/l*43.4%
Simplified43.4%
Taylor expanded in b around inf 48.3%
Taylor expanded in t around 0 72.9%
Final simplification84.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -6.5e-80) (not (<= t 1.26e-89))) (/ (+ 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 <= -6.5e-80) || !(t <= 1.26e-89)) {
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 <= (-6.5d-80)) .or. (.not. (t <= 1.26d-89))) 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 <= -6.5e-80) || !(t <= 1.26e-89)) {
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 <= -6.5e-80) or not (t <= 1.26e-89): 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 <= -6.5e-80) || !(t <= 1.26e-89)) 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 <= -6.5e-80) || ~((t <= 1.26e-89))) 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, -6.5e-80], N[Not[LessEqual[t, 1.26e-89]], $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 -6.5 \cdot 10^{-80} \lor \neg \left(t \leq 1.26 \cdot 10^{-89}\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 < -6.49999999999999984e-80 or 1.25999999999999995e-89 < t Initial program 81.2%
associate-/l*86.1%
associate-/l*91.7%
Simplified91.7%
if -6.49999999999999984e-80 < t < 1.25999999999999995e-89Initial program 62.2%
associate-/l*49.2%
associate-/l*43.4%
Simplified43.4%
Taylor expanded in b around inf 48.3%
Taylor expanded in t around 0 72.9%
Final simplification84.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (* (/ t b) (/ x y)))))
(if (<= y -5.8e+76)
t_1
(if (<= y -5.5e-47)
(/ (* y z) (* t (+ 1.0 (+ a (/ (* y b) t)))))
(if (<= y 1.15e+103) (/ (+ x (* z (/ y t))) (+ a 1.0)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t / b) * (x / y));
double tmp;
if (y <= -5.8e+76) {
tmp = t_1;
} else if (y <= -5.5e-47) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (y <= 1.15e+103) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z / b) + ((t / b) * (x / y))
if (y <= (-5.8d+76)) then
tmp = t_1
else if (y <= (-5.5d-47)) then
tmp = (y * z) / (t * (1.0d0 + (a + ((y * b) / t))))
else if (y <= 1.15d+103) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t / b) * (x / y));
double tmp;
if (y <= -5.8e+76) {
tmp = t_1;
} else if (y <= -5.5e-47) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (y <= 1.15e+103) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((t / b) * (x / y)) tmp = 0 if y <= -5.8e+76: tmp = t_1 elif y <= -5.5e-47: tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))) elif y <= 1.15e+103: tmp = (x + (z * (y / t))) / (a + 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))) tmp = 0.0 if (y <= -5.8e+76) tmp = t_1; elseif (y <= -5.5e-47) tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))))); elseif (y <= 1.15e+103) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((t / b) * (x / y)); tmp = 0.0; if (y <= -5.8e+76) tmp = t_1; elseif (y <= -5.5e-47) tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))); elseif (y <= 1.15e+103) tmp = (x + (z * (y / t))) / (a + 1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.8e+76], t$95$1, If[LessEqual[y, -5.5e-47], 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, 1.15e+103], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -5.8 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{-47}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\
\mathbf{elif}\;y \leq 1.15 \cdot 10^{+103}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -5.8000000000000003e76 or 1.15000000000000004e103 < y Initial program 41.1%
associate-/l*49.2%
associate-/l*58.4%
Simplified58.4%
Taylor expanded in b around inf 35.1%
Taylor expanded in z around inf 44.7%
Taylor expanded in z around 0 71.1%
times-frac77.9%
Simplified77.9%
if -5.8000000000000003e76 < y < -5.5000000000000002e-47Initial program 85.1%
associate-/l*88.2%
associate-/l*88.1%
Simplified88.1%
Taylor expanded in x around 0 69.8%
if -5.5000000000000002e-47 < y < 1.15000000000000004e103Initial program 89.7%
*-commutative89.7%
associate-/l*90.2%
Applied egg-rr90.2%
Taylor expanded in y around 0 70.9%
Final simplification73.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (* (/ t b) (/ x y)))))
(if (<= y -2.1e+78)
t_1
(if (<= y -6e-45)
(* (/ y t) (/ z (+ 1.0 (+ a (* y (/ b t))))))
(if (<= y 1.2e+104) (/ (+ x (* z (/ y t))) (+ a 1.0)) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t / b) * (x / y));
double tmp;
if (y <= -2.1e+78) {
tmp = t_1;
} else if (y <= -6e-45) {
tmp = (y / t) * (z / (1.0 + (a + (y * (b / t)))));
} else if (y <= 1.2e+104) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z / b) + ((t / b) * (x / y))
if (y <= (-2.1d+78)) then
tmp = t_1
else if (y <= (-6d-45)) then
tmp = (y / t) * (z / (1.0d0 + (a + (y * (b / t)))))
else if (y <= 1.2d+104) then
tmp = (x + (z * (y / t))) / (a + 1.0d0)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t / b) * (x / y));
double tmp;
if (y <= -2.1e+78) {
tmp = t_1;
} else if (y <= -6e-45) {
tmp = (y / t) * (z / (1.0 + (a + (y * (b / t)))));
} else if (y <= 1.2e+104) {
tmp = (x + (z * (y / t))) / (a + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((t / b) * (x / y)) tmp = 0 if y <= -2.1e+78: tmp = t_1 elif y <= -6e-45: tmp = (y / t) * (z / (1.0 + (a + (y * (b / t))))) elif y <= 1.2e+104: tmp = (x + (z * (y / t))) / (a + 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))) tmp = 0.0 if (y <= -2.1e+78) tmp = t_1; elseif (y <= -6e-45) tmp = Float64(Float64(y / t) * Float64(z / Float64(1.0 + Float64(a + Float64(y * Float64(b / t)))))); elseif (y <= 1.2e+104) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((t / b) * (x / y)); tmp = 0.0; if (y <= -2.1e+78) tmp = t_1; elseif (y <= -6e-45) tmp = (y / t) * (z / (1.0 + (a + (y * (b / t))))); elseif (y <= 1.2e+104) tmp = (x + (z * (y / t))) / (a + 1.0); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -2.1e+78], t$95$1, If[LessEqual[y, -6e-45], N[(N[(y / t), $MachinePrecision] * N[(z / N[(1.0 + N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.2e+104], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -2.1 \cdot 10^{+78}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6 \cdot 10^{-45}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + y \cdot \frac{b}{t}\right)}\\
\mathbf{elif}\;y \leq 1.2 \cdot 10^{+104}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.1000000000000001e78 or 1.2e104 < y Initial program 41.1%
associate-/l*49.2%
associate-/l*58.4%
Simplified58.4%
Taylor expanded in b around inf 35.1%
Taylor expanded in z around inf 44.7%
Taylor expanded in z around 0 71.1%
times-frac77.9%
Simplified77.9%
if -2.1000000000000001e78 < y < -6.00000000000000022e-45Initial program 85.1%
associate-/l*88.2%
associate-/l*88.1%
Simplified88.1%
Taylor expanded in x around 0 69.8%
times-frac69.7%
associate-*l/69.7%
*-commutative69.7%
Simplified69.7%
if -6.00000000000000022e-45 < y < 1.2e104Initial program 89.7%
*-commutative89.7%
associate-/l*90.2%
Applied egg-rr90.2%
Taylor expanded in y around 0 70.9%
Final simplification73.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -4.9e+119)
(/ x a)
(if (<= a -2.7e-94)
(/ z b)
(if (<= a -3.65e-215) x (if (<= a 9.5e+50) (/ z b) (/ x a))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4.9e+119) {
tmp = x / a;
} else if (a <= -2.7e-94) {
tmp = z / b;
} else if (a <= -3.65e-215) {
tmp = x;
} else if (a <= 9.5e+50) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-4.9d+119)) then
tmp = x / a
else if (a <= (-2.7d-94)) then
tmp = z / b
else if (a <= (-3.65d-215)) then
tmp = x
else if (a <= 9.5d+50) then
tmp = z / b
else
tmp = x / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -4.9e+119) {
tmp = x / a;
} else if (a <= -2.7e-94) {
tmp = z / b;
} else if (a <= -3.65e-215) {
tmp = x;
} else if (a <= 9.5e+50) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -4.9e+119: tmp = x / a elif a <= -2.7e-94: tmp = z / b elif a <= -3.65e-215: tmp = x elif a <= 9.5e+50: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -4.9e+119) tmp = Float64(x / a); elseif (a <= -2.7e-94) tmp = Float64(z / b); elseif (a <= -3.65e-215) tmp = x; elseif (a <= 9.5e+50) tmp = Float64(z / b); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -4.9e+119) tmp = x / a; elseif (a <= -2.7e-94) tmp = z / b; elseif (a <= -3.65e-215) tmp = x; elseif (a <= 9.5e+50) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -4.9e+119], N[(x / a), $MachinePrecision], If[LessEqual[a, -2.7e-94], N[(z / b), $MachinePrecision], If[LessEqual[a, -3.65e-215], x, If[LessEqual[a, 9.5e+50], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.9 \cdot 10^{+119}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq -2.7 \cdot 10^{-94}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq -3.65 \cdot 10^{-215}:\\
\;\;\;\;x\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{+50}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -4.89999999999999996e119 or 9.4999999999999993e50 < a Initial program 73.0%
associate-/l*70.9%
associate-/l*73.9%
Simplified73.9%
Taylor expanded in x around inf 53.7%
associate-*l/55.1%
*-commutative55.1%
Simplified55.1%
Taylor expanded in a around inf 52.3%
if -4.89999999999999996e119 < a < -2.7000000000000001e-94 or -3.65000000000000025e-215 < a < 9.4999999999999993e50Initial program 72.4%
associate-/l*69.5%
associate-/l*68.6%
Simplified68.6%
Taylor expanded in y around inf 54.0%
if -2.7000000000000001e-94 < a < -3.65000000000000025e-215Initial program 81.5%
associate-/l*81.7%
associate-/l*85.3%
Simplified85.3%
Taylor expanded in x around inf 63.1%
associate-*l/66.8%
*-commutative66.8%
Simplified66.8%
Taylor expanded in a around 0 63.1%
associate-*l/66.8%
*-commutative66.8%
Simplified66.8%
Taylor expanded in y around 0 46.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.4e-28) (not (<= y 4.8e+102))) (+ (/ z b) (* (/ t b) (/ x y))) (/ (+ x (* z (/ y t))) (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.4e-28) || !(y <= 4.8e+102)) {
tmp = (z / b) + ((t / b) * (x / y));
} else {
tmp = (x + (z * (y / t))) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-5.4d-28)) .or. (.not. (y <= 4.8d+102))) then
tmp = (z / b) + ((t / b) * (x / y))
else
tmp = (x + (z * (y / t))) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.4e-28) || !(y <= 4.8e+102)) {
tmp = (z / b) + ((t / b) * (x / y));
} else {
tmp = (x + (z * (y / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.4e-28) or not (y <= 4.8e+102): tmp = (z / b) + ((t / b) * (x / y)) else: tmp = (x + (z * (y / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.4e-28) || !(y <= 4.8e+102)) tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); else tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.4e-28) || ~((y <= 4.8e+102))) tmp = (z / b) + ((t / b) * (x / y)); else tmp = (x + (z * (y / t))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.4e-28], N[Not[LessEqual[y, 4.8e+102]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{-28} \lor \neg \left(y \leq 4.8 \cdot 10^{+102}\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -5.3999999999999998e-28 or 4.79999999999999989e102 < y Initial program 51.7%
associate-/l*58.8%
associate-/l*65.7%
Simplified65.7%
Taylor expanded in b around inf 38.7%
Taylor expanded in z around inf 46.9%
Taylor expanded in z around 0 67.7%
times-frac72.9%
Simplified72.9%
if -5.3999999999999998e-28 < y < 4.79999999999999989e102Initial program 89.5%
*-commutative89.5%
associate-/l*90.0%
Applied egg-rr90.0%
Taylor expanded in y around 0 70.2%
Final simplification71.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.25e-50) (not (<= y 6.5e+98))) (+ (/ z b) (* (/ t b) (/ x y))) (/ 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 <= -1.25e-50) || !(y <= 6.5e+98)) {
tmp = (z / b) + ((t / b) * (x / y));
} 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 <= (-1.25d-50)) .or. (.not. (y <= 6.5d+98))) then
tmp = (z / b) + ((t / b) * (x / y))
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 <= -1.25e-50) || !(y <= 6.5e+98)) {
tmp = (z / b) + ((t / b) * (x / y));
} else {
tmp = x / (1.0 + (a + ((y * b) / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.25e-50) or not (y <= 6.5e+98): tmp = (z / b) + ((t / b) * (x / y)) else: tmp = x / (1.0 + (a + ((y * b) / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.25e-50) || !(y <= 6.5e+98)) tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); 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 <= -1.25e-50) || ~((y <= 6.5e+98))) tmp = (z / b) + ((t / b) * (x / y)); 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, -1.25e-50], N[Not[LessEqual[y, 6.5e+98]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $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 -1.25 \cdot 10^{-50} \lor \neg \left(y \leq 6.5 \cdot 10^{+98}\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\end{array}
\end{array}
if y < -1.24999999999999992e-50 or 6.4999999999999999e98 < y Initial program 53.4%
associate-/l*59.1%
associate-/l*66.5%
Simplified66.5%
Taylor expanded in b around inf 37.9%
Taylor expanded in z around inf 45.6%
Taylor expanded in z around 0 65.0%
times-frac70.6%
Simplified70.6%
if -1.24999999999999992e-50 < y < 6.4999999999999999e98Initial program 90.2%
associate-/l*81.3%
associate-/l*77.0%
Simplified77.0%
Taylor expanded in x around inf 67.0%
Final simplification68.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.15e-45) (not (<= y 1.06e+103))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.15e-45) || !(y <= 1.06e+103)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.15d-45)) .or. (.not. (y <= 1.06d+103))) then
tmp = z / b
else
tmp = x / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.15e-45) || !(y <= 1.06e+103)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.15e-45) or not (y <= 1.06e+103): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.15e-45) || !(y <= 1.06e+103)) tmp = Float64(z / b); else tmp = Float64(x / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.15e-45) || ~((y <= 1.06e+103))) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.15e-45], N[Not[LessEqual[y, 1.06e+103]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-45} \lor \neg \left(y \leq 1.06 \cdot 10^{+103}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -1.14999999999999996e-45 or 1.0599999999999999e103 < y Initial program 53.5%
associate-/l*60.1%
associate-/l*66.7%
Simplified66.7%
Taylor expanded in y around inf 60.2%
if -1.14999999999999996e-45 < y < 1.0599999999999999e103Initial program 89.7%
associate-/l*80.2%
associate-/l*76.7%
Simplified76.7%
Taylor expanded in y around 0 55.8%
Final simplification57.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.95e-38) (not (<= a 1.0))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.95e-38) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.95d-38)) .or. (.not. (a <= 1.0d0))) then
tmp = x / a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.95e-38) || !(a <= 1.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.95e-38) or not (a <= 1.0): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.95e-38) || !(a <= 1.0)) tmp = Float64(x / a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.95e-38) || ~((a <= 1.0))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.95e-38], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.95 \cdot 10^{-38} \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1.95e-38 or 1 < a Initial program 74.1%
associate-/l*71.8%
associate-/l*73.1%
Simplified73.1%
Taylor expanded in x around inf 49.9%
associate-*l/50.2%
*-commutative50.2%
Simplified50.2%
Taylor expanded in a around inf 44.7%
if -1.95e-38 < a < 1Initial program 72.9%
associate-/l*70.6%
associate-/l*71.3%
Simplified71.3%
Taylor expanded in x around inf 49.3%
associate-*l/50.7%
*-commutative50.7%
Simplified50.7%
Taylor expanded in a around 0 49.3%
associate-*l/50.7%
*-commutative50.7%
Simplified50.7%
Taylor expanded in y around 0 29.7%
Final simplification37.3%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 73.5%
associate-/l*71.3%
associate-/l*72.2%
Simplified72.2%
Taylor expanded in x around inf 49.6%
associate-*l/50.4%
*-commutative50.4%
Simplified50.4%
Taylor expanded in a around 0 29.9%
associate-*l/31.5%
*-commutative31.5%
Simplified31.5%
Taylor expanded in y around 0 16.9%
(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 2024085
(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))))