
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 17 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))
(t_2 (+ (+ a 1.0) (/ y (/ t b))))
(t_3 (+ (* (/ y t) (/ z t_2)) (/ x t_2))))
(if (<= t_1 (- INFINITY))
t_3
(if (<= t_1 2e+135)
t_1
(if (<= t_1 INFINITY) t_3 (* 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)) / (((y * b) / t) + (a + 1.0));
double t_2 = (a + 1.0) + (y / (t / b));
double t_3 = ((y / t) * (z / t_2)) + (x / t_2);
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = t_3;
} else if (t_1 <= 2e+135) {
tmp = t_1;
} else if (t_1 <= ((double) INFINITY)) {
tmp = t_3;
} 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)) / (((y * b) / t) + (a + 1.0));
double t_2 = (a + 1.0) + (y / (t / b));
double t_3 = ((y / t) * (z / t_2)) + (x / t_2);
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = t_3;
} else if (t_1 <= 2e+135) {
tmp = t_1;
} else if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_3;
} 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)) / (((y * b) / t) + (a + 1.0)) t_2 = (a + 1.0) + (y / (t / b)) t_3 = ((y / t) * (z / t_2)) + (x / t_2) tmp = 0 if t_1 <= -math.inf: tmp = t_3 elif t_1 <= 2e+135: tmp = t_1 elif t_1 <= math.inf: tmp = t_3 else: tmp = z * ((1.0 + ((t / y) * (x / z))) / b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) t_2 = Float64(Float64(a + 1.0) + Float64(y / Float64(t / b))) t_3 = Float64(Float64(Float64(y / t) * Float64(z / t_2)) + Float64(x / t_2)) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = t_3; elseif (t_1 <= 2e+135) tmp = t_1; elseif (t_1 <= Inf) tmp = t_3; else tmp = Float64(z * Float64(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)) / (((y * b) / t) + (a + 1.0)); t_2 = (a + 1.0) + (y / (t / b)); t_3 = ((y / t) * (z / t_2)) + (x / t_2); tmp = 0.0; if (t_1 <= -Inf) tmp = t_3; elseif (t_1 <= 2e+135) tmp = t_1; elseif (t_1 <= Inf) tmp = t_3; 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[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(y / t), $MachinePrecision] * N[(z / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(x / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$3, If[LessEqual[t$95$1, 2e+135], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$3, N[(z * N[(N[(1.0 + N[(N[(t / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
t_2 := \left(a + 1\right) + \frac{y}{\frac{t}{b}}\\
t_3 := \frac{y}{t} \cdot \frac{z}{t\_2} + \frac{x}{t\_2}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+135}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{1 + \frac{t}{y} \cdot \frac{x}{z}}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0 or 1.99999999999999992e135 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 53.5%
associate-/l*70.9%
associate-/l*70.9%
Simplified70.9%
Taylor expanded in x around 0 67.0%
+-commutative67.0%
times-frac96.2%
associate-+r+96.2%
associate-*r/85.2%
*-commutative85.2%
associate-/r/96.2%
associate-+r+96.2%
associate-*r/96.2%
*-commutative96.2%
associate-/r/96.2%
Simplified96.2%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.99999999999999992e135Initial program 93.1%
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.2%
associate-/l*9.4%
Simplified9.4%
Taylor expanded in z around inf 3.3%
associate-+r+3.3%
associate-*r/7.7%
*-commutative7.7%
associate-/r/7.6%
associate-+r+7.6%
associate-*r/7.6%
*-commutative7.6%
associate-/r/7.6%
Simplified7.6%
Taylor expanded in b around inf 90.5%
times-frac99.6%
Simplified99.6%
Final simplification94.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t)) (t_2 (/ (+ x (/ (* y z) t)) (+ t_1 (+ a 1.0)))))
(if (<= t_2 (- INFINITY))
(* (/ y t) (/ z (+ (+ a 1.0) (/ y (/ t b)))))
(if (<= t_2 1e+289)
t_2
(if (<= t_2 INFINITY)
(* z (/ y (* t (+ 1.0 (+ a t_1)))))
(* 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 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (y / t) * (z / ((a + 1.0) + (y / (t / b))));
} else if (t_2 <= 1e+289) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = z * (y / (t * (1.0 + (a + t_1))));
} 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 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / (t_1 + (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 <= 1e+289) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = z * (y / (t * (1.0 + (a + t_1))));
} else {
tmp = z * ((1.0 + ((t / y) * (x / z))) / b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0)) tmp = 0 if t_2 <= -math.inf: tmp = (y / t) * (z / ((a + 1.0) + (y / (t / b)))) elif t_2 <= 1e+289: tmp = t_2 elif t_2 <= math.inf: tmp = z * (y / (t * (1.0 + (a + t_1)))) else: tmp = z * ((1.0 + ((t / y) * (x / z))) / b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(t_1 + 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 <= 1e+289) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(z * Float64(y / Float64(t * Float64(1.0 + Float64(a + t_1))))); else tmp = Float64(z * Float64(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 = (y * b) / t; t_2 = (x + ((y * z) / t)) / (t_1 + (a + 1.0)); tmp = 0.0; if (t_2 <= -Inf) tmp = (y / t) * (z / ((a + 1.0) + (y / (t / b)))); elseif (t_2 <= 1e+289) tmp = t_2; elseif (t_2 <= Inf) tmp = z * (y / (t * (1.0 + (a + t_1)))); 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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 + 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, 1e+289], t$95$2, If[LessEqual[t$95$2, Infinity], N[(z * N[(y / N[(t * N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(1.0 + N[(N[(t / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t\_1 + \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 10^{+289}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;z \cdot \frac{y}{t \cdot \left(1 + \left(a + t\_1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{1 + \frac{t}{y} \cdot \frac{x}{z}}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 23.1%
associate-/l*41.4%
associate-/l*41.4%
Simplified41.4%
Taylor expanded in x around 0 46.0%
times-frac86.2%
associate-+r+86.2%
associate-*r/79.7%
*-commutative79.7%
associate-/r/86.3%
Simplified86.3%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.0000000000000001e289Initial program 93.7%
if 1.0000000000000001e289 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 33.9%
associate-/l*71.6%
associate-/l*71.7%
Simplified71.7%
Taylor expanded in z around inf 95.0%
associate-+r+95.0%
associate-*r/95.0%
*-commutative95.0%
associate-/r/95.0%
associate-+r+95.0%
associate-*r/65.6%
*-commutative65.6%
associate-/r/94.9%
Simplified94.9%
Taylor expanded in x around 0 93.5%
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.2%
associate-/l*9.4%
Simplified9.4%
Taylor expanded in z around inf 3.3%
associate-+r+3.3%
associate-*r/7.7%
*-commutative7.7%
associate-/r/7.6%
associate-+r+7.6%
associate-*r/7.6%
*-commutative7.6%
associate-/r/7.6%
Simplified7.6%
Taylor expanded in b around inf 90.5%
times-frac99.6%
Simplified99.6%
Final simplification93.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (/ (* y z) t))) (t_2 (/ t_1 a)))
(if (<= a -8e+22)
t_2
(if (<= a -2.8e-49)
(/ x (+ a (* b (/ y t))))
(if (<= a 4.1e-293)
t_1
(if (<= a 2.6e-227)
(/ z b)
(if (<= a 0.85) (+ x (* y (/ z t))) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / a;
double tmp;
if (a <= -8e+22) {
tmp = t_2;
} else if (a <= -2.8e-49) {
tmp = x / (a + (b * (y / t)));
} else if (a <= 4.1e-293) {
tmp = t_1;
} else if (a <= 2.6e-227) {
tmp = z / b;
} else if (a <= 0.85) {
tmp = x + (y * (z / t));
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + ((y * z) / t)
t_2 = t_1 / a
if (a <= (-8d+22)) then
tmp = t_2
else if (a <= (-2.8d-49)) then
tmp = x / (a + (b * (y / t)))
else if (a <= 4.1d-293) then
tmp = t_1
else if (a <= 2.6d-227) then
tmp = z / b
else if (a <= 0.85d0) then
tmp = x + (y * (z / t))
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + ((y * z) / t);
double t_2 = t_1 / a;
double tmp;
if (a <= -8e+22) {
tmp = t_2;
} else if (a <= -2.8e-49) {
tmp = x / (a + (b * (y / t)));
} else if (a <= 4.1e-293) {
tmp = t_1;
} else if (a <= 2.6e-227) {
tmp = z / b;
} else if (a <= 0.85) {
tmp = x + (y * (z / t));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + ((y * z) / t) t_2 = t_1 / a tmp = 0 if a <= -8e+22: tmp = t_2 elif a <= -2.8e-49: tmp = x / (a + (b * (y / t))) elif a <= 4.1e-293: tmp = t_1 elif a <= 2.6e-227: tmp = z / b elif a <= 0.85: tmp = x + (y * (z / t)) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(Float64(y * z) / t)) t_2 = Float64(t_1 / a) tmp = 0.0 if (a <= -8e+22) tmp = t_2; elseif (a <= -2.8e-49) tmp = Float64(x / Float64(a + Float64(b * Float64(y / t)))); elseif (a <= 4.1e-293) tmp = t_1; elseif (a <= 2.6e-227) tmp = Float64(z / b); elseif (a <= 0.85) tmp = Float64(x + Float64(y * Float64(z / t))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + ((y * z) / t); t_2 = t_1 / a; tmp = 0.0; if (a <= -8e+22) tmp = t_2; elseif (a <= -2.8e-49) tmp = x / (a + (b * (y / t))); elseif (a <= 4.1e-293) tmp = t_1; elseif (a <= 2.6e-227) tmp = z / b; elseif (a <= 0.85) tmp = x + (y * (z / t)); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / a), $MachinePrecision]}, If[LessEqual[a, -8e+22], t$95$2, If[LessEqual[a, -2.8e-49], N[(x / N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.1e-293], t$95$1, If[LessEqual[a, 2.6e-227], N[(z / b), $MachinePrecision], If[LessEqual[a, 0.85], N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
t_2 := \frac{t\_1}{a}\\
\mathbf{if}\;a \leq -8 \cdot 10^{+22}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -2.8 \cdot 10^{-49}:\\
\;\;\;\;\frac{x}{a + b \cdot \frac{y}{t}}\\
\mathbf{elif}\;a \leq 4.1 \cdot 10^{-293}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{-227}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;a \leq 0.85:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -8e22 or 0.849999999999999978 < a Initial program 79.7%
associate-/l*70.9%
associate-/l*69.4%
Simplified69.4%
Taylor expanded in a around inf 68.3%
if -8e22 < a < -2.79999999999999997e-49Initial program 66.0%
associate-/l*66.1%
associate-/l*59.9%
Simplified59.9%
Taylor expanded in a around inf 42.4%
Taylor expanded in x around inf 47.5%
associate-/l*52.9%
Applied egg-rr52.9%
if -2.79999999999999997e-49 < a < 4.09999999999999988e-293Initial program 79.8%
associate-/l*83.7%
associate-/l*83.7%
Simplified83.7%
Taylor expanded in b around 0 61.4%
Taylor expanded in a around 0 61.4%
if 4.09999999999999988e-293 < a < 2.60000000000000011e-227Initial program 62.3%
associate-/l*56.3%
associate-/l*62.4%
Simplified62.4%
Taylor expanded in y around inf 70.3%
if 2.60000000000000011e-227 < a < 0.849999999999999978Initial program 73.1%
associate-/l*75.1%
associate-/l*77.9%
Simplified77.9%
Taylor expanded in b around 0 49.5%
Taylor expanded in a around 0 46.8%
associate-*r/51.1%
Simplified51.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* y (/ z t)))))
(if (<= t -3.8e-18)
(/ t_1 (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t -1e-287)
(* z (/ y (* t (+ 1.0 (+ a (/ (* y b) t))))))
(if (<= t 4.4e-216)
(/ (* z (+ 1.0 (/ (* x t) (* y z)))) 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 <= -3.8e-18) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else if (t <= -1e-287) {
tmp = z * (y / (t * (1.0 + (a + ((y * b) / t)))));
} else if (t <= 4.4e-216) {
tmp = (z * (1.0 + ((x * t) / (y * z)))) / 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 <= (-3.8d-18)) then
tmp = t_1 / ((a + 1.0d0) + (y / (t / b)))
else if (t <= (-1d-287)) then
tmp = z * (y / (t * (1.0d0 + (a + ((y * b) / t)))))
else if (t <= 4.4d-216) then
tmp = (z * (1.0d0 + ((x * t) / (y * z)))) / 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 <= -3.8e-18) {
tmp = t_1 / ((a + 1.0) + (y / (t / b)));
} else if (t <= -1e-287) {
tmp = z * (y / (t * (1.0 + (a + ((y * b) / t)))));
} else if (t <= 4.4e-216) {
tmp = (z * (1.0 + ((x * t) / (y * z)))) / 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 <= -3.8e-18: tmp = t_1 / ((a + 1.0) + (y / (t / b))) elif t <= -1e-287: tmp = z * (y / (t * (1.0 + (a + ((y * b) / t))))) elif t <= 4.4e-216: tmp = (z * (1.0 + ((x * t) / (y * z)))) / 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 <= -3.8e-18) tmp = Float64(t_1 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t <= -1e-287) tmp = Float64(z * Float64(y / Float64(t * Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))))); elseif (t <= 4.4e-216) tmp = Float64(Float64(z * Float64(1.0 + Float64(Float64(x * t) / Float64(y * z)))) / 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 <= -3.8e-18) tmp = t_1 / ((a + 1.0) + (y / (t / b))); elseif (t <= -1e-287) tmp = z * (y / (t * (1.0 + (a + ((y * b) / t))))); elseif (t <= 4.4e-216) tmp = (z * (1.0 + ((x * t) / (y * z)))) / 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, -3.8e-18], N[(t$95$1 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1e-287], N[(z * N[(y / N[(t * N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.4e-216], N[(N[(z * N[(1.0 + N[(N[(x * t), $MachinePrecision] / N[(y * z), $MachinePrecision]), $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 -3.8 \cdot 10^{-18}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t \leq -1 \cdot 10^{-287}:\\
\;\;\;\;z \cdot \frac{y}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\
\mathbf{elif}\;t \leq 4.4 \cdot 10^{-216}:\\
\;\;\;\;\frac{z \cdot \left(1 + \frac{x \cdot t}{y \cdot z}\right)}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if t < -3.7999999999999998e-18Initial program 83.7%
associate-/l*89.0%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in y around 0 89.0%
associate-*r/94.3%
*-commutative94.3%
associate-/r/94.4%
Simplified94.4%
if -3.7999999999999998e-18 < t < -1.00000000000000002e-287Initial program 74.9%
associate-/l*52.3%
associate-/l*48.3%
Simplified48.3%
Taylor expanded in z around inf 80.7%
associate-+r+80.7%
associate-*r/80.7%
*-commutative80.7%
associate-/r/75.8%
associate-+r+75.8%
associate-*r/68.2%
*-commutative68.2%
associate-/r/73.3%
Simplified73.3%
Taylor expanded in x around 0 68.4%
if -1.00000000000000002e-287 < t < 4.3999999999999998e-216Initial program 59.5%
associate-/l*40.1%
associate-/l*31.9%
Simplified31.9%
Taylor expanded in z around inf 56.5%
associate-+r+56.5%
associate-*r/56.5%
*-commutative56.5%
associate-/r/48.2%
associate-+r+48.2%
associate-*r/32.3%
*-commutative32.3%
associate-/r/36.6%
Simplified36.6%
Taylor expanded in b around inf 76.7%
if 4.3999999999999998e-216 < t Initial program 76.7%
associate-/l*79.4%
associate-/l*78.7%
Simplified78.7%
Final simplification80.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))))
(if (<= t -3.8e-18)
t_1
(if (<= t -5.7e-288)
(* z (/ y (* t (+ 1.0 (+ a (/ (* y b) t))))))
(if (<= t 9e-215) (/ (* z (+ 1.0 (/ (* x t) (* y z)))) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -3.8e-18) {
tmp = t_1;
} else if (t <= -5.7e-288) {
tmp = z * (y / (t * (1.0 + (a + ((y * b) / t)))));
} else if (t <= 9e-215) {
tmp = (z * (1.0 + ((x * t) / (y * 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 + 1.0d0) + (y * (b / t)))
if (t <= (-3.8d-18)) then
tmp = t_1
else if (t <= (-5.7d-288)) then
tmp = z * (y / (t * (1.0d0 + (a + ((y * b) / t)))))
else if (t <= 9d-215) then
tmp = (z * (1.0d0 + ((x * t) / (y * 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 + 1.0) + (y * (b / t)));
double tmp;
if (t <= -3.8e-18) {
tmp = t_1;
} else if (t <= -5.7e-288) {
tmp = z * (y / (t * (1.0 + (a + ((y * b) / t)))));
} else if (t <= 9e-215) {
tmp = (z * (1.0 + ((x * t) / (y * z)))) / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) tmp = 0 if t <= -3.8e-18: tmp = t_1 elif t <= -5.7e-288: tmp = z * (y / (t * (1.0 + (a + ((y * b) / t))))) elif t <= 9e-215: tmp = (z * (1.0 + ((x * t) / (y * 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))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))) tmp = 0.0 if (t <= -3.8e-18) tmp = t_1; elseif (t <= -5.7e-288) tmp = Float64(z * Float64(y / Float64(t * Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))))); elseif (t <= 9e-215) tmp = Float64(Float64(z * Float64(1.0 + Float64(Float64(x * t) / Float64(y * z)))) / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); tmp = 0.0; if (t <= -3.8e-18) tmp = t_1; elseif (t <= -5.7e-288) tmp = z * (y / (t * (1.0 + (a + ((y * b) / t))))); elseif (t <= 9e-215) tmp = (z * (1.0 + ((x * t) / (y * 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] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.8e-18], t$95$1, If[LessEqual[t, -5.7e-288], N[(z * N[(y / N[(t * N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9e-215], N[(N[(z * N[(1.0 + N[(N[(x * t), $MachinePrecision] / N[(y * z), $MachinePrecision]), $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 -3.8 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -5.7 \cdot 10^{-288}:\\
\;\;\;\;z \cdot \frac{y}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\
\mathbf{elif}\;t \leq 9 \cdot 10^{-215}:\\
\;\;\;\;\frac{z \cdot \left(1 + \frac{x \cdot t}{y \cdot z}\right)}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.7999999999999998e-18 or 9e-215 < t Initial program 79.5%
associate-/l*83.2%
associate-/l*84.9%
Simplified84.9%
if -3.7999999999999998e-18 < t < -5.6999999999999997e-288Initial program 74.9%
associate-/l*52.3%
associate-/l*48.3%
Simplified48.3%
Taylor expanded in z around inf 80.7%
associate-+r+80.7%
associate-*r/80.7%
*-commutative80.7%
associate-/r/75.8%
associate-+r+75.8%
associate-*r/68.2%
*-commutative68.2%
associate-/r/73.3%
Simplified73.3%
Taylor expanded in x around 0 68.4%
if -5.6999999999999997e-288 < t < 9e-215Initial program 59.5%
associate-/l*40.1%
associate-/l*31.9%
Simplified31.9%
Taylor expanded in z around inf 56.5%
associate-+r+56.5%
associate-*r/56.5%
*-commutative56.5%
associate-/r/48.2%
associate-+r+48.2%
associate-*r/32.3%
*-commutative32.3%
associate-/r/36.6%
Simplified36.6%
Taylor expanded in b around inf 76.7%
Final simplification80.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (* t (/ x (* y b)))))
(t_2 (+ x (/ (* y z) t)))
(t_3 (/ t_2 a)))
(if (<= a -420.0)
t_3
(if (<= a -3.5e-51)
t_1
(if (<= a 7.8e-295) t_2 (if (<= a 3.8e+91) t_1 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + (t * (x / (y * b)));
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / a;
double tmp;
if (a <= -420.0) {
tmp = t_3;
} else if (a <= -3.5e-51) {
tmp = t_1;
} else if (a <= 7.8e-295) {
tmp = t_2;
} else if (a <= 3.8e+91) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (z / b) + (t * (x / (y * b)))
t_2 = x + ((y * z) / t)
t_3 = t_2 / a
if (a <= (-420.0d0)) then
tmp = t_3
else if (a <= (-3.5d-51)) then
tmp = t_1
else if (a <= 7.8d-295) then
tmp = t_2
else if (a <= 3.8d+91) then
tmp = t_1
else
tmp = t_3
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 * (x / (y * b)));
double t_2 = x + ((y * z) / t);
double t_3 = t_2 / a;
double tmp;
if (a <= -420.0) {
tmp = t_3;
} else if (a <= -3.5e-51) {
tmp = t_1;
} else if (a <= 7.8e-295) {
tmp = t_2;
} else if (a <= 3.8e+91) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + (t * (x / (y * b))) t_2 = x + ((y * z) / t) t_3 = t_2 / a tmp = 0 if a <= -420.0: tmp = t_3 elif a <= -3.5e-51: tmp = t_1 elif a <= 7.8e-295: tmp = t_2 elif a <= 3.8e+91: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))) t_2 = Float64(x + Float64(Float64(y * z) / t)) t_3 = Float64(t_2 / a) tmp = 0.0 if (a <= -420.0) tmp = t_3; elseif (a <= -3.5e-51) tmp = t_1; elseif (a <= 7.8e-295) tmp = t_2; elseif (a <= 3.8e+91) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + (t * (x / (y * b))); t_2 = x + ((y * z) / t); t_3 = t_2 / a; tmp = 0.0; if (a <= -420.0) tmp = t_3; elseif (a <= -3.5e-51) tmp = t_1; elseif (a <= 7.8e-295) tmp = t_2; elseif (a <= 3.8e+91) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / a), $MachinePrecision]}, If[LessEqual[a, -420.0], t$95$3, If[LessEqual[a, -3.5e-51], t$95$1, If[LessEqual[a, 7.8e-295], t$95$2, If[LessEqual[a, 3.8e+91], t$95$1, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
t_2 := x + \frac{y \cdot z}{t}\\
t_3 := \frac{t\_2}{a}\\
\mathbf{if}\;a \leq -420:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq -3.5 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{-295}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if a < -420 or 3.7999999999999998e91 < a Initial program 79.7%
associate-/l*71.8%
associate-/l*70.9%
Simplified70.9%
Taylor expanded in a around inf 71.2%
if -420 < a < -3.4999999999999997e-51 or 7.79999999999999999e-295 < a < 3.7999999999999998e91Initial program 70.5%
associate-/l*68.2%
associate-/l*68.4%
Simplified68.4%
Taylor expanded in z around inf 70.0%
associate-+r+70.0%
associate-*r/72.3%
*-commutative72.3%
associate-/r/70.0%
associate-+r+70.0%
associate-*r/63.3%
*-commutative63.3%
associate-/r/68.9%
Simplified68.9%
Taylor expanded in b around inf 54.9%
times-frac57.1%
Simplified57.1%
clear-num57.1%
frac-times57.2%
*-un-lft-identity57.2%
*-commutative57.2%
Applied egg-rr57.2%
associate-/r*57.1%
associate-/r/54.9%
Simplified54.9%
Taylor expanded in z around 0 56.2%
associate-/l*59.4%
*-commutative59.4%
Simplified59.4%
if -3.4999999999999997e-51 < a < 7.79999999999999999e-295Initial program 79.8%
associate-/l*83.7%
associate-/l*83.7%
Simplified83.7%
Taylor expanded in b around 0 61.4%
Taylor expanded in a around 0 61.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.3e+107)
(+ (/ z b) (* t (/ x (* y b))))
(if (<= y 5.2e+173)
(/ (+ x (* z (/ y t))) (+ (/ (* y b) t) (+ a 1.0)))
(* z (/ (+ 1.0 (* (/ t y) (/ x z))) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.3e+107) {
tmp = (z / b) + (t * (x / (y * b)));
} else if (y <= 5.2e+173) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else {
tmp = z * ((1.0 + ((t / y) * (x / z))) / b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y <= (-1.3d+107)) then
tmp = (z / b) + (t * (x / (y * b)))
else if (y <= 5.2d+173) then
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0d0))
else
tmp = z * ((1.0d0 + ((t / y) * (x / z))) / b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.3e+107) {
tmp = (z / b) + (t * (x / (y * b)));
} else if (y <= 5.2e+173) {
tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0));
} else {
tmp = z * ((1.0 + ((t / y) * (x / z))) / b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.3e+107: tmp = (z / b) + (t * (x / (y * b))) elif y <= 5.2e+173: tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)) else: tmp = z * ((1.0 + ((t / y) * (x / z))) / b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.3e+107) tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))); elseif (y <= 5.2e+173) tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); else tmp = Float64(z * Float64(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) tmp = 0.0; if (y <= -1.3e+107) tmp = (z / b) + (t * (x / (y * b))); elseif (y <= 5.2e+173) tmp = (x + (z * (y / t))) / (((y * b) / t) + (a + 1.0)); else tmp = z * ((1.0 + ((t / y) * (x / z))) / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.3e+107], N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e+173], 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], N[(z * N[(N[(1.0 + N[(N[(t / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+107}:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{+173}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{1 + \frac{t}{y} \cdot \frac{x}{z}}{b}\\
\end{array}
\end{array}
if y < -1.3000000000000001e107Initial program 44.8%
associate-/l*52.4%
associate-/l*57.7%
Simplified57.7%
Taylor expanded in z around inf 58.4%
associate-+r+58.4%
associate-*r/58.3%
*-commutative58.3%
associate-/r/61.0%
associate-+r+61.0%
associate-*r/45.1%
*-commutative45.1%
associate-/r/60.9%
Simplified60.9%
Taylor expanded in b around inf 62.2%
times-frac62.1%
Simplified62.1%
clear-num62.1%
frac-times62.3%
*-un-lft-identity62.3%
*-commutative62.3%
Applied egg-rr62.3%
associate-/r*62.1%
associate-/r/62.4%
Simplified62.4%
Taylor expanded in z around 0 60.5%
associate-/l*65.4%
*-commutative65.4%
Simplified65.4%
if -1.3000000000000001e107 < y < 5.1999999999999997e173Initial program 90.3%
*-commutative90.3%
associate-/l*90.8%
Applied egg-rr90.8%
if 5.1999999999999997e173 < y Initial program 36.6%
associate-/l*50.9%
associate-/l*60.1%
Simplified60.1%
Taylor expanded in z around inf 59.5%
associate-+r+59.5%
associate-*r/65.7%
*-commutative65.7%
associate-/r/65.7%
associate-+r+65.7%
associate-*r/54.4%
*-commutative54.4%
associate-/r/65.6%
Simplified65.6%
Taylor expanded in b around inf 65.2%
times-frac80.2%
Simplified80.2%
Final simplification85.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (* t (/ x (* y b))))))
(if (<= y -4.4e+70)
t_1
(if (<= y -6.2e+27)
(/ (* y z) (* t (+ a 1.0)))
(if (<= y 4.3e+136) (/ x (+ 1.0 (+ a (/ (* y b) t)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + (t * (x / (y * b)));
double tmp;
if (y <= -4.4e+70) {
tmp = t_1;
} else if (y <= -6.2e+27) {
tmp = (y * z) / (t * (a + 1.0));
} else if (y <= 4.3e+136) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} 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 * (x / (y * b)))
if (y <= (-4.4d+70)) then
tmp = t_1
else if (y <= (-6.2d+27)) then
tmp = (y * z) / (t * (a + 1.0d0))
else if (y <= 4.3d+136) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
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 * (x / (y * b)));
double tmp;
if (y <= -4.4e+70) {
tmp = t_1;
} else if (y <= -6.2e+27) {
tmp = (y * z) / (t * (a + 1.0));
} else if (y <= 4.3e+136) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + (t * (x / (y * b))) tmp = 0 if y <= -4.4e+70: tmp = t_1 elif y <= -6.2e+27: tmp = (y * z) / (t * (a + 1.0)) elif y <= 4.3e+136: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))) tmp = 0.0 if (y <= -4.4e+70) tmp = t_1; elseif (y <= -6.2e+27) tmp = Float64(Float64(y * z) / Float64(t * Float64(a + 1.0))); elseif (y <= 4.3e+136) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + (t * (x / (y * b))); tmp = 0.0; if (y <= -4.4e+70) tmp = t_1; elseif (y <= -6.2e+27) tmp = (y * z) / (t * (a + 1.0)); elseif (y <= 4.3e+136) tmp = x / (1.0 + (a + ((y * b) / t))); 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[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.4e+70], t$95$1, If[LessEqual[y, -6.2e+27], N[(N[(y * z), $MachinePrecision] / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.3e+136], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
\mathbf{if}\;y \leq -4.4 \cdot 10^{+70}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{+27}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;y \leq 4.3 \cdot 10^{+136}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.40000000000000001e70 or 4.2999999999999999e136 < y Initial program 45.2%
associate-/l*54.6%
associate-/l*60.8%
Simplified60.8%
Taylor expanded in z around inf 63.2%
associate-+r+63.2%
associate-*r/65.7%
*-commutative65.7%
associate-/r/66.9%
associate-+r+66.9%
associate-*r/52.7%
*-commutative52.7%
associate-/r/66.9%
Simplified66.9%
Taylor expanded in b around inf 62.5%
times-frac69.9%
Simplified69.9%
clear-num69.8%
frac-times69.9%
*-un-lft-identity69.9%
*-commutative69.9%
Applied egg-rr69.9%
associate-/r*69.9%
associate-/r/70.0%
Simplified70.0%
Taylor expanded in z around 0 59.5%
associate-/l*65.4%
*-commutative65.4%
Simplified65.4%
if -4.40000000000000001e70 < y < -6.19999999999999992e27Initial program 86.1%
associate-/l*86.2%
associate-/l*86.2%
Simplified86.2%
Taylor expanded in b around 0 79.1%
*-commutative86.1%
associate-/l*86.4%
Applied egg-rr79.4%
Taylor expanded in x around 0 71.8%
if -6.19999999999999992e27 < y < 4.2999999999999999e136Initial program 91.9%
associate-/l*81.0%
associate-/l*77.2%
Simplified77.2%
Taylor expanded in x around inf 64.4%
Final simplification65.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -3.4) (not (<= a 0.00017))) (/ (+ x (/ (* y z) t)) (+ a (/ (* y b) t))) (/ (+ x (* y (/ z t))) (+ 1.0 (* y (/ b t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -3.4) || !(a <= 0.00017)) {
tmp = (x + ((y * z) / t)) / (a + ((y * b) / t));
} else {
tmp = (x + (y * (z / t))) / (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 ((a <= (-3.4d0)) .or. (.not. (a <= 0.00017d0))) then
tmp = (x + ((y * z) / t)) / (a + ((y * b) / t))
else
tmp = (x + (y * (z / t))) / (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 ((a <= -3.4) || !(a <= 0.00017)) {
tmp = (x + ((y * z) / t)) / (a + ((y * b) / t));
} else {
tmp = (x + (y * (z / t))) / (1.0 + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -3.4) or not (a <= 0.00017): tmp = (x + ((y * z) / t)) / (a + ((y * b) / t)) else: tmp = (x + (y * (z / t))) / (1.0 + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -3.4) || !(a <= 0.00017)) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + Float64(Float64(y * b) / t))); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(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 ((a <= -3.4) || ~((a <= 0.00017))) tmp = (x + ((y * z) / t)) / (a + ((y * b) / t)); else tmp = (x + (y * (z / t))) / (1.0 + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -3.4], N[Not[LessEqual[a, 0.00017]], $MachinePrecision]], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \lor \neg \left(a \leq 0.00017\right):\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + \frac{y \cdot b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{1 + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if a < -3.39999999999999991 or 1.7e-4 < a Initial program 79.9%
Taylor expanded in a around inf 78.6%
if -3.39999999999999991 < a < 1.7e-4Initial program 72.8%
associate-/l*74.4%
associate-/l*76.1%
Simplified76.1%
Taylor expanded in a around 0 75.8%
Final simplification77.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -7.2e+70)
(+ (/ z b) (* t (/ x (* y b))))
(if (<= y 8.2e+172)
(/ (+ x (/ z (/ t y))) (+ a 1.0))
(* z (/ (+ 1.0 (* (/ t y) (/ x z))) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -7.2e+70) {
tmp = (z / b) + (t * (x / (y * b)));
} else if (y <= 8.2e+172) {
tmp = (x + (z / (t / y))) / (a + 1.0);
} else {
tmp = z * ((1.0 + ((t / y) * (x / 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 <= (-7.2d+70)) then
tmp = (z / b) + (t * (x / (y * b)))
else if (y <= 8.2d+172) then
tmp = (x + (z / (t / y))) / (a + 1.0d0)
else
tmp = z * ((1.0d0 + ((t / y) * (x / 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 <= -7.2e+70) {
tmp = (z / b) + (t * (x / (y * b)));
} else if (y <= 8.2e+172) {
tmp = (x + (z / (t / y))) / (a + 1.0);
} else {
tmp = z * ((1.0 + ((t / y) * (x / z))) / b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -7.2e+70: tmp = (z / b) + (t * (x / (y * b))) elif y <= 8.2e+172: tmp = (x + (z / (t / y))) / (a + 1.0) else: tmp = z * ((1.0 + ((t / y) * (x / z))) / b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -7.2e+70) tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))); elseif (y <= 8.2e+172) tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(a + 1.0)); else tmp = Float64(z * Float64(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) tmp = 0.0; if (y <= -7.2e+70) tmp = (z / b) + (t * (x / (y * b))); elseif (y <= 8.2e+172) tmp = (x + (z / (t / y))) / (a + 1.0); else tmp = z * ((1.0 + ((t / y) * (x / z))) / b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -7.2e+70], N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8.2e+172], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z * N[(N[(1.0 + N[(N[(t / y), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+70}:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
\mathbf{elif}\;y \leq 8.2 \cdot 10^{+172}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;z \cdot \frac{1 + \frac{t}{y} \cdot \frac{x}{z}}{b}\\
\end{array}
\end{array}
if y < -7.1999999999999999e70Initial program 49.1%
associate-/l*55.6%
associate-/l*60.0%
Simplified60.0%
Taylor expanded in z around inf 62.7%
associate-+r+62.7%
associate-*r/62.6%
*-commutative62.6%
associate-/r/64.9%
associate-+r+64.9%
associate-*r/49.3%
*-commutative49.3%
associate-/r/64.9%
Simplified64.9%
Taylor expanded in b around inf 61.5%
times-frac63.6%
Simplified63.6%
clear-num63.6%
frac-times63.8%
*-un-lft-identity63.8%
*-commutative63.8%
Applied egg-rr63.8%
associate-/r*63.6%
associate-/r/63.9%
Simplified63.9%
Taylor expanded in z around 0 60.1%
associate-/l*64.2%
*-commutative64.2%
Simplified64.2%
if -7.1999999999999999e70 < y < 8.200000000000001e172Initial program 91.0%
associate-/l*81.3%
associate-/l*77.9%
Simplified77.9%
Taylor expanded in b around 0 72.9%
*-commutative91.0%
associate-/l*91.6%
Applied egg-rr73.6%
clear-num73.6%
un-div-inv74.0%
Applied egg-rr74.0%
if 8.200000000000001e172 < y Initial program 36.6%
associate-/l*50.9%
associate-/l*60.1%
Simplified60.1%
Taylor expanded in z around inf 59.5%
associate-+r+59.5%
associate-*r/65.7%
*-commutative65.7%
associate-/r/65.7%
associate-+r+65.7%
associate-*r/54.4%
*-commutative54.4%
associate-/r/65.6%
Simplified65.6%
Taylor expanded in b around inf 65.2%
times-frac80.2%
Simplified80.2%
Final simplification73.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.6e+71) (not (<= y 5.2e+173))) (+ (/ z b) (* t (/ x (* y b)))) (/ (+ x (/ z (/ t y))) (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.6e+71) || !(y <= 5.2e+173)) {
tmp = (z / b) + (t * (x / (y * b)));
} else {
tmp = (x + (z / (t / y))) / (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.6d+71)) .or. (.not. (y <= 5.2d+173))) then
tmp = (z / b) + (t * (x / (y * b)))
else
tmp = (x + (z / (t / y))) / (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.6e+71) || !(y <= 5.2e+173)) {
tmp = (z / b) + (t * (x / (y * b)));
} else {
tmp = (x + (z / (t / y))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.6e+71) or not (y <= 5.2e+173): tmp = (z / b) + (t * (x / (y * b))) else: tmp = (x + (z / (t / y))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.6e+71) || !(y <= 5.2e+173)) tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))); else tmp = Float64(Float64(x + Float64(z / Float64(t / y))) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.6e+71) || ~((y <= 5.2e+173))) tmp = (z / b) + (t * (x / (y * b))); else tmp = (x + (z / (t / y))) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.6e+71], N[Not[LessEqual[y, 5.2e+173]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.6 \cdot 10^{+71} \lor \neg \left(y \leq 5.2 \cdot 10^{+173}\right):\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + 1}\\
\end{array}
\end{array}
if y < -3.6e71 or 5.1999999999999997e173 < y Initial program 43.6%
associate-/l*53.5%
associate-/l*60.1%
Simplified60.1%
Taylor expanded in z around inf 61.3%
associate-+r+61.3%
associate-*r/63.9%
*-commutative63.9%
associate-/r/65.2%
associate-+r+65.2%
associate-*r/51.5%
*-commutative51.5%
associate-/r/65.2%
Simplified65.2%
Taylor expanded in b around inf 63.1%
times-frac70.8%
Simplified70.8%
clear-num70.8%
frac-times70.9%
*-un-lft-identity70.9%
*-commutative70.9%
Applied egg-rr70.9%
associate-/r*70.8%
associate-/r/71.0%
Simplified71.0%
Taylor expanded in z around 0 59.9%
associate-/l*66.1%
*-commutative66.1%
Simplified66.1%
if -3.6e71 < y < 5.1999999999999997e173Initial program 91.0%
associate-/l*81.3%
associate-/l*77.9%
Simplified77.9%
Taylor expanded in b around 0 72.9%
*-commutative91.0%
associate-/l*91.6%
Applied egg-rr73.6%
clear-num73.6%
un-div-inv74.0%
Applied egg-rr74.0%
Final simplification71.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -6e+71) (not (<= y 1.25e+173))) (+ (/ z b) (* t (/ x (* y b)))) (/ (+ 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 <= -6e+71) || !(y <= 1.25e+173)) {
tmp = (z / b) + (t * (x / (y * b)));
} 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 <= (-6d+71)) .or. (.not. (y <= 1.25d+173))) then
tmp = (z / b) + (t * (x / (y * b)))
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 <= -6e+71) || !(y <= 1.25e+173)) {
tmp = (z / b) + (t * (x / (y * b)));
} else {
tmp = (x + (z * (y / t))) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -6e+71) or not (y <= 1.25e+173): tmp = (z / b) + (t * (x / (y * b))) else: tmp = (x + (z * (y / t))) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -6e+71) || !(y <= 1.25e+173)) tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b)))); 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 <= -6e+71) || ~((y <= 1.25e+173))) tmp = (z / b) + (t * (x / (y * b))); 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, -6e+71], N[Not[LessEqual[y, 1.25e+173]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $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 -6 \cdot 10^{+71} \lor \neg \left(y \leq 1.25 \cdot 10^{+173}\right):\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -6.00000000000000025e71 or 1.25000000000000009e173 < y Initial program 43.6%
associate-/l*53.5%
associate-/l*60.1%
Simplified60.1%
Taylor expanded in z around inf 61.3%
associate-+r+61.3%
associate-*r/63.9%
*-commutative63.9%
associate-/r/65.2%
associate-+r+65.2%
associate-*r/51.5%
*-commutative51.5%
associate-/r/65.2%
Simplified65.2%
Taylor expanded in b around inf 63.1%
times-frac70.8%
Simplified70.8%
clear-num70.8%
frac-times70.9%
*-un-lft-identity70.9%
*-commutative70.9%
Applied egg-rr70.9%
associate-/r*70.8%
associate-/r/71.0%
Simplified71.0%
Taylor expanded in z around 0 59.9%
associate-/l*66.1%
*-commutative66.1%
Simplified66.1%
if -6.00000000000000025e71 < y < 1.25000000000000009e173Initial program 91.0%
associate-/l*81.3%
associate-/l*77.9%
Simplified77.9%
Taylor expanded in b around 0 72.9%
*-commutative91.0%
associate-/l*91.6%
Applied egg-rr73.6%
Final simplification71.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -5.5e+70)
(/ z b)
(if (<= y -7.5e+25)
(/ (* y z) (* t (+ a 1.0)))
(if (<= y 7e+136) (/ x (+ a 1.0)) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -5.5e+70) {
tmp = z / b;
} else if (y <= -7.5e+25) {
tmp = (y * z) / (t * (a + 1.0));
} else if (y <= 7e+136) {
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 (y <= (-5.5d+70)) then
tmp = z / b
else if (y <= (-7.5d+25)) then
tmp = (y * z) / (t * (a + 1.0d0))
else if (y <= 7d+136) 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 (y <= -5.5e+70) {
tmp = z / b;
} else if (y <= -7.5e+25) {
tmp = (y * z) / (t * (a + 1.0));
} else if (y <= 7e+136) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -5.5e+70: tmp = z / b elif y <= -7.5e+25: tmp = (y * z) / (t * (a + 1.0)) elif y <= 7e+136: tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -5.5e+70) tmp = Float64(z / b); elseif (y <= -7.5e+25) tmp = Float64(Float64(y * z) / Float64(t * Float64(a + 1.0))); elseif (y <= 7e+136) 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 (y <= -5.5e+70) tmp = z / b; elseif (y <= -7.5e+25) tmp = (y * z) / (t * (a + 1.0)); elseif (y <= 7e+136) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -5.5e+70], N[(z / b), $MachinePrecision], If[LessEqual[y, -7.5e+25], N[(N[(y * z), $MachinePrecision] / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7e+136], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.5 \cdot 10^{+70}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{+25}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;y \leq 7 \cdot 10^{+136}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -5.49999999999999986e70 or 7.00000000000000002e136 < y Initial program 45.2%
associate-/l*54.6%
associate-/l*60.8%
Simplified60.8%
Taylor expanded in y around inf 60.5%
if -5.49999999999999986e70 < y < -7.49999999999999993e25Initial program 86.1%
associate-/l*86.2%
associate-/l*86.2%
Simplified86.2%
Taylor expanded in b around 0 79.1%
*-commutative86.1%
associate-/l*86.4%
Applied egg-rr79.4%
Taylor expanded in x around 0 71.8%
if -7.49999999999999993e25 < y < 7.00000000000000002e136Initial program 91.9%
associate-/l*81.0%
associate-/l*77.2%
Simplified77.2%
Taylor expanded in y around 0 53.0%
Final simplification56.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -1.05e+72)
(/ z b)
(if (<= y -1.65e+14)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= y 2.75e+137) (/ x (+ a 1.0)) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -1.05e+72) {
tmp = z / b;
} else if (y <= -1.65e+14) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 2.75e+137) {
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 (y <= (-1.05d+72)) then
tmp = z / b
else if (y <= (-1.65d+14)) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (y <= 2.75d+137) 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 (y <= -1.05e+72) {
tmp = z / b;
} else if (y <= -1.65e+14) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 2.75e+137) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -1.05e+72: tmp = z / b elif y <= -1.65e+14: tmp = (y / t) * (z / (a + 1.0)) elif y <= 2.75e+137: tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -1.05e+72) tmp = Float64(z / b); elseif (y <= -1.65e+14) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (y <= 2.75e+137) 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 (y <= -1.05e+72) tmp = z / b; elseif (y <= -1.65e+14) tmp = (y / t) * (z / (a + 1.0)); elseif (y <= 2.75e+137) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.05e+72], N[(z / b), $MachinePrecision], If[LessEqual[y, -1.65e+14], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.75e+137], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+72}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -1.65 \cdot 10^{+14}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq 2.75 \cdot 10^{+137}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -1.0500000000000001e72 or 2.7500000000000001e137 < y Initial program 45.2%
associate-/l*54.6%
associate-/l*60.8%
Simplified60.8%
Taylor expanded in y around inf 60.5%
if -1.0500000000000001e72 < y < -1.65e14Initial program 86.1%
associate-/l*86.2%
associate-/l*86.2%
Simplified86.2%
Taylor expanded in b around 0 79.1%
*-commutative86.1%
associate-/l*86.4%
Applied egg-rr79.4%
Taylor expanded in x around 0 71.8%
times-frac71.8%
Simplified71.8%
if -1.65e14 < y < 2.7500000000000001e137Initial program 91.9%
associate-/l*81.0%
associate-/l*77.2%
Simplified77.2%
Taylor expanded in y around 0 53.0%
Final simplification56.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -7.6e+70) (not (<= y 2.7e+137))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -7.6e+70) || !(y <= 2.7e+137)) {
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 <= (-7.6d+70)) .or. (.not. (y <= 2.7d+137))) 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 <= -7.6e+70) || !(y <= 2.7e+137)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -7.6e+70) or not (y <= 2.7e+137): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -7.6e+70) || !(y <= 2.7e+137)) 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 <= -7.6e+70) || ~((y <= 2.7e+137))) 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, -7.6e+70], N[Not[LessEqual[y, 2.7e+137]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.6 \cdot 10^{+70} \lor \neg \left(y \leq 2.7 \cdot 10^{+137}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -7.5999999999999996e70 or 2.70000000000000017e137 < y Initial program 45.2%
associate-/l*54.6%
associate-/l*60.8%
Simplified60.8%
Taylor expanded in y around inf 60.5%
if -7.5999999999999996e70 < y < 2.70000000000000017e137Initial program 91.4%
associate-/l*81.4%
associate-/l*77.9%
Simplified77.9%
Taylor expanded in y around 0 51.2%
Final simplification54.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -4.2e+45) (not (<= a 2.9e+127))) (/ x a) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -4.2e+45) || !(a <= 2.9e+127)) {
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 <= (-4.2d+45)) .or. (.not. (a <= 2.9d+127))) 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 <= -4.2e+45) || !(a <= 2.9e+127)) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -4.2e+45) or not (a <= 2.9e+127): tmp = x / a else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -4.2e+45) || !(a <= 2.9e+127)) 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 <= -4.2e+45) || ~((a <= 2.9e+127))) tmp = x / a; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -4.2e+45], N[Not[LessEqual[a, 2.9e+127]], $MachinePrecision]], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{+45} \lor \neg \left(a \leq 2.9 \cdot 10^{+127}\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if a < -4.1999999999999999e45 or 2.9000000000000002e127 < a Initial program 78.9%
associate-/l*72.3%
associate-/l*74.1%
Simplified74.1%
Taylor expanded in a around inf 74.1%
Taylor expanded in x around inf 54.2%
Taylor expanded in a around inf 52.3%
if -4.1999999999999999e45 < a < 2.9000000000000002e127Initial program 75.1%
associate-/l*73.2%
associate-/l*71.4%
Simplified71.4%
Taylor expanded in y around inf 38.9%
Final simplification44.2%
(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 76.6%
associate-/l*72.8%
associate-/l*72.5%
Simplified72.5%
Taylor expanded in a around inf 51.6%
Taylor expanded in x around inf 34.8%
Taylor expanded in a around inf 24.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 2024116
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:alt
(! :herbie-platform default (if (< t -1707385670788761/12500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))) (if (< t 1518483551868623/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ z b) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))