
(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 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t)))
(t_2 (/ t_1 (+ (/ (* y b) t) (+ a 1.0))))
(t_3 (+ (+ a 1.0) (/ y (/ t b)))))
(if (<= t_2 (- INFINITY))
(* z (+ (/ x (* z t_3)) (/ y (* t t_3))))
(if (<= t_2 2e+302)
(/ t_1 (+ (+ a 1.0) (* b (/ y t))))
(/ (* z (+ 1.0 (* (/ t y) (/ x z)))) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double t_3 = (a + 1.0) + (y / (t / b));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = z * ((x / (z * t_3)) + (y / (t * t_3)));
} else if (t_2 <= 2e+302) {
tmp = t_1 / ((a + 1.0) + (b * (y / t)));
} else {
tmp = (z * (1.0 + ((t / y) * (x / z)))) / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double t_3 = (a + 1.0) + (y / (t / b));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = z * ((x / (z * t_3)) + (y / (t * t_3)));
} else if (t_2 <= 2e+302) {
tmp = t_1 / ((a + 1.0) + (b * (y / t)));
} else {
tmp = (z * (1.0 + ((t / y) * (x / z)))) / 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)) t_3 = (a + 1.0) + (y / (t / b)) tmp = 0 if t_2 <= -math.inf: tmp = z * ((x / (z * t_3)) + (y / (t * t_3))) elif t_2 <= 2e+302: tmp = t_1 / ((a + 1.0) + (b * (y / t))) else: tmp = (z * (1.0 + ((t / y) * (x / z)))) / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) t_3 = Float64(Float64(a + 1.0) + Float64(y / Float64(t / b))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(x / Float64(z * t_3)) + Float64(y / Float64(t * t_3)))); elseif (t_2 <= 2e+302) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = Float64(Float64(z * Float64(1.0 + Float64(Float64(t / y) * Float64(x / z)))) / 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)); t_3 = (a + 1.0) + (y / (t / b)); tmp = 0.0; if (t_2 <= -Inf) tmp = z * ((x / (z * t_3)) + (y / (t * t_3))); elseif (t_2 <= 2e+302) tmp = t_1 / ((a + 1.0) + (b * (y / t))); else tmp = (z * (1.0 + ((t / y) * (x / z)))) / 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]}, Block[{t$95$3 = N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(N[(x / N[(z * t$95$3), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+302], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(1.0 + N[(N[(t / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_3 := \left(a + 1\right) + \frac{y}{\frac{t}{b}}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_3} + \frac{y}{t \cdot t\_3}\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+302}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(1 + \frac{t}{y} \cdot \frac{x}{z}\right)}{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 21.3%
associate-/l*48.0%
associate-/l*48.0%
Simplified48.0%
Taylor expanded in z around inf 78.3%
associate-+r+78.3%
associate-*r/78.3%
*-commutative78.3%
associate-/r/78.3%
associate-+r+78.3%
associate-*r/51.1%
*-commutative51.1%
associate-/r/78.2%
Simplified78.2%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.0000000000000002e302Initial program 92.4%
*-commutative92.4%
associate-/l*92.4%
Applied egg-rr92.4%
if 2.0000000000000002e302 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 10.9%
associate-/l*20.3%
associate-/l*20.4%
Simplified20.4%
Taylor expanded in z around inf 40.3%
associate-+r+40.3%
associate-*r/40.3%
*-commutative40.3%
associate-/r/40.3%
associate-+r+40.3%
associate-*r/33.9%
*-commutative33.9%
associate-/r/40.3%
Simplified40.3%
Taylor expanded in b around inf 84.1%
times-frac90.6%
Simplified90.6%
Final simplification91.2%
(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 (+ (+ a 1.0) (/ y (/ t b)))))
(if (<= t_2 2e+302)
(/ t_1 (+ (+ a 1.0) (* b (/ y t))))
(/ (* z (+ 1.0 (* (/ t y) (/ x z)))) 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 / ((a + 1.0) + (y / (t / b))));
} else if (t_2 <= 2e+302) {
tmp = t_1 / ((a + 1.0) + (b * (y / t)));
} else {
tmp = (z * (1.0 + ((t / y) * (x / z)))) / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / ((a + 1.0) + (y / (t / b))));
} else if (t_2 <= 2e+302) {
tmp = t_1 / ((a + 1.0) + (b * (y / t)));
} else {
tmp = (z * (1.0 + ((t / y) * (x / z)))) / 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 / ((a + 1.0) + (y / (t / b)))) elif t_2 <= 2e+302: tmp = t_1 / ((a + 1.0) + (b * (y / t))) else: tmp = (z * (1.0 + ((t / y) * (x / z)))) / 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(Float64(a + 1.0) + Float64(y / Float64(t / b))))); elseif (t_2 <= 2e+302) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = Float64(Float64(z * Float64(1.0 + Float64(Float64(t / y) * Float64(x / z)))) / 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 / ((a + 1.0) + (y / (t / b)))); elseif (t_2 <= 2e+302) tmp = t_1 / ((a + 1.0) + (b * (y / t))); else tmp = (z * (1.0 + ((t / y) * (x / z)))) / 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[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+302], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(1.0 + N[(N[(t / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+302}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(1 + \frac{t}{y} \cdot \frac{x}{z}\right)}{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 21.3%
associate-/l*48.0%
associate-/l*48.0%
Simplified48.0%
Taylor expanded in x around 0 61.9%
times-frac73.5%
associate-+r+73.5%
associate-*r/61.1%
*-commutative61.1%
associate-/r/73.5%
Simplified73.5%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.0000000000000002e302Initial program 92.4%
*-commutative92.4%
associate-/l*92.4%
Applied egg-rr92.4%
if 2.0000000000000002e302 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 10.9%
associate-/l*20.3%
associate-/l*20.4%
Simplified20.4%
Taylor expanded in z around inf 40.3%
associate-+r+40.3%
associate-*r/40.3%
*-commutative40.3%
associate-/r/40.3%
associate-+r+40.3%
associate-*r/33.9%
*-commutative33.9%
associate-/r/40.3%
Simplified40.3%
Taylor expanded in b around inf 84.1%
times-frac90.6%
Simplified90.6%
Final simplification90.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (* t (/ x y))) b)))
(if (<= y -4.4e+38)
t_1
(if (<= y -1.8e-78)
(/ (* y z) (* t (+ 1.0 (+ a (/ (* y b) t)))))
(if (or (<= y 5.7e+53) (and (not (<= y 1.55e+73)) (<= y 3.1e+91)))
(/ (+ x (/ (* y z) t)) (+ a 1.0))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (t * (x / y))) / b;
double tmp;
if (y <= -4.4e+38) {
tmp = t_1;
} else if (y <= -1.8e-78) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if ((y <= 5.7e+53) || (!(y <= 1.55e+73) && (y <= 3.1e+91))) {
tmp = (x + ((y * z) / 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 + (t * (x / y))) / b
if (y <= (-4.4d+38)) then
tmp = t_1
else if (y <= (-1.8d-78)) then
tmp = (y * z) / (t * (1.0d0 + (a + ((y * b) / t))))
else if ((y <= 5.7d+53) .or. (.not. (y <= 1.55d+73)) .and. (y <= 3.1d+91)) then
tmp = (x + ((y * z) / 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 + (t * (x / y))) / b;
double tmp;
if (y <= -4.4e+38) {
tmp = t_1;
} else if (y <= -1.8e-78) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if ((y <= 5.7e+53) || (!(y <= 1.55e+73) && (y <= 3.1e+91))) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (t * (x / y))) / b tmp = 0 if y <= -4.4e+38: tmp = t_1 elif y <= -1.8e-78: tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))) elif (y <= 5.7e+53) or (not (y <= 1.55e+73) and (y <= 3.1e+91)): tmp = (x + ((y * z) / t)) / (a + 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(t * Float64(x / y))) / b) tmp = 0.0 if (y <= -4.4e+38) tmp = t_1; elseif (y <= -1.8e-78) tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))))); elseif ((y <= 5.7e+53) || (!(y <= 1.55e+73) && (y <= 3.1e+91))) tmp = Float64(Float64(x + Float64(Float64(y * z) / 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 + (t * (x / y))) / b; tmp = 0.0; if (y <= -4.4e+38) tmp = t_1; elseif (y <= -1.8e-78) tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))); elseif ((y <= 5.7e+53) || (~((y <= 1.55e+73)) && (y <= 3.1e+91))) tmp = (x + ((y * z) / 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 + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -4.4e+38], t$95$1, If[LessEqual[y, -1.8e-78], N[(N[(y * z), $MachinePrecision] / N[(t * N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 5.7e+53], And[N[Not[LessEqual[y, 1.55e+73]], $MachinePrecision], LessEqual[y, 3.1e+91]]], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{if}\;y \leq -4.4 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-78}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\
\mathbf{elif}\;y \leq 5.7 \cdot 10^{+53} \lor \neg \left(y \leq 1.55 \cdot 10^{+73}\right) \land y \leq 3.1 \cdot 10^{+91}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.40000000000000013e38 or 5.70000000000000017e53 < y < 1.55e73 or 3.09999999999999998e91 < y Initial program 50.2%
associate-/l*57.7%
associate-/l*61.9%
Simplified61.9%
Taylor expanded in z around inf 62.4%
associate-+r+62.4%
associate-*r/62.5%
*-commutative62.5%
associate-/r/63.5%
associate-+r+63.5%
associate-*r/52.1%
*-commutative52.1%
associate-/r/63.5%
Simplified63.5%
Taylor expanded in b around inf 68.4%
Taylor expanded in z around 0 69.6%
associate-/l*72.6%
Simplified72.6%
if -4.40000000000000013e38 < y < -1.8000000000000001e-78Initial program 91.3%
associate-/l*87.2%
associate-/l*83.1%
Simplified83.1%
Taylor expanded in x around 0 78.5%
if -1.8000000000000001e-78 < y < 5.70000000000000017e53 or 1.55e73 < y < 3.09999999999999998e91Initial program 92.5%
associate-/l*83.8%
associate-/l*78.4%
Simplified78.4%
Taylor expanded in b around 0 78.6%
Final simplification76.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ z (* t (/ x y))) b)))
(if (<= y -2.6e+46)
t_1
(if (<= y -1.9e-78)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (or (<= y 2.6e+57) (and (not (<= y 1.92e+74)) (<= y 1.8e+93)))
(/ (+ x (/ (* y z) t)) (+ a 1.0))
t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + (t * (x / y))) / b;
double tmp;
if (y <= -2.6e+46) {
tmp = t_1;
} else if (y <= -1.9e-78) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if ((y <= 2.6e+57) || (!(y <= 1.92e+74) && (y <= 1.8e+93))) {
tmp = (x + ((y * z) / 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 + (t * (x / y))) / b
if (y <= (-2.6d+46)) then
tmp = t_1
else if (y <= (-1.9d-78)) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else if ((y <= 2.6d+57) .or. (.not. (y <= 1.92d+74)) .and. (y <= 1.8d+93)) then
tmp = (x + ((y * z) / 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 + (t * (x / y))) / b;
double tmp;
if (y <= -2.6e+46) {
tmp = t_1;
} else if (y <= -1.9e-78) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if ((y <= 2.6e+57) || (!(y <= 1.92e+74) && (y <= 1.8e+93))) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + (t * (x / y))) / b tmp = 0 if y <= -2.6e+46: tmp = t_1 elif y <= -1.9e-78: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif (y <= 2.6e+57) or (not (y <= 1.92e+74) and (y <= 1.8e+93)): tmp = (x + ((y * z) / t)) / (a + 1.0) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + Float64(t * Float64(x / y))) / b) tmp = 0.0 if (y <= -2.6e+46) tmp = t_1; elseif (y <= -1.9e-78) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif ((y <= 2.6e+57) || (!(y <= 1.92e+74) && (y <= 1.8e+93))) tmp = Float64(Float64(x + Float64(Float64(y * z) / 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 + (t * (x / y))) / b; tmp = 0.0; if (y <= -2.6e+46) tmp = t_1; elseif (y <= -1.9e-78) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif ((y <= 2.6e+57) || (~((y <= 1.92e+74)) && (y <= 1.8e+93))) tmp = (x + ((y * z) / 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 + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -2.6e+46], t$95$1, If[LessEqual[y, -1.9e-78], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 2.6e+57], And[N[Not[LessEqual[y, 1.92e+74]], $MachinePrecision], LessEqual[y, 1.8e+93]]], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{if}\;y \leq -2.6 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-78}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+57} \lor \neg \left(y \leq 1.92 \cdot 10^{+74}\right) \land y \leq 1.8 \cdot 10^{+93}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.60000000000000013e46 or 2.6e57 < y < 1.92000000000000002e74 or 1.8e93 < y Initial program 50.2%
associate-/l*57.7%
associate-/l*61.9%
Simplified61.9%
Taylor expanded in z around inf 62.4%
associate-+r+62.4%
associate-*r/62.5%
*-commutative62.5%
associate-/r/63.5%
associate-+r+63.5%
associate-*r/52.1%
*-commutative52.1%
associate-/r/63.5%
Simplified63.5%
Taylor expanded in b around inf 68.4%
Taylor expanded in z around 0 69.6%
associate-/l*72.6%
Simplified72.6%
if -2.60000000000000013e46 < y < -1.8999999999999999e-78Initial program 91.3%
associate-/l*87.2%
associate-/l*83.1%
Simplified83.1%
Taylor expanded in x around 0 78.5%
Taylor expanded in t around 0 78.4%
if -1.8999999999999999e-78 < y < 2.6e57 or 1.92000000000000002e74 < y < 1.8e93Initial program 92.5%
associate-/l*83.8%
associate-/l*78.4%
Simplified78.4%
Taylor expanded in b around 0 78.6%
Final simplification76.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- x (* x a))))
(if (<= a -2.6e+148)
(/ x a)
(if (<= a -6.5e-67)
(/ z b)
(if (<= a 9e-282)
t_1
(if (<= a 8.5e-182)
(/ z b)
(if (<= a 6.2e-33) t_1 (if (<= a 1.35e+53) (/ z b) (/ x a)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - (x * a);
double tmp;
if (a <= -2.6e+148) {
tmp = x / a;
} else if (a <= -6.5e-67) {
tmp = z / b;
} else if (a <= 9e-282) {
tmp = t_1;
} else if (a <= 8.5e-182) {
tmp = z / b;
} else if (a <= 6.2e-33) {
tmp = t_1;
} else if (a <= 1.35e+53) {
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) :: t_1
real(8) :: tmp
t_1 = x - (x * a)
if (a <= (-2.6d+148)) then
tmp = x / a
else if (a <= (-6.5d-67)) then
tmp = z / b
else if (a <= 9d-282) then
tmp = t_1
else if (a <= 8.5d-182) then
tmp = z / b
else if (a <= 6.2d-33) then
tmp = t_1
else if (a <= 1.35d+53) 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 t_1 = x - (x * a);
double tmp;
if (a <= -2.6e+148) {
tmp = x / a;
} else if (a <= -6.5e-67) {
tmp = z / b;
} else if (a <= 9e-282) {
tmp = t_1;
} else if (a <= 8.5e-182) {
tmp = z / b;
} else if (a <= 6.2e-33) {
tmp = t_1;
} else if (a <= 1.35e+53) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x - (x * a) tmp = 0 if a <= -2.6e+148: tmp = x / a elif a <= -6.5e-67: tmp = z / b elif a <= 9e-282: tmp = t_1 elif a <= 8.5e-182: tmp = z / b elif a <= 6.2e-33: tmp = t_1 elif a <= 1.35e+53: tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x - Float64(x * a)) tmp = 0.0 if (a <= -2.6e+148) tmp = Float64(x / a); elseif (a <= -6.5e-67) tmp = Float64(z / b); elseif (a <= 9e-282) tmp = t_1; elseif (a <= 8.5e-182) tmp = Float64(z / b); elseif (a <= 6.2e-33) tmp = t_1; elseif (a <= 1.35e+53) tmp = Float64(z / b); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x - (x * a); tmp = 0.0; if (a <= -2.6e+148) tmp = x / a; elseif (a <= -6.5e-67) tmp = z / b; elseif (a <= 9e-282) tmp = t_1; elseif (a <= 8.5e-182) tmp = z / b; elseif (a <= 6.2e-33) tmp = t_1; elseif (a <= 1.35e+53) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x - N[(x * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.6e+148], N[(x / a), $MachinePrecision], If[LessEqual[a, -6.5e-67], N[(z / b), $MachinePrecision], If[LessEqual[a, 9e-282], t$95$1, If[LessEqual[a, 8.5e-182], N[(z / b), $MachinePrecision], If[LessEqual[a, 6.2e-33], t$95$1, If[LessEqual[a, 1.35e+53], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - x \cdot a\\
\mathbf{if}\;a \leq -2.6 \cdot 10^{+148}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;a \leq -6.5 \cdot 10^{-67}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 9 \cdot 10^{-282}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 8.5 \cdot 10^{-182}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{+53}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if a < -2.6e148 or 1.3500000000000001e53 < a Initial program 77.4%
associate-/l*74.1%
associate-/l*72.0%
Simplified72.0%
Taylor expanded in x around inf 58.6%
associate-+r+58.6%
associate-*r/58.8%
*-commutative58.8%
associate-/r/57.7%
Simplified57.7%
Taylor expanded in a around inf 54.3%
if -2.6e148 < a < -6.4999999999999997e-67 or 9.00000000000000017e-282 < a < 8.5000000000000001e-182 or 6.19999999999999994e-33 < a < 1.3500000000000001e53Initial program 74.0%
associate-/l*72.8%
associate-/l*72.5%
Simplified72.5%
Taylor expanded in y around inf 48.4%
if -6.4999999999999997e-67 < a < 9.00000000000000017e-282 or 8.5000000000000001e-182 < a < 6.19999999999999994e-33Initial program 80.9%
associate-/l*77.7%
associate-/l*74.5%
Simplified74.5%
Taylor expanded in y around 0 46.8%
Taylor expanded in a around 0 46.8%
mul-1-neg46.8%
unsub-neg46.8%
*-commutative46.8%
Simplified46.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))))
(if (<= t -4.8e-185)
(/ t_1 (+ (/ (* y b) t) (+ a 1.0)))
(if (<= t 1.8e-137)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t 2.85e-67)
(/ (+ z (* t (/ x y))) b)
(/ t_1 (+ (+ a 1.0) (* y (/ b t)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (y * (z / t));
double tmp;
if (t <= -4.8e-185) {
tmp = t_1 / (((y * b) / t) + (a + 1.0));
} else if (t <= 1.8e-137) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= 2.85e-67) {
tmp = (z + (t * (x / y))) / b;
} else {
tmp = t_1 / ((a + 1.0) + (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) :: t_1
real(8) :: tmp
t_1 = x + (y * (z / t))
if (t <= (-4.8d-185)) then
tmp = t_1 / (((y * b) / t) + (a + 1.0d0))
else if (t <= 1.8d-137) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else if (t <= 2.85d-67) then
tmp = (z + (t * (x / y))) / b
else
tmp = t_1 / ((a + 1.0d0) + (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 t_1 = x + (y * (z / t));
double tmp;
if (t <= -4.8e-185) {
tmp = t_1 / (((y * b) / t) + (a + 1.0));
} else if (t <= 1.8e-137) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= 2.85e-67) {
tmp = (z + (t * (x / y))) / b;
} else {
tmp = t_1 / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (y * (z / t)) tmp = 0 if t <= -4.8e-185: tmp = t_1 / (((y * b) / t) + (a + 1.0)) elif t <= 1.8e-137: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif t <= 2.85e-67: tmp = (z + (t * (x / y))) / b else: tmp = t_1 / ((a + 1.0) + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(y * Float64(z / t))) tmp = 0.0 if (t <= -4.8e-185) tmp = Float64(t_1 / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); elseif (t <= 1.8e-137) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t <= 2.85e-67) tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); else tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (y * (z / t)); tmp = 0.0; if (t <= -4.8e-185) tmp = t_1 / (((y * b) / t) + (a + 1.0)); elseif (t <= 1.8e-137) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif (t <= 2.85e-67) tmp = (z + (t * (x / y))) / b; else tmp = t_1 / ((a + 1.0) + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.8e-185], N[(t$95$1 / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e-137], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.85e-67], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;t \leq -4.8 \cdot 10^{-185}:\\
\;\;\;\;\frac{t\_1}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-137}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 2.85 \cdot 10^{-67}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if t < -4.8000000000000002e-185Initial program 84.6%
associate-*r/84.9%
*-commutative84.9%
Applied egg-rr84.9%
if -4.8000000000000002e-185 < t < 1.80000000000000003e-137Initial program 62.0%
associate-/l*46.1%
associate-/l*36.6%
Simplified36.6%
Taylor expanded in x around 0 64.0%
Taylor expanded in t around 0 75.0%
if 1.80000000000000003e-137 < t < 2.8500000000000001e-67Initial program 68.6%
associate-/l*53.8%
associate-/l*39.3%
Simplified39.3%
Taylor expanded in z around inf 69.3%
associate-+r+69.3%
associate-*r/69.3%
*-commutative69.3%
associate-/r/61.9%
associate-+r+61.9%
associate-*r/61.9%
*-commutative61.9%
associate-/r/57.8%
Simplified57.8%
Taylor expanded in b around inf 80.8%
Taylor expanded in z around 0 88.3%
associate-/l*85.4%
Simplified85.4%
if 2.8500000000000001e-67 < t Initial program 82.0%
associate-/l*87.5%
associate-/l*90.9%
Simplified90.9%
Final simplification84.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))))
(if (<= t -7.4e-185)
t_1
(if (<= t 9.4e-132)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t 2.85e-67) (/ (+ z (* t (/ x y))) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -7.4e-185) {
tmp = t_1;
} else if (t <= 9.4e-132) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= 2.85e-67) {
tmp = (z + (t * (x / y))) / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
if (t <= (-7.4d-185)) then
tmp = t_1
else if (t <= 9.4d-132) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else if (t <= 2.85d-67) then
tmp = (z + (t * (x / y))) / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -7.4e-185) {
tmp = t_1;
} else if (t <= 9.4e-132) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t <= 2.85e-67) {
tmp = (z + (t * (x / y))) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) tmp = 0 if t <= -7.4e-185: tmp = t_1 elif t <= 9.4e-132: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif t <= 2.85e-67: tmp = (z + (t * (x / y))) / 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))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))) tmp = 0.0 if (t <= -7.4e-185) tmp = t_1; elseif (t <= 9.4e-132) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t <= 2.85e-67) tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); tmp = 0.0; if (t <= -7.4e-185) tmp = t_1; elseif (t <= 9.4e-132) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif (t <= 2.85e-67) tmp = (z + (t * (x / y))) / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -7.4e-185], t$95$1, If[LessEqual[t, 9.4e-132], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.85e-67], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{if}\;t \leq -7.4 \cdot 10^{-185}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 9.4 \cdot 10^{-132}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 2.85 \cdot 10^{-67}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -7.4e-185 or 2.8500000000000001e-67 < t Initial program 83.4%
associate-/l*86.1%
associate-/l*87.6%
Simplified87.6%
if -7.4e-185 < t < 9.4000000000000004e-132Initial program 62.0%
associate-/l*46.1%
associate-/l*36.6%
Simplified36.6%
Taylor expanded in x around 0 64.0%
Taylor expanded in t around 0 75.0%
if 9.4000000000000004e-132 < t < 2.8500000000000001e-67Initial program 68.6%
associate-/l*53.8%
associate-/l*39.3%
Simplified39.3%
Taylor expanded in z around inf 69.3%
associate-+r+69.3%
associate-*r/69.3%
*-commutative69.3%
associate-/r/61.9%
associate-+r+61.9%
associate-*r/61.9%
*-commutative61.9%
associate-/r/57.8%
Simplified57.8%
Taylor expanded in b around inf 80.8%
Taylor expanded in z around 0 88.3%
associate-/l*85.4%
Simplified85.4%
Final simplification84.5%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= y -3.25e-37)
(and (not (<= y 6.5e+54)) (or (<= y 1.66e+74) (not (<= y 3.6e+93)))))
(/ (+ z (* t (/ x y))) b)
(/ (+ x (/ (* y z) t)) (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.25e-37) || (!(y <= 6.5e+54) && ((y <= 1.66e+74) || !(y <= 3.6e+93)))) {
tmp = (z + (t * (x / y))) / b;
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-3.25d-37)) .or. (.not. (y <= 6.5d+54)) .and. (y <= 1.66d+74) .or. (.not. (y <= 3.6d+93))) then
tmp = (z + (t * (x / y))) / b
else
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.25e-37) || (!(y <= 6.5e+54) && ((y <= 1.66e+74) || !(y <= 3.6e+93)))) {
tmp = (z + (t * (x / y))) / b;
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.25e-37) or (not (y <= 6.5e+54) and ((y <= 1.66e+74) or not (y <= 3.6e+93))): tmp = (z + (t * (x / y))) / b else: tmp = (x + ((y * z) / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.25e-37) || (!(y <= 6.5e+54) && ((y <= 1.66e+74) || !(y <= 3.6e+93)))) tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.25e-37) || (~((y <= 6.5e+54)) && ((y <= 1.66e+74) || ~((y <= 3.6e+93))))) tmp = (z + (t * (x / y))) / b; else tmp = (x + ((y * z) / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.25e-37], And[N[Not[LessEqual[y, 6.5e+54]], $MachinePrecision], Or[LessEqual[y, 1.66e+74], N[Not[LessEqual[y, 3.6e+93]], $MachinePrecision]]]], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.25 \cdot 10^{-37} \lor \neg \left(y \leq 6.5 \cdot 10^{+54}\right) \land \left(y \leq 1.66 \cdot 10^{+74} \lor \neg \left(y \leq 3.6 \cdot 10^{+93}\right)\right):\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -3.2500000000000001e-37 or 6.5e54 < y < 1.66000000000000001e74 or 3.5999999999999999e93 < y Initial program 55.8%
associate-/l*62.2%
associate-/l*64.9%
Simplified64.9%
Taylor expanded in z around inf 66.1%
associate-+r+66.1%
associate-*r/66.2%
*-commutative66.2%
associate-/r/67.1%
associate-+r+67.1%
associate-*r/57.4%
*-commutative57.4%
associate-/r/66.2%
Simplified66.2%
Taylor expanded in b around inf 66.0%
Taylor expanded in z around 0 67.1%
associate-/l*69.6%
Simplified69.6%
if -3.2500000000000001e-37 < y < 6.5e54 or 1.66000000000000001e74 < y < 3.5999999999999999e93Initial program 92.8%
associate-/l*83.9%
associate-/l*78.7%
Simplified78.7%
Taylor expanded in b around 0 78.3%
Final simplification74.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -6.2e-185)
(/ (+ x (* y (/ z t))) (+ (/ (* y b) t) (+ a 1.0)))
(if (<= t 5.1e-70)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ (+ x (/ y (/ t z))) (+ (+ a 1.0) (* y (/ b t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6.2e-185) {
tmp = (x + (y * (z / t))) / (((y * b) / t) + (a + 1.0));
} else if (t <= 5.1e-70) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-6.2d-185)) then
tmp = (x + (y * (z / t))) / (((y * b) / t) + (a + 1.0d0))
else if (t <= 5.1d-70) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = (x + (y / (t / z))) / ((a + 1.0d0) + (y * (b / t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -6.2e-185) {
tmp = (x + (y * (z / t))) / (((y * b) / t) + (a + 1.0));
} else if (t <= 5.1e-70) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -6.2e-185: tmp = (x + (y * (z / t))) / (((y * b) / t) + (a + 1.0)) elif t <= 5.1e-70: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -6.2e-185) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); elseif (t <= 5.1e-70) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -6.2e-185) tmp = (x + (y * (z / t))) / (((y * b) / t) + (a + 1.0)); elseif (t <= 5.1e-70) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = (x + (y / (t / z))) / ((a + 1.0) + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -6.2e-185], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5.1e-70], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{-185}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{elif}\;t \leq 5.1 \cdot 10^{-70}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if t < -6.1999999999999994e-185Initial program 84.6%
associate-*r/84.9%
*-commutative84.9%
Applied egg-rr84.9%
if -6.1999999999999994e-185 < t < 5.10000000000000025e-70Initial program 63.0%
associate-/l*48.1%
associate-/l*37.2%
Simplified37.2%
Taylor expanded in x around 0 63.4%
Taylor expanded in t around 0 72.9%
if 5.10000000000000025e-70 < t Initial program 81.5%
associate-/l*85.7%
associate-/l*89.0%
Simplified89.0%
clear-num89.0%
un-div-inv90.1%
Applied egg-rr90.1%
Final simplification83.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -1.7e-147) (not (<= t 1.22e-27))) (/ x (+ 1.0 (+ a (/ (* y b) t)))) (/ (+ z (* t (/ x y))) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -1.7e-147) || !(t <= 1.22e-27)) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = (z + (t * (x / 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.7d-147)) .or. (.not. (t <= 1.22d-27))) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = (z + (t * (x / 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.7e-147) || !(t <= 1.22e-27)) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = (z + (t * (x / y))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -1.7e-147) or not (t <= 1.22e-27): tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = (z + (t * (x / y))) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -1.7e-147) || !(t <= 1.22e-27)) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -1.7e-147) || ~((t <= 1.22e-27))) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = (z + (t * (x / y))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -1.7e-147], N[Not[LessEqual[t, 1.22e-27]], $MachinePrecision]], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.7 \cdot 10^{-147} \lor \neg \left(t \leq 1.22 \cdot 10^{-27}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\end{array}
\end{array}
if t < -1.69999999999999998e-147 or 1.22e-27 < t Initial program 83.8%
associate-/l*86.8%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in x around inf 69.0%
if -1.69999999999999998e-147 < t < 1.22e-27Initial program 66.5%
associate-/l*54.1%
associate-/l*44.8%
Simplified44.8%
Taylor expanded in z around inf 73.8%
associate-+r+73.8%
associate-*r/72.8%
*-commutative72.8%
associate-/r/68.8%
associate-+r+68.8%
associate-*r/57.8%
*-commutative57.8%
associate-/r/63.7%
Simplified63.7%
Taylor expanded in b around inf 66.0%
Taylor expanded in z around 0 69.6%
associate-/l*65.6%
Simplified65.6%
Final simplification67.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.1e-146)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (<= t 1.8e-28)
(/ (+ z (* t (/ x y))) b)
(/ x (+ (+ a 1.0) (/ y (/ t b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.1e-146) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (t <= 1.8e-28) {
tmp = (z + (t * (x / y))) / b;
} else {
tmp = x / ((a + 1.0) + (y / (t / b)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.1d-146)) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if (t <= 1.8d-28) then
tmp = (z + (t * (x / y))) / b
else
tmp = x / ((a + 1.0d0) + (y / (t / b)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.1e-146) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (t <= 1.8e-28) {
tmp = (z + (t * (x / y))) / b;
} else {
tmp = x / ((a + 1.0) + (y / (t / b)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.1e-146: tmp = x / (1.0 + (a + ((y * b) / t))) elif t <= 1.8e-28: tmp = (z + (t * (x / y))) / b else: tmp = x / ((a + 1.0) + (y / (t / b))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.1e-146) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif (t <= 1.8e-28) tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); else tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.1e-146) tmp = x / (1.0 + (a + ((y * b) / t))); elseif (t <= 1.8e-28) tmp = (z + (t * (x / y))) / b; else tmp = x / ((a + 1.0) + (y / (t / b))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.1e-146], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e-28], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{-146}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-28}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\end{array}
\end{array}
if t < -2.0999999999999999e-146Initial program 84.2%
associate-/l*84.4%
associate-/l*85.3%
Simplified85.3%
Taylor expanded in x around inf 65.5%
if -2.0999999999999999e-146 < t < 1.7999999999999999e-28Initial program 66.5%
associate-/l*54.1%
associate-/l*44.8%
Simplified44.8%
Taylor expanded in z around inf 73.8%
associate-+r+73.8%
associate-*r/72.8%
*-commutative72.8%
associate-/r/68.8%
associate-+r+68.8%
associate-*r/57.8%
*-commutative57.8%
associate-/r/63.7%
Simplified63.7%
Taylor expanded in b around inf 66.0%
Taylor expanded in z around 0 69.6%
associate-/l*65.6%
Simplified65.6%
if 1.7999999999999999e-28 < t Initial program 83.4%
associate-/l*89.6%
associate-/l*93.5%
Simplified93.5%
Taylor expanded in x around inf 72.8%
associate-+r+72.8%
associate-*r/75.6%
*-commutative75.6%
associate-/r/75.6%
Simplified75.6%
Final simplification68.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.7e-58) (not (<= t 1.7e-26))) (/ x (+ a 1.0)) (/ (+ z (* t (/ x y))) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.7e-58) || !(t <= 1.7e-26)) {
tmp = x / (a + 1.0);
} else {
tmp = (z + (t * (x / y))) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-2.7d-58)) .or. (.not. (t <= 1.7d-26))) then
tmp = x / (a + 1.0d0)
else
tmp = (z + (t * (x / y))) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.7e-58) || !(t <= 1.7e-26)) {
tmp = x / (a + 1.0);
} else {
tmp = (z + (t * (x / y))) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.7e-58) or not (t <= 1.7e-26): tmp = x / (a + 1.0) else: tmp = (z + (t * (x / y))) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.7e-58) || !(t <= 1.7e-26)) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(Float64(z + Float64(t * Float64(x / y))) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.7e-58) || ~((t <= 1.7e-26))) tmp = x / (a + 1.0); else tmp = (z + (t * (x / y))) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.7e-58], N[Not[LessEqual[t, 1.7e-26]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{-58} \lor \neg \left(t \leq 1.7 \cdot 10^{-26}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\
\end{array}
\end{array}
if t < -2.6999999999999999e-58 or 1.70000000000000007e-26 < t Initial program 85.8%
associate-/l*89.8%
associate-/l*92.4%
Simplified92.4%
Taylor expanded in y around 0 63.7%
if -2.6999999999999999e-58 < t < 1.70000000000000007e-26Initial program 66.7%
associate-/l*55.5%
associate-/l*47.7%
Simplified47.7%
Taylor expanded in z around inf 73.7%
associate-+r+73.7%
associate-*r/72.9%
*-commutative72.9%
associate-/r/69.5%
associate-+r+69.5%
associate-*r/60.4%
*-commutative60.4%
associate-/r/65.3%
Simplified65.3%
Taylor expanded in b around inf 63.7%
Taylor expanded in z around 0 67.6%
associate-/l*64.2%
Simplified64.2%
Final simplification63.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -5.2e-151) (not (<= t 3.15e-28))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5.2e-151) || !(t <= 3.15e-28)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-5.2d-151)) .or. (.not. (t <= 3.15d-28))) then
tmp = x / (a + 1.0d0)
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -5.2e-151) || !(t <= 3.15e-28)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -5.2e-151) or not (t <= 3.15e-28): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -5.2e-151) || !(t <= 3.15e-28)) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -5.2e-151) || ~((t <= 3.15e-28))) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -5.2e-151], N[Not[LessEqual[t, 3.15e-28]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.2 \cdot 10^{-151} \lor \neg \left(t \leq 3.15 \cdot 10^{-28}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -5.2000000000000001e-151 or 3.1499999999999999e-28 < t Initial program 83.8%
associate-/l*86.8%
associate-/l*89.1%
Simplified89.1%
Taylor expanded in y around 0 61.8%
if -5.2000000000000001e-151 < t < 3.1499999999999999e-28Initial program 66.5%
associate-/l*54.1%
associate-/l*44.8%
Simplified44.8%
Taylor expanded in y around inf 54.6%
Final simplification59.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -3.2e+148) (not (<= a 1.6e+53))) (/ x a) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.2e+148) || !(a <= 1.6e+53)) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-3.2d+148)) .or. (.not. (a <= 1.6d+53))) then
tmp = x / a
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.2e+148) || !(a <= 1.6e+53)) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -3.2e+148) or not (a <= 1.6e+53): tmp = x / a else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -3.2e+148) || !(a <= 1.6e+53)) tmp = Float64(x / a); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -3.2e+148) || ~((a <= 1.6e+53))) tmp = x / a; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -3.2e+148], N[Not[LessEqual[a, 1.6e+53]], $MachinePrecision]], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.2 \cdot 10^{+148} \lor \neg \left(a \leq 1.6 \cdot 10^{+53}\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if a < -3.1999999999999999e148 or 1.6e53 < a Initial program 77.4%
associate-/l*74.1%
associate-/l*72.0%
Simplified72.0%
Taylor expanded in x around inf 58.6%
associate-+r+58.6%
associate-*r/58.8%
*-commutative58.8%
associate-/r/57.7%
Simplified57.7%
Taylor expanded in a around inf 54.3%
if -3.1999999999999999e148 < a < 1.6e53Initial program 77.6%
associate-/l*75.4%
associate-/l*73.5%
Simplified73.5%
Taylor expanded in y around inf 38.2%
Final simplification43.6%
(FPCore (x y z t a b) :precision binary64 (/ x a))
double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x / a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x / a;
}
def code(x, y, z, t, a, b): return x / a
function code(x, y, z, t, a, b) return Float64(x / a) end
function tmp = code(x, y, z, t, a, b) tmp = x / a; end
code[x_, y_, z_, t_, a_, b_] := N[(x / a), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{a}
\end{array}
Initial program 77.5%
associate-/l*74.9%
associate-/l*73.0%
Simplified73.0%
Taylor expanded in x around inf 53.4%
associate-+r+53.4%
associate-*r/54.0%
*-commutative54.0%
associate-/r/52.7%
Simplified52.7%
Taylor expanded in a around inf 23.3%
(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 2024088
(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))))