
(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 19 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)) (+ (+ a 1.0) (/ (* y b) t)))))
(if (<= t_1 (- INFINITY))
(* (/ y t) (/ z (+ (+ a 1.0) (* y (/ b t)))))
(if (<= t_1 -1e-299)
t_1
(if (<= t_1 0.0)
(-
(/ z b)
(/ (fma -1.0 (/ t (/ b x)) (/ (* z t) (/ (pow b 2.0) (+ a 1.0)))) y))
(if (<= t_1 1e+303) 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 = (y / t) * (z / ((a + 1.0) + (y * (b / t))));
} else if (t_1 <= -1e-299) {
tmp = t_1;
} else if (t_1 <= 0.0) {
tmp = (z / b) - (fma(-1.0, (t / (b / x)), ((z * t) / (pow(b, 2.0) / (a + 1.0)))) / y);
} else if (t_1 <= 1e+303) {
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(y / t) * Float64(z / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t))))); elseif (t_1 <= -1e-299) tmp = t_1; elseif (t_1 <= 0.0) tmp = Float64(Float64(z / b) - Float64(fma(-1.0, Float64(t / Float64(b / x)), Float64(Float64(z * t) / Float64((b ^ 2.0) / Float64(a + 1.0)))) / y)); elseif (t_1 <= 1e+303) tmp = t_1; else tmp = Float64(z / b); end return 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[(y / t), $MachinePrecision] * N[(z / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-299], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(z / b), $MachinePrecision] - N[(N[(-1.0 * N[(t / N[(b / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / N[(N[Power[b, 2.0], $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+303], 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{y}{t} \cdot \frac{z}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-299}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{z}{b} - \frac{\mathsf{fma}\left(-1, \frac{t}{\frac{b}{x}}, \frac{z \cdot t}{\frac{{b}^{2}}{a + 1}}\right)}{y}\\
\mathbf{elif}\;t\_1 \leq 10^{+303}:\\
\;\;\;\;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 34.2%
*-commutative34.2%
associate-*l/53.3%
*-commutative53.3%
associate-*l/53.3%
Simplified53.3%
Taylor expanded in x around 0 57.7%
times-frac90.0%
associate-+r+90.0%
associate-*l/90.1%
*-commutative90.1%
Simplified90.1%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.99999999999999992e-300 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1e303Initial program 98.5%
if -9.99999999999999992e-300 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0Initial program 42.5%
*-commutative42.5%
associate-*l/43.1%
*-commutative43.1%
associate-*l/70.6%
Simplified70.6%
Taylor expanded in y around -inf 67.2%
+-commutative67.2%
mul-1-neg67.2%
unsub-neg67.2%
fma-neg67.2%
associate-/l*74.9%
mul-1-neg74.9%
remove-double-neg74.9%
associate-*r*74.9%
associate-/l*75.3%
Simplified75.3%
if 1e303 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 9.7%
*-commutative9.7%
associate-*l/20.2%
*-commutative20.2%
associate-*l/28.0%
Simplified28.0%
Taylor expanded in t around 0 82.1%
Final simplification92.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
(t_2 (+ (+ a 1.0) (* y (/ b t)))))
(if (<= t_1 (- INFINITY))
(* (/ y t) (/ z t_2))
(if (<= t_1 -2e-192)
t_1
(if (<= t_1 2e-253)
(/ (+ x (* y (/ z t))) t_2)
(if (<= t_1 1e+303) 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 t_2 = (a + 1.0) + (y * (b / t));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (y / t) * (z / t_2);
} else if (t_1 <= -2e-192) {
tmp = t_1;
} else if (t_1 <= 2e-253) {
tmp = (x + (y * (z / t))) / t_2;
} else if (t_1 <= 1e+303) {
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 t_2 = (a + 1.0) + (y * (b / t));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (y / t) * (z / t_2);
} else if (t_1 <= -2e-192) {
tmp = t_1;
} else if (t_1 <= 2e-253) {
tmp = (x + (y * (z / t))) / t_2;
} else if (t_1 <= 1e+303) {
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)) t_2 = (a + 1.0) + (y * (b / t)) tmp = 0 if t_1 <= -math.inf: tmp = (y / t) * (z / t_2) elif t_1 <= -2e-192: tmp = t_1 elif t_1 <= 2e-253: tmp = (x + (y * (z / t))) / t_2 elif t_1 <= 1e+303: 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))) t_2 = Float64(Float64(a + 1.0) + Float64(y * Float64(b / t))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(y / t) * Float64(z / t_2)); elseif (t_1 <= -2e-192) tmp = t_1; elseif (t_1 <= 2e-253) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / t_2); elseif (t_1 <= 1e+303) 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)); t_2 = (a + 1.0) + (y * (b / t)); tmp = 0.0; if (t_1 <= -Inf) tmp = (y / t) * (z / t_2); elseif (t_1 <= -2e-192) tmp = t_1; elseif (t_1 <= 2e-253) tmp = (x + (y * (z / t))) / t_2; elseif (t_1 <= 1e+303) 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]}, Block[{t$95$2 = N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-192], t$95$1, If[LessEqual[t$95$1, 2e-253], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$1, 1e+303], 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}}\\
t_2 := \left(a + 1\right) + y \cdot \frac{b}{t}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{t\_2}\\
\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-192}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-253}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{t\_2}\\
\mathbf{elif}\;t\_1 \leq 10^{+303}:\\
\;\;\;\;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 34.2%
*-commutative34.2%
associate-*l/53.3%
*-commutative53.3%
associate-*l/53.3%
Simplified53.3%
Taylor expanded in x around 0 57.7%
times-frac90.0%
associate-+r+90.0%
associate-*l/90.1%
*-commutative90.1%
Simplified90.1%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -2.0000000000000002e-192 or 2.0000000000000001e-253 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1e303Initial program 99.6%
if -2.0000000000000002e-192 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e-253Initial program 57.5%
*-commutative57.5%
associate-*l/60.3%
*-commutative60.3%
associate-*l/78.9%
Simplified78.9%
if 1e303 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) Initial program 9.7%
*-commutative9.7%
associate-*l/20.2%
*-commutative20.2%
associate-*l/28.0%
Simplified28.0%
Taylor expanded in t around 0 82.1%
Final simplification91.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2e+166)
(/ z b)
(if (<= y -1.02e+15)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= y -0.011)
(/ z b)
(if (<= y -6.6e-100)
(/ x (+ 1.0 (/ (* y b) t)))
(if (<= y -7e-150)
(* z (/ y (* t (+ a 1.0))))
(if (<= y 9e+92) (/ x (+ a 1.0)) (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2e+166) {
tmp = z / b;
} else if (y <= -1.02e+15) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= -0.011) {
tmp = z / b;
} else if (y <= -6.6e-100) {
tmp = x / (1.0 + ((y * b) / t));
} else if (y <= -7e-150) {
tmp = z * (y / (t * (a + 1.0)));
} else if (y <= 9e+92) {
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 <= (-2d+166)) then
tmp = z / b
else if (y <= (-1.02d+15)) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (y <= (-0.011d0)) then
tmp = z / b
else if (y <= (-6.6d-100)) then
tmp = x / (1.0d0 + ((y * b) / t))
else if (y <= (-7d-150)) then
tmp = z * (y / (t * (a + 1.0d0)))
else if (y <= 9d+92) 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 <= -2e+166) {
tmp = z / b;
} else if (y <= -1.02e+15) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= -0.011) {
tmp = z / b;
} else if (y <= -6.6e-100) {
tmp = x / (1.0 + ((y * b) / t));
} else if (y <= -7e-150) {
tmp = z * (y / (t * (a + 1.0)));
} else if (y <= 9e+92) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2e+166: tmp = z / b elif y <= -1.02e+15: tmp = (y / t) * (z / (a + 1.0)) elif y <= -0.011: tmp = z / b elif y <= -6.6e-100: tmp = x / (1.0 + ((y * b) / t)) elif y <= -7e-150: tmp = z * (y / (t * (a + 1.0))) elif y <= 9e+92: tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2e+166) tmp = Float64(z / b); elseif (y <= -1.02e+15) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (y <= -0.011) tmp = Float64(z / b); elseif (y <= -6.6e-100) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); elseif (y <= -7e-150) tmp = Float64(z * Float64(y / Float64(t * Float64(a + 1.0)))); elseif (y <= 9e+92) 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 <= -2e+166) tmp = z / b; elseif (y <= -1.02e+15) tmp = (y / t) * (z / (a + 1.0)); elseif (y <= -0.011) tmp = z / b; elseif (y <= -6.6e-100) tmp = x / (1.0 + ((y * b) / t)); elseif (y <= -7e-150) tmp = z * (y / (t * (a + 1.0))); elseif (y <= 9e+92) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2e+166], N[(z / b), $MachinePrecision], If[LessEqual[y, -1.02e+15], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -0.011], N[(z / b), $MachinePrecision], If[LessEqual[y, -6.6e-100], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7e-150], N[(z * N[(y / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+92], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+166}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -1.02 \cdot 10^{+15}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq -0.011:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -6.6 \cdot 10^{-100}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;y \leq -7 \cdot 10^{-150}:\\
\;\;\;\;z \cdot \frac{y}{t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+92}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -1.99999999999999988e166 or -1.02e15 < y < -0.010999999999999999 or 8.9999999999999998e92 < y Initial program 41.1%
*-commutative41.1%
associate-*l/45.4%
*-commutative45.4%
associate-*l/56.6%
Simplified56.6%
Taylor expanded in t around 0 65.5%
if -1.99999999999999988e166 < y < -1.02e15Initial program 67.8%
*-commutative67.8%
associate-*l/70.0%
*-commutative70.0%
associate-*l/82.7%
Simplified82.7%
Taylor expanded in x around 0 43.1%
Taylor expanded in y around 0 32.5%
times-frac41.8%
Simplified41.8%
if -0.010999999999999999 < y < -6.59999999999999993e-100Initial program 99.8%
*-commutative99.8%
associate-*l/93.9%
*-commutative93.9%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in x around inf 69.7%
associate-+r+69.7%
associate-*l/69.7%
*-commutative69.7%
Simplified69.7%
Taylor expanded in a around 0 51.2%
if -6.59999999999999993e-100 < y < -6.9999999999999996e-150Initial program 87.8%
*-commutative87.8%
associate-*l/76.0%
*-commutative76.0%
associate-*l/76.0%
Simplified76.0%
Taylor expanded in x around 0 75.3%
Taylor expanded in y around 0 75.3%
associate-/l*63.8%
associate-/r/75.1%
Applied egg-rr75.1%
if -6.9999999999999996e-150 < y < 8.9999999999999998e92Initial program 91.3%
*-commutative91.3%
associate-*l/90.0%
*-commutative90.0%
associate-*l/85.0%
Simplified85.0%
Taylor expanded in t around inf 61.0%
Final simplification60.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2e+166)
(/ z b)
(if (<= y -1.1e+14)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= y -0.2)
(/ z b)
(if (<= y -6e-102)
(/ x (+ 1.0 (/ (* y b) t)))
(if (<= y -6e-150)
(/ (* y z) (* t (+ a 1.0)))
(if (<= y 9e+92) (/ x (+ a 1.0)) (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2e+166) {
tmp = z / b;
} else if (y <= -1.1e+14) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= -0.2) {
tmp = z / b;
} else if (y <= -6e-102) {
tmp = x / (1.0 + ((y * b) / t));
} else if (y <= -6e-150) {
tmp = (y * z) / (t * (a + 1.0));
} else if (y <= 9e+92) {
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 <= (-2d+166)) then
tmp = z / b
else if (y <= (-1.1d+14)) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (y <= (-0.2d0)) then
tmp = z / b
else if (y <= (-6d-102)) then
tmp = x / (1.0d0 + ((y * b) / t))
else if (y <= (-6d-150)) then
tmp = (y * z) / (t * (a + 1.0d0))
else if (y <= 9d+92) 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 <= -2e+166) {
tmp = z / b;
} else if (y <= -1.1e+14) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= -0.2) {
tmp = z / b;
} else if (y <= -6e-102) {
tmp = x / (1.0 + ((y * b) / t));
} else if (y <= -6e-150) {
tmp = (y * z) / (t * (a + 1.0));
} else if (y <= 9e+92) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2e+166: tmp = z / b elif y <= -1.1e+14: tmp = (y / t) * (z / (a + 1.0)) elif y <= -0.2: tmp = z / b elif y <= -6e-102: tmp = x / (1.0 + ((y * b) / t)) elif y <= -6e-150: tmp = (y * z) / (t * (a + 1.0)) elif y <= 9e+92: tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2e+166) tmp = Float64(z / b); elseif (y <= -1.1e+14) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (y <= -0.2) tmp = Float64(z / b); elseif (y <= -6e-102) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); elseif (y <= -6e-150) tmp = Float64(Float64(y * z) / Float64(t * Float64(a + 1.0))); elseif (y <= 9e+92) 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 <= -2e+166) tmp = z / b; elseif (y <= -1.1e+14) tmp = (y / t) * (z / (a + 1.0)); elseif (y <= -0.2) tmp = z / b; elseif (y <= -6e-102) tmp = x / (1.0 + ((y * b) / t)); elseif (y <= -6e-150) tmp = (y * z) / (t * (a + 1.0)); elseif (y <= 9e+92) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2e+166], N[(z / b), $MachinePrecision], If[LessEqual[y, -1.1e+14], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -0.2], N[(z / b), $MachinePrecision], If[LessEqual[y, -6e-102], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -6e-150], N[(N[(y * z), $MachinePrecision] / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+92], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+166}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -1.1 \cdot 10^{+14}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq -0.2:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -6 \cdot 10^{-102}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;y \leq -6 \cdot 10^{-150}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+92}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -1.99999999999999988e166 or -1.1e14 < y < -0.20000000000000001 or 8.9999999999999998e92 < y Initial program 41.1%
*-commutative41.1%
associate-*l/45.4%
*-commutative45.4%
associate-*l/56.6%
Simplified56.6%
Taylor expanded in t around 0 65.5%
if -1.99999999999999988e166 < y < -1.1e14Initial program 67.8%
*-commutative67.8%
associate-*l/70.0%
*-commutative70.0%
associate-*l/82.7%
Simplified82.7%
Taylor expanded in x around 0 43.1%
Taylor expanded in y around 0 32.5%
times-frac41.8%
Simplified41.8%
if -0.20000000000000001 < y < -6e-102Initial program 99.8%
*-commutative99.8%
associate-*l/93.9%
*-commutative93.9%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in x around inf 69.7%
associate-+r+69.7%
associate-*l/69.7%
*-commutative69.7%
Simplified69.7%
Taylor expanded in a around 0 51.2%
if -6e-102 < y < -6.0000000000000003e-150Initial program 87.8%
*-commutative87.8%
associate-*l/76.0%
*-commutative76.0%
associate-*l/76.0%
Simplified76.0%
Taylor expanded in x around 0 75.3%
Taylor expanded in y around 0 75.3%
if -6.0000000000000003e-150 < y < 8.9999999999999998e92Initial program 91.3%
*-commutative91.3%
associate-*l/90.0%
*-commutative90.0%
associate-*l/85.0%
Simplified85.0%
Taylor expanded in t around inf 61.0%
Final simplification60.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2e+166)
(/ z b)
(if (<= y -2.8e+97)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= y -0.0035)
(/ (* y z) (+ t (* y b)))
(if (<= y -7.6e-98)
(/ x (+ 1.0 (/ (* y b) t)))
(if (<= y -7e-150)
(/ (* y z) (* t (+ a 1.0)))
(if (<= y 1.3e+93) (/ x (+ a 1.0)) (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2e+166) {
tmp = z / b;
} else if (y <= -2.8e+97) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= -0.0035) {
tmp = (y * z) / (t + (y * b));
} else if (y <= -7.6e-98) {
tmp = x / (1.0 + ((y * b) / t));
} else if (y <= -7e-150) {
tmp = (y * z) / (t * (a + 1.0));
} else if (y <= 1.3e+93) {
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 <= (-2d+166)) then
tmp = z / b
else if (y <= (-2.8d+97)) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (y <= (-0.0035d0)) then
tmp = (y * z) / (t + (y * b))
else if (y <= (-7.6d-98)) then
tmp = x / (1.0d0 + ((y * b) / t))
else if (y <= (-7d-150)) then
tmp = (y * z) / (t * (a + 1.0d0))
else if (y <= 1.3d+93) 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 <= -2e+166) {
tmp = z / b;
} else if (y <= -2.8e+97) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= -0.0035) {
tmp = (y * z) / (t + (y * b));
} else if (y <= -7.6e-98) {
tmp = x / (1.0 + ((y * b) / t));
} else if (y <= -7e-150) {
tmp = (y * z) / (t * (a + 1.0));
} else if (y <= 1.3e+93) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2e+166: tmp = z / b elif y <= -2.8e+97: tmp = (y / t) * (z / (a + 1.0)) elif y <= -0.0035: tmp = (y * z) / (t + (y * b)) elif y <= -7.6e-98: tmp = x / (1.0 + ((y * b) / t)) elif y <= -7e-150: tmp = (y * z) / (t * (a + 1.0)) elif y <= 1.3e+93: tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2e+166) tmp = Float64(z / b); elseif (y <= -2.8e+97) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (y <= -0.0035) tmp = Float64(Float64(y * z) / Float64(t + Float64(y * b))); elseif (y <= -7.6e-98) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); elseif (y <= -7e-150) tmp = Float64(Float64(y * z) / Float64(t * Float64(a + 1.0))); elseif (y <= 1.3e+93) 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 <= -2e+166) tmp = z / b; elseif (y <= -2.8e+97) tmp = (y / t) * (z / (a + 1.0)); elseif (y <= -0.0035) tmp = (y * z) / (t + (y * b)); elseif (y <= -7.6e-98) tmp = x / (1.0 + ((y * b) / t)); elseif (y <= -7e-150) tmp = (y * z) / (t * (a + 1.0)); elseif (y <= 1.3e+93) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2e+166], N[(z / b), $MachinePrecision], If[LessEqual[y, -2.8e+97], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -0.0035], N[(N[(y * z), $MachinePrecision] / N[(t + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7.6e-98], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -7e-150], N[(N[(y * z), $MachinePrecision] / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e+93], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+166}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{+97}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq -0.0035:\\
\;\;\;\;\frac{y \cdot z}{t + y \cdot b}\\
\mathbf{elif}\;y \leq -7.6 \cdot 10^{-98}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{elif}\;y \leq -7 \cdot 10^{-150}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+93}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -1.99999999999999988e166 or 1.3e93 < y Initial program 39.7%
*-commutative39.7%
associate-*l/44.1%
*-commutative44.1%
associate-*l/55.5%
Simplified55.5%
Taylor expanded in t around 0 64.7%
if -1.99999999999999988e166 < y < -2.7999999999999999e97Initial program 65.9%
*-commutative65.9%
associate-*l/69.8%
*-commutative69.8%
associate-*l/81.1%
Simplified81.1%
Taylor expanded in x around 0 38.1%
Taylor expanded in y around 0 32.2%
times-frac43.1%
Simplified43.1%
if -2.7999999999999999e97 < y < -0.00350000000000000007Initial program 74.1%
*-commutative74.1%
associate-*l/74.3%
*-commutative74.3%
associate-*l/86.8%
Simplified86.8%
Taylor expanded in x around 0 56.4%
Taylor expanded in t around 0 62.3%
Taylor expanded in a around 0 48.5%
if -0.00350000000000000007 < y < -7.6000000000000006e-98Initial program 99.8%
*-commutative99.8%
associate-*l/93.9%
*-commutative93.9%
associate-*l/93.9%
Simplified93.9%
Taylor expanded in x around inf 69.7%
associate-+r+69.7%
associate-*l/69.7%
*-commutative69.7%
Simplified69.7%
Taylor expanded in a around 0 51.2%
if -7.6000000000000006e-98 < y < -6.9999999999999996e-150Initial program 87.8%
*-commutative87.8%
associate-*l/76.0%
*-commutative76.0%
associate-*l/76.0%
Simplified76.0%
Taylor expanded in x around 0 75.3%
Taylor expanded in y around 0 75.3%
if -6.9999999999999996e-150 < y < 1.3e93Initial program 91.3%
*-commutative91.3%
associate-*l/90.0%
*-commutative90.0%
associate-*l/85.0%
Simplified85.0%
Taylor expanded in t around inf 61.0%
Final simplification60.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2e+166)
(/ z b)
(if (<= y 9.6e-265)
(/ (+ x (/ (* y z) t)) (+ a 1.0))
(if (<= y 1.65e-91)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (<= y 1.05e+93)
(* (+ x (* y (/ z t))) (/ 1.0 (+ a 1.0)))
(/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2e+166) {
tmp = z / b;
} else if (y <= 9.6e-265) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (y <= 1.65e-91) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 1.05e+93) {
tmp = (x + (y * (z / t))) * (1.0 / (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 <= (-2d+166)) then
tmp = z / b
else if (y <= 9.6d-265) then
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
else if (y <= 1.65d-91) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if (y <= 1.05d+93) then
tmp = (x + (y * (z / t))) * (1.0d0 / (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 <= -2e+166) {
tmp = z / b;
} else if (y <= 9.6e-265) {
tmp = (x + ((y * z) / t)) / (a + 1.0);
} else if (y <= 1.65e-91) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 1.05e+93) {
tmp = (x + (y * (z / t))) * (1.0 / (a + 1.0));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2e+166: tmp = z / b elif y <= 9.6e-265: tmp = (x + ((y * z) / t)) / (a + 1.0) elif y <= 1.65e-91: tmp = x / (1.0 + (a + ((y * b) / t))) elif y <= 1.05e+93: tmp = (x + (y * (z / t))) * (1.0 / (a + 1.0)) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2e+166) tmp = Float64(z / b); elseif (y <= 9.6e-265) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); elseif (y <= 1.65e-91) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif (y <= 1.05e+93) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) * Float64(1.0 / 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 <= -2e+166) tmp = z / b; elseif (y <= 9.6e-265) tmp = (x + ((y * z) / t)) / (a + 1.0); elseif (y <= 1.65e-91) tmp = x / (1.0 + (a + ((y * b) / t))); elseif (y <= 1.05e+93) tmp = (x + (y * (z / t))) * (1.0 / (a + 1.0)); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2e+166], N[(z / b), $MachinePrecision], If[LessEqual[y, 9.6e-265], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e-91], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.05e+93], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+166}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{-265}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{elif}\;y \leq 1.65 \cdot 10^{-91}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{+93}:\\
\;\;\;\;\left(x + y \cdot \frac{z}{t}\right) \cdot \frac{1}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -1.99999999999999988e166 or 1.0499999999999999e93 < y Initial program 39.7%
*-commutative39.7%
associate-*l/44.1%
*-commutative44.1%
associate-*l/55.5%
Simplified55.5%
Taylor expanded in t around 0 64.7%
if -1.99999999999999988e166 < y < 9.5999999999999999e-265Initial program 87.9%
*-commutative87.9%
associate-*l/83.9%
*-commutative83.9%
associate-*l/85.8%
Simplified85.8%
Taylor expanded in b around 0 72.3%
if 9.5999999999999999e-265 < y < 1.65000000000000006e-91Initial program 93.5%
*-commutative93.5%
associate-*l/90.4%
*-commutative90.4%
associate-*l/80.7%
Simplified80.7%
Taylor expanded in x around inf 87.3%
if 1.65000000000000006e-91 < y < 1.0499999999999999e93Initial program 84.4%
*-commutative84.4%
associate-*l/89.0%
*-commutative89.0%
associate-*l/87.0%
Simplified87.0%
div-inv86.8%
+-commutative86.8%
fma-def86.8%
associate-*l/88.9%
*-commutative88.9%
associate-+l+88.9%
+-commutative88.9%
associate-/l*88.1%
associate-/r/88.8%
fma-def88.8%
Applied egg-rr88.8%
Taylor expanded in y around 0 67.9%
fma-udef67.9%
Applied egg-rr67.9%
Final simplification70.8%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2e+166)
(/ z b)
(if (<= y -2.7e+102)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= y -0.15)
(/ (* y z) (+ t (* y b)))
(if (<= y 2.2e+91) (/ x (+ 1.0 (+ a (/ (* y b) t)))) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2e+166) {
tmp = z / b;
} else if (y <= -2.7e+102) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= -0.15) {
tmp = (y * z) / (t + (y * b));
} else if (y <= 2.2e+91) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} 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 <= (-2d+166)) then
tmp = z / b
else if (y <= (-2.7d+102)) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (y <= (-0.15d0)) then
tmp = (y * z) / (t + (y * b))
else if (y <= 2.2d+91) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
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 <= -2e+166) {
tmp = z / b;
} else if (y <= -2.7e+102) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= -0.15) {
tmp = (y * z) / (t + (y * b));
} else if (y <= 2.2e+91) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2e+166: tmp = z / b elif y <= -2.7e+102: tmp = (y / t) * (z / (a + 1.0)) elif y <= -0.15: tmp = (y * z) / (t + (y * b)) elif y <= 2.2e+91: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2e+166) tmp = Float64(z / b); elseif (y <= -2.7e+102) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (y <= -0.15) tmp = Float64(Float64(y * z) / Float64(t + Float64(y * b))); elseif (y <= 2.2e+91) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2e+166) tmp = z / b; elseif (y <= -2.7e+102) tmp = (y / t) * (z / (a + 1.0)); elseif (y <= -0.15) tmp = (y * z) / (t + (y * b)); elseif (y <= 2.2e+91) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2e+166], N[(z / b), $MachinePrecision], If[LessEqual[y, -2.7e+102], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -0.15], N[(N[(y * z), $MachinePrecision] / N[(t + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.2e+91], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+166}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -2.7 \cdot 10^{+102}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq -0.15:\\
\;\;\;\;\frac{y \cdot z}{t + y \cdot b}\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{+91}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -1.99999999999999988e166 or 2.19999999999999999e91 < y Initial program 40.0%
*-commutative40.0%
associate-*l/44.2%
*-commutative44.2%
associate-*l/55.4%
Simplified55.4%
Taylor expanded in t around 0 64.3%
if -1.99999999999999988e166 < y < -2.7000000000000001e102Initial program 65.9%
*-commutative65.9%
associate-*l/69.8%
*-commutative69.8%
associate-*l/81.1%
Simplified81.1%
Taylor expanded in x around 0 38.1%
Taylor expanded in y around 0 32.2%
times-frac43.1%
Simplified43.1%
if -2.7000000000000001e102 < y < -0.149999999999999994Initial program 74.1%
*-commutative74.1%
associate-*l/74.3%
*-commutative74.3%
associate-*l/86.8%
Simplified86.8%
Taylor expanded in x around 0 56.4%
Taylor expanded in t around 0 62.3%
Taylor expanded in a around 0 48.5%
if -0.149999999999999994 < y < 2.19999999999999999e91Initial program 92.7%
*-commutative92.7%
associate-*l/90.2%
*-commutative90.2%
associate-*l/86.0%
Simplified86.0%
Taylor expanded in x around inf 70.2%
Final simplification65.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -3.1e+166)
(/ z b)
(if (<= y -6.2e+112)
(/ x (+ (+ a 1.0) (* y (/ b t))))
(if (<= y -0.0062)
(/ (* y z) (+ t (* y b)))
(if (<= y 6.4e+89) (/ x (+ 1.0 (+ a (/ (* y b) t)))) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -3.1e+166) {
tmp = z / b;
} else if (y <= -6.2e+112) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else if (y <= -0.0062) {
tmp = (y * z) / (t + (y * b));
} else if (y <= 6.4e+89) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} 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 <= (-3.1d+166)) then
tmp = z / b
else if (y <= (-6.2d+112)) then
tmp = x / ((a + 1.0d0) + (y * (b / t)))
else if (y <= (-0.0062d0)) then
tmp = (y * z) / (t + (y * b))
else if (y <= 6.4d+89) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
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 <= -3.1e+166) {
tmp = z / b;
} else if (y <= -6.2e+112) {
tmp = x / ((a + 1.0) + (y * (b / t)));
} else if (y <= -0.0062) {
tmp = (y * z) / (t + (y * b));
} else if (y <= 6.4e+89) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -3.1e+166: tmp = z / b elif y <= -6.2e+112: tmp = x / ((a + 1.0) + (y * (b / t))) elif y <= -0.0062: tmp = (y * z) / (t + (y * b)) elif y <= 6.4e+89: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -3.1e+166) tmp = Float64(z / b); elseif (y <= -6.2e+112) tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (y <= -0.0062) tmp = Float64(Float64(y * z) / Float64(t + Float64(y * b))); elseif (y <= 6.4e+89) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -3.1e+166) tmp = z / b; elseif (y <= -6.2e+112) tmp = x / ((a + 1.0) + (y * (b / t))); elseif (y <= -0.0062) tmp = (y * z) / (t + (y * b)); elseif (y <= 6.4e+89) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.1e+166], N[(z / b), $MachinePrecision], If[LessEqual[y, -6.2e+112], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -0.0062], N[(N[(y * z), $MachinePrecision] / N[(t + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.4e+89], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+166}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -6.2 \cdot 10^{+112}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;y \leq -0.0062:\\
\;\;\;\;\frac{y \cdot z}{t + y \cdot b}\\
\mathbf{elif}\;y \leq 6.4 \cdot 10^{+89}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -3.09999999999999983e166 or 6.39999999999999974e89 < y Initial program 40.0%
*-commutative40.0%
associate-*l/44.2%
*-commutative44.2%
associate-*l/55.4%
Simplified55.4%
Taylor expanded in t around 0 64.3%
if -3.09999999999999983e166 < y < -6.19999999999999965e112Initial program 67.7%
*-commutative67.7%
associate-*l/65.8%
*-commutative65.8%
associate-*l/78.6%
Simplified78.6%
Taylor expanded in x around inf 32.7%
associate-+r+32.7%
associate-*l/45.5%
*-commutative45.5%
Simplified45.5%
if -6.19999999999999965e112 < y < -0.00619999999999999978Initial program 71.5%
*-commutative71.5%
associate-*l/77.2%
*-commutative77.2%
associate-*l/88.3%
Simplified88.3%
Taylor expanded in x around 0 55.9%
Taylor expanded in t around 0 61.1%
Taylor expanded in a around 0 49.0%
if -0.00619999999999999978 < y < 6.39999999999999974e89Initial program 92.7%
*-commutative92.7%
associate-*l/90.2%
*-commutative90.2%
associate-*l/86.0%
Simplified86.0%
Taylor expanded in x around inf 70.2%
Final simplification65.4%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2e+166)
(/ z b)
(if (<= y -2.65e+107)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= y -0.18)
(/ (* y z) (+ (* y b) (* t a)))
(if (<= y 5e+90) (/ x (+ 1.0 (+ a (/ (* y b) t)))) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2e+166) {
tmp = z / b;
} else if (y <= -2.65e+107) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= -0.18) {
tmp = (y * z) / ((y * b) + (t * a));
} else if (y <= 5e+90) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} 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 <= (-2d+166)) then
tmp = z / b
else if (y <= (-2.65d+107)) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (y <= (-0.18d0)) then
tmp = (y * z) / ((y * b) + (t * a))
else if (y <= 5d+90) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
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 <= -2e+166) {
tmp = z / b;
} else if (y <= -2.65e+107) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= -0.18) {
tmp = (y * z) / ((y * b) + (t * a));
} else if (y <= 5e+90) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2e+166: tmp = z / b elif y <= -2.65e+107: tmp = (y / t) * (z / (a + 1.0)) elif y <= -0.18: tmp = (y * z) / ((y * b) + (t * a)) elif y <= 5e+90: tmp = x / (1.0 + (a + ((y * b) / t))) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2e+166) tmp = Float64(z / b); elseif (y <= -2.65e+107) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (y <= -0.18) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * a))); elseif (y <= 5e+90) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -2e+166) tmp = z / b; elseif (y <= -2.65e+107) tmp = (y / t) * (z / (a + 1.0)); elseif (y <= -0.18) tmp = (y * z) / ((y * b) + (t * a)); elseif (y <= 5e+90) tmp = x / (1.0 + (a + ((y * b) / t))); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2e+166], N[(z / b), $MachinePrecision], If[LessEqual[y, -2.65e+107], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -0.18], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+90], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{+166}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -2.65 \cdot 10^{+107}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq -0.18:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot a}\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+90}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -1.99999999999999988e166 or 5.0000000000000004e90 < y Initial program 40.0%
*-commutative40.0%
associate-*l/44.2%
*-commutative44.2%
associate-*l/55.4%
Simplified55.4%
Taylor expanded in t around 0 64.3%
if -1.99999999999999988e166 < y < -2.65e107Initial program 65.9%
*-commutative65.9%
associate-*l/69.8%
*-commutative69.8%
associate-*l/81.1%
Simplified81.1%
Taylor expanded in x around 0 38.1%
Taylor expanded in y around 0 32.2%
times-frac43.1%
Simplified43.1%
if -2.65e107 < y < -0.17999999999999999Initial program 74.1%
*-commutative74.1%
associate-*l/74.3%
*-commutative74.3%
associate-*l/86.8%
Simplified86.8%
Taylor expanded in x around 0 56.4%
Taylor expanded in t around 0 62.3%
Taylor expanded in a around inf 55.5%
if -0.17999999999999999 < y < 5.0000000000000004e90Initial program 92.7%
*-commutative92.7%
associate-*l/90.2%
*-commutative90.2%
associate-*l/86.0%
Simplified86.0%
Taylor expanded in x around inf 70.2%
Final simplification65.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ a 1.0))))
(if (<= y -4.1e+166)
(/ z b)
(if (<= y 1.52e-266)
t_1
(if (<= y 6.2e+75)
(/ x (+ 1.0 (+ a (/ (* y b) t))))
(if (<= y 1e+94) 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);
double tmp;
if (y <= -4.1e+166) {
tmp = z / b;
} else if (y <= 1.52e-266) {
tmp = t_1;
} else if (y <= 6.2e+75) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 1e+94) {
tmp = t_1;
} else {
tmp = z / b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + ((y * z) / t)) / (a + 1.0d0)
if (y <= (-4.1d+166)) then
tmp = z / b
else if (y <= 1.52d-266) then
tmp = t_1
else if (y <= 6.2d+75) then
tmp = x / (1.0d0 + (a + ((y * b) / t)))
else if (y <= 1d+94) then
tmp = t_1
else
tmp = z / b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (a + 1.0);
double tmp;
if (y <= -4.1e+166) {
tmp = z / b;
} else if (y <= 1.52e-266) {
tmp = t_1;
} else if (y <= 6.2e+75) {
tmp = x / (1.0 + (a + ((y * b) / t)));
} else if (y <= 1e+94) {
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) tmp = 0 if y <= -4.1e+166: tmp = z / b elif y <= 1.52e-266: tmp = t_1 elif y <= 6.2e+75: tmp = x / (1.0 + (a + ((y * b) / t))) elif y <= 1e+94: 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(a + 1.0)) tmp = 0.0 if (y <= -4.1e+166) tmp = Float64(z / b); elseif (y <= 1.52e-266) tmp = t_1; elseif (y <= 6.2e+75) tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))); elseif (y <= 1e+94) 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); tmp = 0.0; if (y <= -4.1e+166) tmp = z / b; elseif (y <= 1.52e-266) tmp = t_1; elseif (y <= 6.2e+75) tmp = x / (1.0 + (a + ((y * b) / t))); elseif (y <= 1e+94) 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[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.1e+166], N[(z / b), $MachinePrecision], If[LessEqual[y, 1.52e-266], t$95$1, If[LessEqual[y, 6.2e+75], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+94], t$95$1, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\mathbf{if}\;y \leq -4.1 \cdot 10^{+166}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 1.52 \cdot 10^{-266}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 6.2 \cdot 10^{+75}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{elif}\;y \leq 10^{+94}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -4.1000000000000003e166 or 1e94 < y Initial program 39.7%
*-commutative39.7%
associate-*l/44.1%
*-commutative44.1%
associate-*l/55.5%
Simplified55.5%
Taylor expanded in t around 0 64.7%
if -4.1000000000000003e166 < y < 1.52000000000000001e-266 or 6.2000000000000002e75 < y < 1e94Initial program 87.7%
*-commutative87.7%
associate-*l/84.0%
*-commutative84.0%
associate-*l/85.7%
Simplified85.7%
Taylor expanded in b around 0 73.2%
if 1.52000000000000001e-266 < y < 6.2000000000000002e75Initial program 88.3%
*-commutative88.3%
associate-*l/90.0%
*-commutative90.0%
associate-*l/84.3%
Simplified84.3%
Taylor expanded in x around inf 73.2%
Final simplification70.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.75e+231) (not (<= y 1.1e+109))) (/ z b) (/ (+ 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 <= -1.75e+231) || !(y <= 1.1e+109)) {
tmp = z / b;
} 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 <= (-1.75d+231)) .or. (.not. (y <= 1.1d+109))) then
tmp = z / b
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 <= -1.75e+231) || !(y <= 1.1e+109)) {
tmp = z / b;
} 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 <= -1.75e+231) or not (y <= 1.1e+109): tmp = z / b 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 <= -1.75e+231) || !(y <= 1.1e+109)) tmp = Float64(z / b); 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 <= -1.75e+231) || ~((y <= 1.1e+109))) tmp = z / b; 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[Or[LessEqual[y, -1.75e+231], N[Not[LessEqual[y, 1.1e+109]], $MachinePrecision]], N[(z / b), $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 -1.75 \cdot 10^{+231} \lor \neg \left(y \leq 1.1 \cdot 10^{+109}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\end{array}
\end{array}
if y < -1.7499999999999999e231 or 1.1e109 < y Initial program 37.0%
*-commutative37.0%
associate-*l/39.5%
*-commutative39.5%
associate-*l/48.5%
Simplified48.5%
Taylor expanded in t around 0 67.8%
if -1.7499999999999999e231 < y < 1.1e109Initial program 84.1%
*-commutative84.1%
associate-*l/83.7%
*-commutative83.7%
associate-*l/84.6%
Simplified84.6%
Final simplification80.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.1e+230) (not (<= y 1.1e+109))) (/ z b) (/ (+ x (/ y (/ t z))) (+ a (+ 1.0 (/ y (/ t b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.1e+230) || !(y <= 1.1e+109)) {
tmp = z / b;
} else {
tmp = (x + (y / (t / z))) / (a + (1.0 + (y / (t / b))));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-3.1d+230)) .or. (.not. (y <= 1.1d+109))) then
tmp = z / b
else
tmp = (x + (y / (t / z))) / (a + (1.0d0 + (y / (t / b))))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.1e+230) || !(y <= 1.1e+109)) {
tmp = z / b;
} else {
tmp = (x + (y / (t / z))) / (a + (1.0 + (y / (t / b))));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.1e+230) or not (y <= 1.1e+109): tmp = z / b else: tmp = (x + (y / (t / z))) / (a + (1.0 + (y / (t / b)))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.1e+230) || !(y <= 1.1e+109)) tmp = Float64(z / b); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b))))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.1e+230) || ~((y <= 1.1e+109))) tmp = z / b; else tmp = (x + (y / (t / z))) / (a + (1.0 + (y / (t / b)))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.1e+230], N[Not[LessEqual[y, 1.1e+109]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+230} \lor \neg \left(y \leq 1.1 \cdot 10^{+109}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\
\end{array}
\end{array}
if y < -3.09999999999999981e230 or 1.1e109 < y Initial program 37.0%
*-commutative37.0%
associate-*l/39.5%
*-commutative39.5%
associate-*l/48.5%
Simplified48.5%
Taylor expanded in t around 0 67.8%
if -3.09999999999999981e230 < y < 1.1e109Initial program 84.1%
associate-/l*84.2%
associate-+l+84.2%
associate-/l*85.8%
Simplified85.8%
Final simplification81.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.1e-8) (not (<= a 1.1e-10))) (* (+ x (* y (/ z t))) (/ 1.0 (+ a 1.0))) (/ (+ 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 <= -1.1e-8) || !(a <= 1.1e-10)) {
tmp = (x + (y * (z / t))) * (1.0 / (a + 1.0));
} 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 <= (-1.1d-8)) .or. (.not. (a <= 1.1d-10))) then
tmp = (x + (y * (z / t))) * (1.0d0 / (a + 1.0d0))
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 <= -1.1e-8) || !(a <= 1.1e-10)) {
tmp = (x + (y * (z / t))) * (1.0 / (a + 1.0));
} 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 <= -1.1e-8) or not (a <= 1.1e-10): tmp = (x + (y * (z / t))) * (1.0 / (a + 1.0)) 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 <= -1.1e-8) || !(a <= 1.1e-10)) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) * Float64(1.0 / Float64(a + 1.0))); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(1.0 + Float64(Float64(y * b) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.1e-8) || ~((a <= 1.1e-10))) tmp = (x + (y * (z / t))) * (1.0 / (a + 1.0)); 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, -1.1e-8], N[Not[LessEqual[a, 1.1e-10]], $MachinePrecision]], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.1 \cdot 10^{-8} \lor \neg \left(a \leq 1.1 \cdot 10^{-10}\right):\\
\;\;\;\;\left(x + y \cdot \frac{z}{t}\right) \cdot \frac{1}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{1 + \frac{y \cdot b}{t}}\\
\end{array}
\end{array}
if a < -1.0999999999999999e-8 or 1.09999999999999995e-10 < a Initial program 72.0%
*-commutative72.0%
associate-*l/73.2%
*-commutative73.2%
associate-*l/78.3%
Simplified78.3%
div-inv78.2%
+-commutative78.2%
fma-def78.2%
associate-*l/73.0%
*-commutative73.0%
associate-+l+73.0%
+-commutative73.0%
associate-/l*78.1%
associate-/r/75.8%
fma-def75.8%
Applied egg-rr75.8%
Taylor expanded in y around 0 64.9%
fma-udef64.9%
Applied egg-rr64.9%
if -1.0999999999999999e-8 < a < 1.09999999999999995e-10Initial program 72.6%
*-commutative72.6%
associate-*l/72.1%
*-commutative72.1%
associate-*l/72.8%
Simplified72.8%
Taylor expanded in a around 0 72.6%
Final simplification68.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= (+ a 1.0) -1e+19) (not (<= (+ a 1.0) 1.00002))) (/ (+ x (/ y (/ t z))) a) (/ x (+ 1.0 (/ (* y b) t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((a + 1.0) <= -1e+19) || !((a + 1.0) <= 1.00002)) {
tmp = (x + (y / (t / z))) / a;
} else {
tmp = x / (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 + 1.0d0) <= (-1d+19)) .or. (.not. ((a + 1.0d0) <= 1.00002d0))) then
tmp = (x + (y / (t / z))) / a
else
tmp = x / (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 + 1.0) <= -1e+19) || !((a + 1.0) <= 1.00002)) {
tmp = (x + (y / (t / z))) / a;
} else {
tmp = x / (1.0 + ((y * b) / t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if ((a + 1.0) <= -1e+19) or not ((a + 1.0) <= 1.00002): tmp = (x + (y / (t / z))) / a else: tmp = x / (1.0 + ((y * b) / t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((Float64(a + 1.0) <= -1e+19) || !(Float64(a + 1.0) <= 1.00002)) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / a); else tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (((a + 1.0) <= -1e+19) || ~(((a + 1.0) <= 1.00002))) tmp = (x + (y / (t / z))) / a; else tmp = x / (1.0 + ((y * b) / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[N[(a + 1.0), $MachinePrecision], -1e+19], N[Not[LessEqual[N[(a + 1.0), $MachinePrecision], 1.00002]], $MachinePrecision]], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a + 1 \leq -1 \cdot 10^{+19} \lor \neg \left(a + 1 \leq 1.00002\right):\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\end{array}
\end{array}
if (+.f64 a 1) < -1e19 or 1.00001999999999991 < (+.f64 a 1) Initial program 72.6%
*-commutative72.6%
associate-*l/73.0%
*-commutative73.0%
associate-*l/78.5%
Simplified78.5%
div-inv78.3%
+-commutative78.3%
fma-def78.3%
associate-*l/72.9%
*-commutative72.9%
associate-+l+72.9%
+-commutative72.9%
associate-/l*78.3%
associate-/r/75.8%
fma-def75.8%
Applied egg-rr75.8%
Taylor expanded in y around 0 65.0%
Taylor expanded in a around inf 64.0%
associate-/l*64.6%
Simplified64.6%
if -1e19 < (+.f64 a 1) < 1.00001999999999991Initial program 72.1%
*-commutative72.1%
associate-*l/72.3%
*-commutative72.3%
associate-*l/72.9%
Simplified72.9%
Taylor expanded in x around inf 54.8%
associate-+r+54.8%
associate-*l/52.7%
*-commutative52.7%
Simplified52.7%
Taylor expanded in a around 0 53.9%
Final simplification59.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= (+ a 1.0) -1e+19)
(/ (+ x (/ y (/ t z))) a)
(if (<= (+ a 1.0) 2000000000000.0)
(/ x (+ 1.0 (/ (* y b) t)))
(/ (+ x (/ (* y z) t)) a))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a + 1.0) <= -1e+19) {
tmp = (x + (y / (t / z))) / a;
} else if ((a + 1.0) <= 2000000000000.0) {
tmp = x / (1.0 + ((y * b) / t));
} else {
tmp = (x + ((y * z) / t)) / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a + 1.0d0) <= (-1d+19)) then
tmp = (x + (y / (t / z))) / a
else if ((a + 1.0d0) <= 2000000000000.0d0) then
tmp = x / (1.0d0 + ((y * b) / t))
else
tmp = (x + ((y * z) / t)) / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a + 1.0) <= -1e+19) {
tmp = (x + (y / (t / z))) / a;
} else if ((a + 1.0) <= 2000000000000.0) {
tmp = x / (1.0 + ((y * b) / t));
} else {
tmp = (x + ((y * z) / t)) / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a + 1.0) <= -1e+19: tmp = (x + (y / (t / z))) / a elif (a + 1.0) <= 2000000000000.0: tmp = x / (1.0 + ((y * b) / t)) else: tmp = (x + ((y * z) / t)) / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(a + 1.0) <= -1e+19) tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / a); elseif (Float64(a + 1.0) <= 2000000000000.0) tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t))); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a + 1.0) <= -1e+19) tmp = (x + (y / (t / z))) / a; elseif ((a + 1.0) <= 2000000000000.0) tmp = x / (1.0 + ((y * b) / t)); else tmp = (x + ((y * z) / t)) / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(a + 1.0), $MachinePrecision], -1e+19], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], 2000000000000.0], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a + 1 \leq -1 \cdot 10^{+19}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\
\mathbf{elif}\;a + 1 \leq 2000000000000:\\
\;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\
\end{array}
\end{array}
if (+.f64 a 1) < -1e19Initial program 73.2%
*-commutative73.2%
associate-*l/73.3%
*-commutative73.3%
associate-*l/81.7%
Simplified81.7%
div-inv81.4%
+-commutative81.4%
fma-def81.4%
associate-*l/73.1%
*-commutative73.1%
associate-+l+73.1%
+-commutative73.1%
associate-/l*81.4%
associate-/r/75.6%
fma-def75.6%
Applied egg-rr75.6%
Taylor expanded in y around 0 66.1%
Taylor expanded in a around inf 64.8%
associate-/l*66.3%
Simplified66.3%
if -1e19 < (+.f64 a 1) < 2e12Initial program 70.6%
*-commutative70.6%
associate-*l/71.5%
*-commutative71.5%
associate-*l/72.8%
Simplified72.8%
Taylor expanded in x around inf 53.7%
associate-+r+53.7%
associate-*l/52.3%
*-commutative52.3%
Simplified52.3%
Taylor expanded in a around 0 52.8%
if 2e12 < (+.f64 a 1) Initial program 76.0%
*-commutative76.0%
associate-*l/75.0%
*-commutative75.0%
associate-*l/75.0%
Simplified75.0%
Taylor expanded in a around inf 66.5%
Final simplification59.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -2.05e+166)
(/ z b)
(if (<= y -2e-150)
(* (/ y t) (/ z (+ a 1.0)))
(if (<= y 9e+92) (/ x (+ a 1.0)) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -2.05e+166) {
tmp = z / b;
} else if (y <= -2e-150) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 9e+92) {
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 <= (-2.05d+166)) then
tmp = z / b
else if (y <= (-2d-150)) then
tmp = (y / t) * (z / (a + 1.0d0))
else if (y <= 9d+92) 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 <= -2.05e+166) {
tmp = z / b;
} else if (y <= -2e-150) {
tmp = (y / t) * (z / (a + 1.0));
} else if (y <= 9e+92) {
tmp = x / (a + 1.0);
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -2.05e+166: tmp = z / b elif y <= -2e-150: tmp = (y / t) * (z / (a + 1.0)) elif y <= 9e+92: tmp = x / (a + 1.0) else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -2.05e+166) tmp = Float64(z / b); elseif (y <= -2e-150) tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))); elseif (y <= 9e+92) 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 <= -2.05e+166) tmp = z / b; elseif (y <= -2e-150) tmp = (y / t) * (z / (a + 1.0)); elseif (y <= 9e+92) tmp = x / (a + 1.0); else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -2.05e+166], N[(z / b), $MachinePrecision], If[LessEqual[y, -2e-150], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9e+92], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.05 \cdot 10^{+166}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-150}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\
\mathbf{elif}\;y \leq 9 \cdot 10^{+92}:\\
\;\;\;\;\frac{x}{a + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -2.0500000000000001e166 or 8.9999999999999998e92 < y Initial program 39.7%
*-commutative39.7%
associate-*l/44.1%
*-commutative44.1%
associate-*l/55.5%
Simplified55.5%
Taylor expanded in t around 0 64.7%
if -2.0500000000000001e166 < y < -2.00000000000000001e-150Initial program 80.9%
*-commutative80.9%
associate-*l/78.8%
*-commutative78.8%
associate-*l/85.6%
Simplified85.6%
Taylor expanded in x around 0 48.7%
Taylor expanded in y around 0 37.8%
times-frac41.1%
Simplified41.1%
if -2.00000000000000001e-150 < y < 8.9999999999999998e92Initial program 91.3%
*-commutative91.3%
associate-*l/90.0%
*-commutative90.0%
associate-*l/85.0%
Simplified85.0%
Taylor expanded in t around inf 61.0%
Final simplification57.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -2.7e-62) (not (<= y 9e+92))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -2.7e-62) || !(y <= 9e+92)) {
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 <= (-2.7d-62)) .or. (.not. (y <= 9d+92))) 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 <= -2.7e-62) || !(y <= 9e+92)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -2.7e-62) or not (y <= 9e+92): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -2.7e-62) || !(y <= 9e+92)) 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 <= -2.7e-62) || ~((y <= 9e+92))) 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, -2.7e-62], N[Not[LessEqual[y, 9e+92]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-62} \lor \neg \left(y \leq 9 \cdot 10^{+92}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -2.70000000000000019e-62 or 8.9999999999999998e92 < y Initial program 51.8%
*-commutative51.8%
associate-*l/54.6%
*-commutative54.6%
associate-*l/65.3%
Simplified65.3%
Taylor expanded in t around 0 53.0%
if -2.70000000000000019e-62 < y < 8.9999999999999998e92Initial program 91.5%
*-commutative91.5%
associate-*l/89.7%
*-commutative89.7%
associate-*l/85.3%
Simplified85.3%
Taylor expanded in t around inf 58.4%
Final simplification55.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.2e-65) (not (<= y 1.12e+83))) (/ z b) (/ x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.2e-65) || !(y <= 1.12e+83)) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-3.2d-65)) .or. (.not. (y <= 1.12d+83))) then
tmp = z / b
else
tmp = x / a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.2e-65) || !(y <= 1.12e+83)) {
tmp = z / b;
} else {
tmp = x / a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.2e-65) or not (y <= 1.12e+83): tmp = z / b else: tmp = x / a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.2e-65) || !(y <= 1.12e+83)) tmp = Float64(z / b); else tmp = Float64(x / a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.2e-65) || ~((y <= 1.12e+83))) tmp = z / b; else tmp = x / a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.2e-65], N[Not[LessEqual[y, 1.12e+83]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{-65} \lor \neg \left(y \leq 1.12 \cdot 10^{+83}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a}\\
\end{array}
\end{array}
if y < -3.1999999999999999e-65 or 1.12e83 < y Initial program 52.6%
*-commutative52.6%
associate-*l/55.2%
*-commutative55.2%
associate-*l/65.6%
Simplified65.6%
Taylor expanded in t around 0 52.2%
if -3.1999999999999999e-65 < y < 1.12e83Initial program 92.1%
*-commutative92.1%
associate-*l/90.1%
*-commutative90.1%
associate-*l/85.6%
Simplified85.6%
Taylor expanded in x around inf 71.4%
associate-+r+71.4%
associate-*l/66.9%
*-commutative66.9%
Simplified66.9%
Taylor expanded in a around inf 32.1%
Final simplification42.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 72.3%
*-commutative72.3%
associate-*l/72.6%
*-commutative72.6%
associate-*l/75.6%
Simplified75.6%
Taylor expanded in x around inf 49.2%
associate-+r+49.2%
associate-*l/49.9%
*-commutative49.9%
Simplified49.9%
Taylor expanded in a around inf 21.5%
Final simplification21.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(if (< t -1.3659085366310088e-271)
t_1
(if (< t 3.036967103737246e-130) (/ z b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 1.0d0 * ((x + ((y / t) * z)) * (1.0d0 / ((a + 1.0d0) + ((y / t) * b))))
if (t < (-1.3659085366310088d-271)) then
tmp = t_1
else if (t < 3.036967103737246d-130) then
tmp = z / b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
double tmp;
if (t < -1.3659085366310088e-271) {
tmp = t_1;
} else if (t < 3.036967103737246e-130) {
tmp = z / b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))) tmp = 0 if t < -1.3659085366310088e-271: tmp = t_1 elif t < 3.036967103737246e-130: tmp = z / b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 * Float64(Float64(x + Float64(Float64(y / t) * z)) * Float64(1.0 / Float64(Float64(a + 1.0) + Float64(Float64(y / t) * b))))) tmp = 0.0 if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = Float64(z / b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b)))); tmp = 0.0; if (t < -1.3659085366310088e-271) tmp = t_1; elseif (t < 3.036967103737246e-130) tmp = z / b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 * N[(N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.3659085366310088e-271], t$95$1, If[Less[t, 3.036967103737246e-130], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := 1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\
\mathbf{if}\;t < -1.3659085366310088 \cdot 10^{-271}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
herbie shell --seed 2024026
(FPCore (x y z t a b)
:name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
:precision binary64
:herbie-target
(if (< t -1.3659085366310088e-271) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))