
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) t_1)))
(t_3 (+ (+ a 1.0) (* y (/ b t))))
(t_4 (+ 1.0 (+ a t_1))))
(if (<= t_2 (- INFINITY))
(* z (+ (/ x (* z t_4)) (/ y (* t t_4))))
(if (<= t_2 5e+280)
t_2
(if (<= t_2 INFINITY)
(* z (+ (/ (/ x z) t_3) (/ (/ y t) t_3)))
(/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_3 = (a + 1.0) + (y * (b / t));
double t_4 = 1.0 + (a + t_1);
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = z * ((x / (z * t_4)) + (y / (t * t_4)));
} else if (t_2 <= 5e+280) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = z * (((x / z) / t_3) + ((y / t) / t_3));
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_3 = (a + 1.0) + (y * (b / t));
double t_4 = 1.0 + (a + t_1);
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = z * ((x / (z * t_4)) + (y / (t * t_4)));
} else if (t_2 <= 5e+280) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = z * (((x / z) / t_3) + ((y / t) / t_3));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1) t_3 = (a + 1.0) + (y * (b / t)) t_4 = 1.0 + (a + t_1) tmp = 0 if t_2 <= -math.inf: tmp = z * ((x / (z * t_4)) + (y / (t * t_4))) elif t_2 <= 5e+280: tmp = t_2 elif t_2 <= math.inf: tmp = z * (((x / z) / t_3) + ((y / t) / t_3)) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + t_1)) t_3 = Float64(Float64(a + 1.0) + Float64(y * Float64(b / t))) t_4 = Float64(1.0 + Float64(a + t_1)) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(x / Float64(z * t_4)) + Float64(y / Float64(t * t_4)))); elseif (t_2 <= 5e+280) tmp = t_2; elseif (t_2 <= Inf) tmp = Float64(z * Float64(Float64(Float64(x / z) / t_3) + Float64(Float64(y / t) / t_3))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1); t_3 = (a + 1.0) + (y * (b / t)); t_4 = 1.0 + (a + t_1); tmp = 0.0; if (t_2 <= -Inf) tmp = z * ((x / (z * t_4)) + (y / (t * t_4))); elseif (t_2 <= 5e+280) tmp = t_2; elseif (t_2 <= Inf) tmp = z * (((x / z) / t_3) + ((y / t) / t_3)); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(N[(x / N[(z * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+280], t$95$2, If[LessEqual[t$95$2, Infinity], N[(z * N[(N[(N[(x / z), $MachinePrecision] / t$95$3), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] / t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + t\_1}\\
t_3 := \left(a + 1\right) + y \cdot \frac{b}{t}\\
t_4 := 1 + \left(a + t\_1\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_4} + \frac{y}{t \cdot t\_4}\right)\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+280}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;z \cdot \left(\frac{\frac{x}{z}}{t\_3} + \frac{\frac{y}{t}}{t\_3}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 26.8%
associate-/l*48.8%
associate-/l*48.8%
Simplified48.8%
Taylor expanded in z around inf 92.4%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000002e280Initial program 92.3%
if 5.0000000000000002e280 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 38.4%
associate-/l*60.9%
associate-/l*60.9%
Simplified60.9%
Taylor expanded in z around inf 88.3%
associate-/r*88.6%
associate-+r+88.6%
associate-*l/88.6%
*-commutative88.6%
associate-/r*88.5%
associate-+r+88.5%
associate-*l/88.5%
*-commutative88.5%
Simplified88.5%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.7%
associate-/l*10.8%
Simplified10.8%
Taylor expanded in y around inf 94.8%
Final simplification92.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (* y b) t))
(t_2 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) t_1)))
(t_3 (+ 1.0 (+ a t_1)))
(t_4 (* z (+ (/ x (* z t_3)) (/ y (* t t_3))))))
(if (<= t_2 (- INFINITY))
t_4
(if (<= t_2 5e+280) t_2 (if (<= t_2 INFINITY) t_4 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_3 = 1.0 + (a + t_1);
double t_4 = z * ((x / (z * t_3)) + (y / (t * t_3)));
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = t_4;
} else if (t_2 <= 5e+280) {
tmp = t_2;
} else if (t_2 <= ((double) INFINITY)) {
tmp = t_4;
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * b) / t;
double t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1);
double t_3 = 1.0 + (a + t_1);
double t_4 = z * ((x / (z * t_3)) + (y / (t * t_3)));
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = t_4;
} else if (t_2 <= 5e+280) {
tmp = t_2;
} else if (t_2 <= Double.POSITIVE_INFINITY) {
tmp = t_4;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (y * b) / t t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1) t_3 = 1.0 + (a + t_1) t_4 = z * ((x / (z * t_3)) + (y / (t * t_3))) tmp = 0 if t_2 <= -math.inf: tmp = t_4 elif t_2 <= 5e+280: tmp = t_2 elif t_2 <= math.inf: tmp = t_4 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * b) / t) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + t_1)) t_3 = Float64(1.0 + Float64(a + t_1)) t_4 = Float64(z * Float64(Float64(x / Float64(z * t_3)) + Float64(y / Float64(t * t_3)))) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = t_4; elseif (t_2 <= 5e+280) tmp = t_2; elseif (t_2 <= Inf) tmp = t_4; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (y * b) / t; t_2 = (x + ((y * z) / t)) / ((a + 1.0) + t_1); t_3 = 1.0 + (a + t_1); t_4 = z * ((x / (z * t_3)) + (y / (t * t_3))); tmp = 0.0; if (t_2 <= -Inf) tmp = t_4; elseif (t_2 <= 5e+280) tmp = t_2; elseif (t_2 <= Inf) tmp = t_4; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = 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, (-Infinity)], t$95$4, If[LessEqual[t$95$2, 5e+280], t$95$2, If[LessEqual[t$95$2, Infinity], t$95$4, N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t}\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + t\_1}\\
t_3 := 1 + \left(a + t\_1\right)\\
t_4 := z \cdot \left(\frac{x}{z \cdot t\_3} + \frac{y}{t \cdot t\_3}\right)\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+280}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_4\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0 or 5.0000000000000002e280 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0Initial program 33.3%
associate-/l*55.6%
associate-/l*55.6%
Simplified55.6%
Taylor expanded in z around inf 90.1%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000002e280Initial program 92.3%
if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 0.0%
associate-/l*0.7%
associate-/l*10.8%
Simplified10.8%
Taylor expanded in y around inf 94.8%
Final simplification92.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_1 (- INFINITY))
(/ (* z (+ 1.0 (* (/ x z) (/ t y)))) b)
(if (<= t_1 5e+280) t_1 (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (z * (1.0 + ((x / z) * (t / y)))) / b;
} else if (t_1 <= 5e+280) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (z * (1.0 + ((x / z) * (t / y)))) / b;
} else if (t_1 <= 5e+280) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)) tmp = 0 if t_1 <= -math.inf: tmp = (z * (1.0 + ((x / z) * (t / y)))) / b elif t_1 <= 5e+280: tmp = t_1 else: tmp = z / b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(z * Float64(1.0 + Float64(Float64(x / z) * Float64(t / y)))) / b); elseif (t_1 <= 5e+280) tmp = t_1; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); tmp = 0.0; if (t_1 <= -Inf) tmp = (z * (1.0 + ((x / z) * (t / y)))) / b; elseif (t_1 <= 5e+280) tmp = t_1; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(z * N[(1.0 + N[(N[(x / z), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[t$95$1, 5e+280], t$95$1, N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{z \cdot \left(1 + \frac{x}{z} \cdot \frac{t}{y}\right)}{b}\\
\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+280}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 26.8%
associate-/l*48.8%
associate-/l*48.8%
Simplified48.8%
Taylor expanded in z around inf 92.4%
Taylor expanded in b around inf 69.3%
times-frac77.5%
Simplified77.5%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000002e280Initial program 92.3%
if 5.0000000000000002e280 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 18.1%
associate-/l*29.1%
associate-/l*34.4%
Simplified34.4%
Taylor expanded in y around inf 78.5%
Final simplification89.6%
(FPCore (x y z t a b)
:precision binary64
(if (or (<= t -2e-161)
(not
(or (<= t 2.22e-191) (and (not (<= t 2.3e-131)) (<= t 7.6e-85)))))
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))
(/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2e-161) || !((t <= 2.22e-191) || (!(t <= 2.3e-131) && (t <= 7.6e-85)))) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-2d-161)) .or. (.not. (t <= 2.22d-191) .or. (.not. (t <= 2.3d-131)) .and. (t <= 7.6d-85))) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2e-161) || !((t <= 2.22e-191) || (!(t <= 2.3e-131) && (t <= 7.6e-85)))) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2e-161) or not ((t <= 2.22e-191) or (not (t <= 2.3e-131) and (t <= 7.6e-85))): tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2e-161) || !((t <= 2.22e-191) || (!(t <= 2.3e-131) && (t <= 7.6e-85)))) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2e-161) || ~(((t <= 2.22e-191) || (~((t <= 2.3e-131)) && (t <= 7.6e-85))))) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2e-161], N[Not[Or[LessEqual[t, 2.22e-191], And[N[Not[LessEqual[t, 2.3e-131]], $MachinePrecision], LessEqual[t, 7.6e-85]]]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-161} \lor \neg \left(t \leq 2.22 \cdot 10^{-191} \lor \neg \left(t \leq 2.3 \cdot 10^{-131}\right) \land t \leq 7.6 \cdot 10^{-85}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -2.00000000000000006e-161 or 2.22e-191 < t < 2.30000000000000022e-131 or 7.5999999999999997e-85 < t Initial program 84.7%
associate-/l*86.7%
associate-/l*88.7%
Simplified88.7%
if -2.00000000000000006e-161 < t < 2.22e-191 or 2.30000000000000022e-131 < t < 7.5999999999999997e-85Initial program 58.7%
associate-/l*52.5%
associate-/l*46.2%
Simplified46.2%
Taylor expanded in z around inf 70.2%
Taylor expanded in b around inf 76.1%
times-frac68.2%
Simplified68.2%
Taylor expanded in z around 0 77.9%
Final simplification86.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ a 1.0) (* y (/ b t))))
(t_2 (/ (+ x (* y (/ z t))) t_1))
(t_3 (/ (+ z (/ (* x t) y)) b)))
(if (<= t -1.28e-163)
t_2
(if (<= t 1.08e-191)
t_3
(if (<= t 3.7e-131)
(/ (+ x (/ y (/ t z))) t_1)
(if (<= t 1.25e-86) t_3 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + (y * (b / t));
double t_2 = (x + (y * (z / t))) / t_1;
double t_3 = (z + ((x * t) / y)) / b;
double tmp;
if (t <= -1.28e-163) {
tmp = t_2;
} else if (t <= 1.08e-191) {
tmp = t_3;
} else if (t <= 3.7e-131) {
tmp = (x + (y / (t / z))) / t_1;
} else if (t <= 1.25e-86) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (a + 1.0d0) + (y * (b / t))
t_2 = (x + (y * (z / t))) / t_1
t_3 = (z + ((x * t) / y)) / b
if (t <= (-1.28d-163)) then
tmp = t_2
else if (t <= 1.08d-191) then
tmp = t_3
else if (t <= 3.7d-131) then
tmp = (x + (y / (t / z))) / t_1
else if (t <= 1.25d-86) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + (y * (b / t));
double t_2 = (x + (y * (z / t))) / t_1;
double t_3 = (z + ((x * t) / y)) / b;
double tmp;
if (t <= -1.28e-163) {
tmp = t_2;
} else if (t <= 1.08e-191) {
tmp = t_3;
} else if (t <= 3.7e-131) {
tmp = (x + (y / (t / z))) / t_1;
} else if (t <= 1.25e-86) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + 1.0) + (y * (b / t)) t_2 = (x + (y * (z / t))) / t_1 t_3 = (z + ((x * t) / y)) / b tmp = 0 if t <= -1.28e-163: tmp = t_2 elif t <= 1.08e-191: tmp = t_3 elif t <= 3.7e-131: tmp = (x + (y / (t / z))) / t_1 elif t <= 1.25e-86: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + 1.0) + Float64(y * Float64(b / t))) t_2 = Float64(Float64(x + Float64(y * Float64(z / t))) / t_1) t_3 = Float64(Float64(z + Float64(Float64(x * t) / y)) / b) tmp = 0.0 if (t <= -1.28e-163) tmp = t_2; elseif (t <= 1.08e-191) tmp = t_3; elseif (t <= 3.7e-131) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / t_1); elseif (t <= 1.25e-86) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + 1.0) + (y * (b / t)); t_2 = (x + (y * (z / t))) / t_1; t_3 = (z + ((x * t) / y)) / b; tmp = 0.0; if (t <= -1.28e-163) tmp = t_2; elseif (t <= 1.08e-191) tmp = t_3; elseif (t <= 3.7e-131) tmp = (x + (y / (t / z))) / t_1; elseif (t <= 1.25e-86) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[t, -1.28e-163], t$95$2, If[LessEqual[t, 1.08e-191], t$95$3, If[LessEqual[t, 3.7e-131], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t, 1.25e-86], t$95$3, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + 1\right) + y \cdot \frac{b}{t}\\
t_2 := \frac{x + y \cdot \frac{z}{t}}{t\_1}\\
t_3 := \frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{if}\;t \leq -1.28 \cdot 10^{-163}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.08 \cdot 10^{-191}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;t \leq 3.7 \cdot 10^{-131}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{t\_1}\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-86}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.28e-163 or 1.25e-86 < t Initial program 84.0%
associate-/l*86.8%
associate-/l*89.9%
Simplified89.9%
if -1.28e-163 < t < 1.07999999999999996e-191 or 3.7000000000000002e-131 < t < 1.25e-86Initial program 58.7%
associate-/l*52.5%
associate-/l*46.2%
Simplified46.2%
Taylor expanded in z around inf 70.2%
Taylor expanded in b around inf 76.1%
times-frac68.2%
Simplified68.2%
Taylor expanded in z around 0 77.9%
if 1.07999999999999996e-191 < t < 3.7000000000000002e-131Initial program 92.9%
associate-/l*86.4%
associate-/l*73.5%
Simplified73.5%
clear-num73.6%
un-div-inv73.7%
Applied egg-rr73.7%
Final simplification86.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -2.9e-85)
(/ x (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t -1.75e-143)
(/ z b)
(if (or (<= t -3.1e-161) (not (<= t 9.6e-60)))
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(/ (+ z (/ (* x t) y)) b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.9e-85) {
tmp = x / ((a + 1.0) + (y / (t / b)));
} else if (t <= -1.75e-143) {
tmp = z / b;
} else if ((t <= -3.1e-161) || !(t <= 9.6e-60)) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-2.9d-85)) then
tmp = x / ((a + 1.0d0) + (y / (t / b)))
else if (t <= (-1.75d-143)) then
tmp = z / b
else if ((t <= (-3.1d-161)) .or. (.not. (t <= 9.6d-60))) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.9e-85) {
tmp = x / ((a + 1.0) + (y / (t / b)));
} else if (t <= -1.75e-143) {
tmp = z / b;
} else if ((t <= -3.1e-161) || !(t <= 9.6e-60)) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.9e-85: tmp = x / ((a + 1.0) + (y / (t / b))) elif t <= -1.75e-143: tmp = z / b elif (t <= -3.1e-161) or not (t <= 9.6e-60): tmp = (x + ((y * z) / t)) / (a + 1.0) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.9e-85) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t <= -1.75e-143) tmp = Float64(z / b); elseif ((t <= -3.1e-161) || !(t <= 9.6e-60)) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.9e-85) tmp = x / ((a + 1.0) + (y / (t / b))); elseif (t <= -1.75e-143) tmp = z / b; elseif ((t <= -3.1e-161) || ~((t <= 9.6e-60))) tmp = (x + ((y * z) / t)) / (a + 1.0); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.9e-85], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.75e-143], N[(z / b), $MachinePrecision], If[Or[LessEqual[t, -3.1e-161], N[Not[LessEqual[t, 9.6e-60]], $MachinePrecision]], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.9 \cdot 10^{-85}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t \leq -1.75 \cdot 10^{-143}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;t \leq -3.1 \cdot 10^{-161} \lor \neg \left(t \leq 9.6 \cdot 10^{-60}\right):\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -2.9000000000000002e-85Initial program 84.8%
associate-/l*88.0%
associate-/l*93.4%
Simplified93.4%
Taylor expanded in x around inf 83.2%
clear-num83.2%
un-div-inv83.2%
Applied egg-rr83.2%
if -2.9000000000000002e-85 < t < -1.75000000000000003e-143Initial program 56.5%
associate-/l*56.7%
associate-/l*44.8%
Simplified44.8%
Taylor expanded in y around inf 75.8%
if -1.75000000000000003e-143 < t < -3.0999999999999999e-161 or 9.60000000000000038e-60 < t Initial program 85.3%
associate-/l*87.9%
associate-/l*90.2%
Simplified90.2%
Taylor expanded in b around 0 78.5%
if -3.0999999999999999e-161 < t < 9.60000000000000038e-60Initial program 66.8%
associate-/l*60.7%
associate-/l*53.5%
Simplified53.5%
Taylor expanded in z around inf 74.5%
Taylor expanded in b around inf 68.1%
times-frac62.0%
Simplified62.0%
Taylor expanded in z around 0 71.3%
Final simplification77.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -3.1e+125)
(/ (+ z (/ (* x t) y)) b)
(if (<= y 4e-165)
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (* b (/ y t))))
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.1e+125) {
tmp = (z + ((x * t) / y)) / b;
} else if (y <= 4e-165) {
tmp = (x + ((y * z) / t)) / ((a + 1.0) + (b * (y / t)));
} else {
tmp = (x + (y * (z / t))) / ((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 (y <= (-3.1d+125)) then
tmp = (z + ((x * t) / y)) / b
else if (y <= 4d-165) then
tmp = (x + ((y * z) / t)) / ((a + 1.0d0) + (b * (y / t)))
else
tmp = (x + (y * (z / t))) / ((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 (y <= -3.1e+125) {
tmp = (z + ((x * t) / y)) / b;
} else if (y <= 4e-165) {
tmp = (x + ((y * z) / t)) / ((a + 1.0) + (b * (y / t)));
} else {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.1e+125: tmp = (z + ((x * t) / y)) / b elif y <= 4e-165: tmp = (x + ((y * z) / t)) / ((a + 1.0) + (b * (y / t))) else: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.1e+125) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); elseif (y <= 4e-165) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / 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 (y <= -3.1e+125) tmp = (z + ((x * t) / y)) / b; elseif (y <= 4e-165) tmp = (x + ((y * z) / t)) / ((a + 1.0) + (b * (y / t))); else tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.1e+125], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], If[LessEqual[y, 4e-165], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+125}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-165}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if y < -3.1e125Initial program 44.7%
associate-/l*47.3%
associate-/l*53.9%
Simplified53.9%
Taylor expanded in z around inf 54.1%
Taylor expanded in b around inf 72.9%
times-frac68.3%
Simplified68.3%
Taylor expanded in z around 0 72.9%
if -3.1e125 < y < 4e-165Initial program 94.0%
*-commutative94.0%
associate-/l*94.0%
Applied egg-rr94.0%
if 4e-165 < y Initial program 71.8%
associate-/l*77.5%
associate-/l*81.0%
Simplified81.0%
Final simplification86.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -7.1e-149)
(/ x (+ (+ a 1.0) (+ (+ 1.0 (* b (/ y t))) -1.0)))
(if (<= t -7e-210)
(/ (* y z) (* t (+ 1.0 (+ a (/ (* y b) t)))))
(if (<= t 2.1e-58)
(/ (+ z (/ (* x t) 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 (t <= -7.1e-149) {
tmp = x / ((a + 1.0) + ((1.0 + (b * (y / t))) + -1.0));
} else if (t <= -7e-210) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (t <= 2.1e-58) {
tmp = (z + ((x * t) / 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 (t <= (-7.1d-149)) then
tmp = x / ((a + 1.0d0) + ((1.0d0 + (b * (y / t))) + (-1.0d0)))
else if (t <= (-7d-210)) then
tmp = (y * z) / (t * (1.0d0 + (a + ((y * b) / t))))
else if (t <= 2.1d-58) then
tmp = (z + ((x * t) / 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 (t <= -7.1e-149) {
tmp = x / ((a + 1.0) + ((1.0 + (b * (y / t))) + -1.0));
} else if (t <= -7e-210) {
tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
} else if (t <= 2.1e-58) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -7.1e-149: tmp = x / ((a + 1.0) + ((1.0 + (b * (y / t))) + -1.0)) elif t <= -7e-210: tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))) elif t <= 2.1e-58: tmp = (z + ((x * t) / 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 (t <= -7.1e-149) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(Float64(1.0 + Float64(b * Float64(y / t))) + -1.0))); elseif (t <= -7e-210) tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))))); elseif (t <= 2.1e-58) tmp = Float64(Float64(z + Float64(Float64(x * t) / 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 (t <= -7.1e-149) tmp = x / ((a + 1.0) + ((1.0 + (b * (y / t))) + -1.0)); elseif (t <= -7e-210) tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t)))); elseif (t <= 2.1e-58) tmp = (z + ((x * t) / y)) / b; else tmp = (x + ((y * z) / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7.1e-149], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7e-210], N[(N[(y * z), $MachinePrecision] / N[(t * N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.1e-58], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $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}\;t \leq -7.1 \cdot 10^{-149}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \left(\left(1 + b \cdot \frac{y}{t}\right) + -1\right)}\\
\mathbf{elif}\;t \leq -7 \cdot 10^{-210}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-58}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -7.1000000000000002e-149Initial program 82.8%
associate-/l*85.7%
associate-/l*89.6%
Simplified89.6%
Taylor expanded in x around inf 78.5%
expm1-log1p-u67.4%
expm1-undefine67.4%
log1p-undefine67.4%
add-exp-log78.5%
associate-*r/74.6%
*-commutative74.6%
associate-/l*79.5%
Applied egg-rr79.5%
if -7.1000000000000002e-149 < t < -7.00000000000000031e-210Initial program 80.5%
associate-/l*74.2%
associate-/l*61.7%
Simplified61.7%
Taylor expanded in x around 0 86.7%
if -7.00000000000000031e-210 < t < 2.09999999999999988e-58Initial program 66.6%
associate-/l*59.8%
associate-/l*54.3%
Simplified54.3%
Taylor expanded in z around inf 71.2%
Taylor expanded in b around inf 68.0%
times-frac61.1%
Simplified61.1%
Taylor expanded in z around 0 71.6%
if 2.09999999999999988e-58 < t Initial program 83.7%
associate-/l*87.9%
associate-/l*90.5%
Simplified90.5%
Taylor expanded in b around 0 77.5%
Final simplification77.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -7.4e-96) (not (<= t 4.8e-63))) (/ x (+ 1.0 (+ a (/ (* y b) t)))) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7.4e-96) || !(t <= 4.8e-63)) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-7.4d-96)) .or. (.not. (t <= 4.8d-63))) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -7.4e-96) || !(t <= 4.8e-63)) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -7.4e-96) or not (t <= 4.8e-63): tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -7.4e-96) || !(t <= 4.8e-63)) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -7.4e-96) || ~((t <= 4.8e-63))) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -7.4e-96], N[Not[LessEqual[t, 4.8e-63]], $MachinePrecision]], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.4 \cdot 10^{-96} \lor \neg \left(t \leq 4.8 \cdot 10^{-63}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -7.39999999999999972e-96 or 4.8000000000000001e-63 < t Initial program 84.6%
associate-/l*88.2%
associate-/l*91.7%
Simplified91.7%
Taylor expanded in x around inf 75.8%
if -7.39999999999999972e-96 < t < 4.8000000000000001e-63Initial program 67.7%
associate-/l*61.4%
associate-/l*55.2%
Simplified55.2%
Taylor expanded in z around inf 74.3%
Taylor expanded in b around inf 64.2%
times-frac57.9%
Simplified57.9%
Taylor expanded in z around 0 66.9%
Final simplification72.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.4e-88) (not (<= t 7.3e-63))) (/ x (+ (+ a 1.0) (* y (/ b t)))) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.4e-88) || !(t <= 7.3e-63)) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-4.4d-88)) .or. (.not. (t <= 7.3d-63))) then
tmp = x / ((a + 1.0d0) + (y * (b / t)))
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.4e-88) || !(t <= 7.3e-63)) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.4e-88) or not (t <= 7.3e-63): tmp = x / ((a + 1.0) + (y * (b / t))) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.4e-88) || !(t <= 7.3e-63)) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -4.4e-88) || ~((t <= 7.3e-63))) tmp = x / ((a + 1.0) + (y * (b / t))); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4.4e-88], N[Not[LessEqual[t, 7.3e-63]], $MachinePrecision]], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.4 \cdot 10^{-88} \lor \neg \left(t \leq 7.3 \cdot 10^{-63}\right):\\
\;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -4.4000000000000001e-88 or 7.3000000000000002e-63 < t Initial program 84.4%
associate-/l*88.0%
associate-/l*92.2%
Simplified92.2%
Taylor expanded in x around inf 79.0%
if -4.4000000000000001e-88 < t < 7.3000000000000002e-63Initial program 68.3%
associate-/l*62.3%
associate-/l*55.1%
Simplified55.1%
Taylor expanded in z around inf 74.8%
Taylor expanded in b around inf 63.9%
times-frac57.7%
Simplified57.7%
Taylor expanded in z around 0 66.6%
Final simplification74.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -6.8e-93)
(/ x (+ (+ a 1.0) (/ y (/ t b))))
(if (<= t 4.8e-63)
(/ (+ z (/ (* x t) y)) b)
(/ x (+ (+ 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.8e-93) {
tmp = x / ((a + 1.0) + (y / (t / b)));
} else if (t <= 4.8e-63) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = x / ((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.8d-93)) then
tmp = x / ((a + 1.0d0) + (y / (t / b)))
else if (t <= 4.8d-63) then
tmp = (z + ((x * t) / y)) / b
else
tmp = x / ((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.8e-93) {
tmp = x / ((a + 1.0) + (y / (t / b)));
} else if (t <= 4.8e-63) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = x / ((a + 1.0) + (y * (b / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -6.8e-93: tmp = x / ((a + 1.0) + (y / (t / b))) elif t <= 4.8e-63: tmp = (z + ((x * t) / y)) / b else: tmp = x / ((a + 1.0) + (y * (b / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -6.8e-93) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b)))); elseif (t <= 4.8e-63) tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); else tmp = Float64(x / 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.8e-93) tmp = x / ((a + 1.0) + (y / (t / b))); elseif (t <= 4.8e-63) tmp = (z + ((x * t) / y)) / b; else tmp = x / ((a + 1.0) + (y * (b / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -6.8e-93], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.8e-63], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(x / 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.8 \cdot 10^{-93}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{-63}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if t < -6.80000000000000002e-93Initial program 84.8%
associate-/l*88.0%
associate-/l*93.4%
Simplified93.4%
Taylor expanded in x around inf 83.2%
clear-num83.2%
un-div-inv83.2%
Applied egg-rr83.2%
if -6.80000000000000002e-93 < t < 4.8000000000000001e-63Initial program 68.3%
associate-/l*62.3%
associate-/l*55.1%
Simplified55.1%
Taylor expanded in z around inf 74.8%
Taylor expanded in b around inf 63.9%
times-frac57.7%
Simplified57.7%
Taylor expanded in z around 0 66.6%
if 4.8000000000000001e-63 < t Initial program 83.9%
associate-/l*88.0%
associate-/l*90.7%
Simplified90.7%
Taylor expanded in x around inf 74.0%
Final simplification74.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.35e-102)
(/ x (+ (+ a 1.0) (+ (+ 1.0 (* b (/ y t))) -1.0)))
(if (<= t 3.2e-61)
(/ (+ z (/ (* x t) 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 (t <= -1.35e-102) {
tmp = x / ((a + 1.0) + ((1.0 + (b * (y / t))) + -1.0));
} else if (t <= 3.2e-61) {
tmp = (z + ((x * t) / 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 (t <= (-1.35d-102)) then
tmp = x / ((a + 1.0d0) + ((1.0d0 + (b * (y / t))) + (-1.0d0)))
else if (t <= 3.2d-61) then
tmp = (z + ((x * t) / 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 (t <= -1.35e-102) {
tmp = x / ((a + 1.0) + ((1.0 + (b * (y / t))) + -1.0));
} else if (t <= 3.2e-61) {
tmp = (z + ((x * t) / y)) / b;
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.35e-102: tmp = x / ((a + 1.0) + ((1.0 + (b * (y / t))) + -1.0)) elif t <= 3.2e-61: tmp = (z + ((x * t) / 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 (t <= -1.35e-102) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(Float64(1.0 + Float64(b * Float64(y / t))) + -1.0))); elseif (t <= 3.2e-61) tmp = Float64(Float64(z + Float64(Float64(x * t) / 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 (t <= -1.35e-102) tmp = x / ((a + 1.0) + ((1.0 + (b * (y / t))) + -1.0)); elseif (t <= 3.2e-61) tmp = (z + ((x * t) / y)) / b; else tmp = (x + ((y * z) / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.35e-102], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e-61], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $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}\;t \leq -1.35 \cdot 10^{-102}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + \left(\left(1 + b \cdot \frac{y}{t}\right) + -1\right)}\\
\mathbf{elif}\;t \leq 3.2 \cdot 10^{-61}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if t < -1.35e-102Initial program 85.1%
associate-/l*88.3%
associate-/l*92.5%
Simplified92.5%
Taylor expanded in x around inf 81.4%
expm1-log1p-u71.0%
expm1-undefine71.0%
log1p-undefine71.0%
add-exp-log81.4%
associate-*r/77.2%
*-commutative77.2%
associate-/l*82.6%
Applied egg-rr82.6%
if -1.35e-102 < t < 3.2000000000000001e-61Initial program 68.0%
associate-/l*61.9%
associate-/l*55.7%
Simplified55.7%
Taylor expanded in z around inf 74.6%
Taylor expanded in b around inf 64.6%
times-frac58.4%
Simplified58.4%
Taylor expanded in z around 0 67.3%
if 3.2000000000000001e-61 < t Initial program 83.7%
associate-/l*87.9%
associate-/l*90.5%
Simplified90.5%
Taylor expanded in b around 0 77.5%
Final simplification75.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -4.5e-97) (not (<= t 8.8e-57))) (/ x (+ a 1.0)) (/ (+ z (/ (* x t) y)) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.5e-97) || !(t <= 8.8e-57)) {
tmp = x / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-4.5d-97)) .or. (.not. (t <= 8.8d-57))) then
tmp = x / (a + 1.0d0)
else
tmp = (z + ((x * t) / y)) / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -4.5e-97) || !(t <= 8.8e-57)) {
tmp = x / (a + 1.0);
} else {
tmp = (z + ((x * t) / y)) / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -4.5e-97) or not (t <= 8.8e-57): tmp = x / (a + 1.0) else: tmp = (z + ((x * t) / y)) / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -4.5e-97) || !(t <= 8.8e-57)) tmp = Float64(x / Float64(a + 1.0)); else tmp = Float64(Float64(z + Float64(Float64(x * t) / y)) / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -4.5e-97) || ~((t <= 8.8e-57))) tmp = x / (a + 1.0); else tmp = (z + ((x * t) / y)) / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -4.5e-97], N[Not[LessEqual[t, 8.8e-57]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.5 \cdot 10^{-97} \lor \neg \left(t \leq 8.8 \cdot 10^{-57}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\
\end{array}
\end{array}
if t < -4.5000000000000001e-97 or 8.79999999999999994e-57 < t Initial program 84.5%
associate-/l*88.1%
associate-/l*91.6%
Simplified91.6%
Taylor expanded in y around 0 67.5%
if -4.5000000000000001e-97 < t < 8.79999999999999994e-57Initial program 68.0%
associate-/l*61.9%
associate-/l*55.7%
Simplified55.7%
Taylor expanded in z around inf 74.6%
Taylor expanded in b around inf 64.6%
times-frac58.4%
Simplified58.4%
Taylor expanded in z around 0 67.3%
Final simplification67.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -6.6e-103) (not (<= t 1.05e-58))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -6.6e-103) || !(t <= 1.05e-58)) {
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 <= (-6.6d-103)) .or. (.not. (t <= 1.05d-58))) 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 <= -6.6e-103) || !(t <= 1.05e-58)) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -6.6e-103) or not (t <= 1.05e-58): tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -6.6e-103) || !(t <= 1.05e-58)) 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 <= -6.6e-103) || ~((t <= 1.05e-58))) 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, -6.6e-103], N[Not[LessEqual[t, 1.05e-58]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.6 \cdot 10^{-103} \lor \neg \left(t \leq 1.05 \cdot 10^{-58}\right):\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -6.59999999999999979e-103 or 1.04999999999999994e-58 < t Initial program 84.5%
associate-/l*88.1%
associate-/l*91.6%
Simplified91.6%
Taylor expanded in y around 0 67.5%
if -6.59999999999999979e-103 < t < 1.04999999999999994e-58Initial program 68.0%
associate-/l*61.9%
associate-/l*55.7%
Simplified55.7%
Taylor expanded in y around inf 57.4%
Final simplification63.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.6e-23) (not (<= t 6.2e-43))) (/ x a) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.6e-23) || !(t <= 6.2e-43)) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-2.6d-23)) .or. (.not. (t <= 6.2d-43))) then
tmp = x / a
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.6e-23) || !(t <= 6.2e-43)) {
tmp = x / a;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.6e-23) or not (t <= 6.2e-43): tmp = x / a else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.6e-23) || !(t <= 6.2e-43)) tmp = Float64(x / a); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.6e-23) || ~((t <= 6.2e-43))) tmp = x / a; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.6e-23], N[Not[LessEqual[t, 6.2e-43]], $MachinePrecision]], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.6 \cdot 10^{-23} \lor \neg \left(t \leq 6.2 \cdot 10^{-43}\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if t < -2.6e-23 or 6.1999999999999999e-43 < t Initial program 85.5%
associate-/l*89.6%
associate-/l*94.4%
Simplified94.4%
Taylor expanded in x around inf 81.3%
Taylor expanded in a around inf 36.2%
if -2.6e-23 < t < 6.1999999999999999e-43Initial program 70.0%
associate-/l*65.0%
associate-/l*59.1%
Simplified59.1%
Taylor expanded in y around inf 53.4%
Final simplification43.9%
(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 78.5%
associate-/l*78.6%
associate-/l*78.6%
Simplified78.6%
Taylor expanded in x around inf 59.8%
Taylor expanded in a around inf 25.2%
Final simplification25.2%
(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 2024055
(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))))