
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 15 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b): return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b) return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) end
function tmp = code(x, y, z, t, a, b) tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t)); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ (* y b) t) (+ a 1.0))) (t_2 (/ (+ x (/ (* y z) t)) t_1)))
(if (<= t_2 (- INFINITY))
(* z (+ (/ x (* z t_1)) (/ y (+ (* y b) (* t (+ a 1.0))))))
(if (<= t_2 2e+280) t_2 (+ (/ z b) (* (/ t b) (/ x y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = z * ((x / (z * t_1)) + (y / ((y * b) + (t * (a + 1.0)))));
} else if (t_2 <= 2e+280) {
tmp = t_2;
} else {
tmp = (z / b) + ((t / b) * (x / y));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((y * b) / t) + (a + 1.0);
double t_2 = (x + ((y * z) / t)) / t_1;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = z * ((x / (z * t_1)) + (y / ((y * b) + (t * (a + 1.0)))));
} else if (t_2 <= 2e+280) {
tmp = t_2;
} else {
tmp = (z / b) + ((t / b) * (x / y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((y * b) / t) + (a + 1.0) t_2 = (x + ((y * z) / t)) / t_1 tmp = 0 if t_2 <= -math.inf: tmp = z * ((x / (z * t_1)) + (y / ((y * b) + (t * (a + 1.0))))) elif t_2 <= 2e+280: tmp = t_2 else: tmp = (z / b) + ((t / b) * (x / y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)) t_2 = Float64(Float64(x + Float64(Float64(y * z) / t)) / t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(x / Float64(z * t_1)) + Float64(y / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))))); elseif (t_2 <= 2e+280) tmp = t_2; else tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((y * b) / t) + (a + 1.0); t_2 = (x + ((y * z) / t)) / t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = z * ((x / (z * t_1)) + (y / ((y * b) + (t * (a + 1.0))))); elseif (t_2 <= 2e+280) tmp = t_2; else tmp = (z / b) + ((t / b) * (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(z * N[(N[(x / N[(z * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+280], t$95$2, N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{y \cdot b}{t} + \left(a + 1\right)\\
t_2 := \frac{x + \frac{y \cdot z}{t}}{t\_1}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_1} + \frac{y}{y \cdot b + t \cdot \left(a + 1\right)}\right)\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+280}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 43.7%
associate-/l*50.1%
associate-/l*49.9%
Simplified49.9%
Taylor expanded in z around inf 99.4%
associate-+r+99.4%
*-commutative99.4%
associate-+r+99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in t around 0 99.6%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e280Initial program 93.6%
if 2.0000000000000001e280 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 5.1%
associate-/l*11.2%
associate-/l*24.5%
Simplified24.5%
Taylor expanded in b around inf 6.0%
associate-/l*6.0%
+-commutative6.0%
associate-*r/8.4%
fma-undefine8.4%
*-commutative8.4%
Simplified8.4%
Taylor expanded in t around 0 86.5%
times-frac90.3%
Simplified90.3%
Final simplification93.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_1 (- INFINITY))
(* z (+ (/ y (+ (* y b) (* t (+ a 1.0)))) (/ x (* z a))))
(if (<= t_1 2e+280) t_1 (+ (/ z b) (* (/ t b) (/ x y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = z * ((y / ((y * b) + (t * (a + 1.0)))) + (x / (z * a)));
} else if (t_1 <= 2e+280) {
tmp = t_1;
} else {
tmp = (z / b) + ((t / b) * (x / y));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = z * ((y / ((y * b) + (t * (a + 1.0)))) + (x / (z * a)));
} else if (t_1 <= 2e+280) {
tmp = t_1;
} else {
tmp = (z / b) + ((t / b) * (x / y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) tmp = 0 if t_1 <= -math.inf: tmp = z * ((y / ((y * b) + (t * (a + 1.0)))) + (x / (z * a))) elif t_1 <= 2e+280: tmp = t_1 else: tmp = (z / b) + ((t / b) * (x / y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(z * Float64(Float64(y / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))) + Float64(x / Float64(z * a)))); elseif (t_1 <= 2e+280) tmp = t_1; else tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)); tmp = 0.0; if (t_1 <= -Inf) tmp = z * ((y / ((y * b) + (t * (a + 1.0)))) + (x / (z * a))); elseif (t_1 <= 2e+280) tmp = t_1; else tmp = (z / b) + ((t / b) * (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z * N[(N[(y / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+280], t$95$1, N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{y}{y \cdot b + t \cdot \left(a + 1\right)} + \frac{x}{z \cdot a}\right)\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+280}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 43.7%
associate-/l*50.1%
associate-/l*49.9%
Simplified49.9%
Taylor expanded in z around inf 99.4%
associate-+r+99.4%
*-commutative99.4%
associate-+r+99.4%
*-commutative99.4%
Simplified99.4%
Taylor expanded in t around 0 99.6%
Taylor expanded in a around inf 76.5%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e280Initial program 93.6%
if 2.0000000000000001e280 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 5.1%
associate-/l*11.2%
associate-/l*24.5%
Simplified24.5%
Taylor expanded in b around inf 6.0%
associate-/l*6.0%
+-commutative6.0%
associate-*r/8.4%
fma-undefine8.4%
*-commutative8.4%
Simplified8.4%
Taylor expanded in t around 0 86.5%
times-frac90.3%
Simplified90.3%
Final simplification91.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0)))))
(if (<= t_1 (- INFINITY))
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(if (<= t_1 2e+280) t_1 (+ (/ z b) (* (/ t b) (/ x y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -((double) INFINITY)) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t_1 <= 2e+280) {
tmp = t_1;
} else {
tmp = (z / b) + ((t / b) * (x / y));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
double tmp;
if (t_1 <= -Double.POSITIVE_INFINITY) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else if (t_1 <= 2e+280) {
tmp = t_1;
} else {
tmp = (z / b) + ((t / b) * (x / y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)) tmp = 0 if t_1 <= -math.inf: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) elif t_1 <= 2e+280: tmp = t_1 else: tmp = (z / b) + ((t / b) * (x / y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))) tmp = 0.0 if (t_1 <= Float64(-Inf)) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); elseif (t_1 <= 2e+280) tmp = t_1; else tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0)); tmp = 0.0; if (t_1 <= -Inf) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); elseif (t_1 <= 2e+280) tmp = t_1; else tmp = (z / b) + ((t / b) * (x / y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+280], t$95$1, N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+280}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0Initial program 43.7%
associate-/l*50.1%
associate-/l*49.9%
Simplified49.9%
Taylor expanded in x around 0 75.2%
Taylor expanded in t around 0 75.2%
if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e280Initial program 93.6%
if 2.0000000000000001e280 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) Initial program 5.1%
associate-/l*11.2%
associate-/l*24.5%
Simplified24.5%
Taylor expanded in b around inf 6.0%
associate-/l*6.0%
+-commutative6.0%
associate-*r/8.4%
fma-undefine8.4%
*-commutative8.4%
Simplified8.4%
Taylor expanded in t around 0 86.5%
times-frac90.3%
Simplified90.3%
Final simplification91.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (* (/ t b) (/ x y)))))
(if (<= y -6.2e+100)
t_1
(if (<= y -4.6e+49)
(/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))
(if (<= y -4.2e+41)
(/ z b)
(if (<= y 1e+112)
(/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (* b (/ y t))))
t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t / b) * (x / y));
double tmp;
if (y <= -6.2e+100) {
tmp = t_1;
} else if (y <= -4.6e+49) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else if (y <= -4.2e+41) {
tmp = z / b;
} else if (y <= 1e+112) {
tmp = (x + ((y * z) / t)) / ((a + 1.0) + (b * (y / t)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z / b) + ((t / b) * (x / y))
if (y <= (-6.2d+100)) then
tmp = t_1
else if (y <= (-4.6d+49)) then
tmp = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
else if (y <= (-4.2d+41)) then
tmp = z / b
else if (y <= 1d+112) then
tmp = (x + ((y * z) / t)) / ((a + 1.0d0) + (b * (y / t)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t / b) * (x / y));
double tmp;
if (y <= -6.2e+100) {
tmp = t_1;
} else if (y <= -4.6e+49) {
tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
} else if (y <= -4.2e+41) {
tmp = z / b;
} else if (y <= 1e+112) {
tmp = (x + ((y * z) / t)) / ((a + 1.0) + (b * (y / t)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((t / b) * (x / y)) tmp = 0 if y <= -6.2e+100: tmp = t_1 elif y <= -4.6e+49: tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) elif y <= -4.2e+41: tmp = z / b elif y <= 1e+112: tmp = (x + ((y * z) / t)) / ((a + 1.0) + (b * (y / t))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))) tmp = 0.0 if (y <= -6.2e+100) tmp = t_1; elseif (y <= -4.6e+49) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))); elseif (y <= -4.2e+41) tmp = Float64(z / b); elseif (y <= 1e+112) tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z / b) + ((t / b) * (x / y)); tmp = 0.0; if (y <= -6.2e+100) tmp = t_1; elseif (y <= -4.6e+49) tmp = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); elseif (y <= -4.2e+41) tmp = z / b; elseif (y <= 1e+112) tmp = (x + ((y * z) / t)) / ((a + 1.0) + (b * (y / t))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.2e+100], t$95$1, If[LessEqual[y, -4.6e+49], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.2e+41], N[(z / b), $MachinePrecision], If[LessEqual[y, 1e+112], 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], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{+100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -4.6 \cdot 10^{+49}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{+41}:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq 10^{+112}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.20000000000000014e100 or 9.9999999999999993e111 < y Initial program 37.7%
associate-/l*40.2%
associate-/l*50.7%
Simplified50.7%
Taylor expanded in b around inf 19.7%
associate-/l*19.8%
+-commutative19.8%
associate-*r/22.4%
fma-undefine22.4%
*-commutative22.4%
Simplified22.4%
Taylor expanded in t around 0 68.9%
times-frac73.6%
Simplified73.6%
if -6.20000000000000014e100 < y < -4.60000000000000004e49Initial program 61.2%
associate-/l*71.0%
associate-/l*80.7%
Simplified80.7%
if -4.60000000000000004e49 < y < -4.1999999999999999e41Initial program 4.7%
associate-/l*4.7%
associate-/l*4.7%
Simplified4.7%
Taylor expanded in y around inf 100.0%
if -4.1999999999999999e41 < y < 9.9999999999999993e111Initial program 93.4%
*-commutative93.4%
associate-/l*93.4%
Applied egg-rr93.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ a 1.0) (* y (/ b t)))))
(if (<= t -2.35e-122)
(/ (+ x (* y (/ z t))) t_1)
(if (<= t -5.1e-306)
(* x (+ (/ (/ z b) x) (/ t (* y b))))
(if (<= t 3e-188)
(/ (* y z) (+ (* y b) (* t (+ a 1.0))))
(/ (+ x (/ y (/ t z))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (a + 1.0) + (y * (b / t));
double tmp;
if (t <= -2.35e-122) {
tmp = (x + (y * (z / t))) / t_1;
} else if (t <= -5.1e-306) {
tmp = x * (((z / b) / x) + (t / (y * b)));
} else if (t <= 3e-188) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y / (t / z))) / 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 = (a + 1.0d0) + (y * (b / t))
if (t <= (-2.35d-122)) then
tmp = (x + (y * (z / t))) / t_1
else if (t <= (-5.1d-306)) then
tmp = x * (((z / b) / x) + (t / (y * b)))
else if (t <= 3d-188) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = (x + (y / (t / z))) / 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 = (a + 1.0) + (y * (b / t));
double tmp;
if (t <= -2.35e-122) {
tmp = (x + (y * (z / t))) / t_1;
} else if (t <= -5.1e-306) {
tmp = x * (((z / b) / x) + (t / (y * b)));
} else if (t <= 3e-188) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = (x + (y / (t / z))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (a + 1.0) + (y * (b / t)) tmp = 0 if t <= -2.35e-122: tmp = (x + (y * (z / t))) / t_1 elif t <= -5.1e-306: tmp = x * (((z / b) / x) + (t / (y * b))) elif t <= 3e-188: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = (x + (y / (t / z))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(a + 1.0) + Float64(y * Float64(b / t))) tmp = 0.0 if (t <= -2.35e-122) tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / t_1); elseif (t <= -5.1e-306) tmp = Float64(x * Float64(Float64(Float64(z / b) / x) + Float64(t / Float64(y * b)))); elseif (t <= 3e-188) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = Float64(Float64(x + Float64(y / Float64(t / z))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (a + 1.0) + (y * (b / t)); tmp = 0.0; if (t <= -2.35e-122) tmp = (x + (y * (z / t))) / t_1; elseif (t <= -5.1e-306) tmp = x * (((z / b) / x) + (t / (y * b))); elseif (t <= 3e-188) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = (x + (y / (t / z))) / t_1; 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]}, If[LessEqual[t, -2.35e-122], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t, -5.1e-306], N[(x * N[(N[(N[(z / b), $MachinePrecision] / x), $MachinePrecision] + N[(t / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3e-188], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a + 1\right) + y \cdot \frac{b}{t}\\
\mathbf{if}\;t \leq -2.35 \cdot 10^{-122}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{t\_1}\\
\mathbf{elif}\;t \leq -5.1 \cdot 10^{-306}:\\
\;\;\;\;x \cdot \left(\frac{\frac{z}{b}}{x} + \frac{t}{y \cdot b}\right)\\
\mathbf{elif}\;t \leq 3 \cdot 10^{-188}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{t\_1}\\
\end{array}
\end{array}
if t < -2.35e-122Initial program 83.6%
associate-/l*88.7%
associate-/l*90.0%
Simplified90.0%
if -2.35e-122 < t < -5.09999999999999972e-306Initial program 49.5%
associate-/l*39.2%
associate-/l*32.3%
Simplified32.3%
Taylor expanded in b around inf 37.3%
associate-/l*35.7%
+-commutative35.7%
associate-*r/30.1%
fma-undefine30.1%
*-commutative30.1%
Simplified30.1%
Taylor expanded in x around inf 56.1%
+-commutative56.1%
associate-/r*70.0%
*-commutative70.0%
Simplified70.0%
if -5.09999999999999972e-306 < t < 3.00000000000000017e-188Initial program 58.8%
associate-/l*40.0%
associate-/l*39.8%
Simplified39.8%
Taylor expanded in x around 0 59.1%
Taylor expanded in t around 0 77.9%
if 3.00000000000000017e-188 < t Initial program 78.9%
associate-/l*77.3%
associate-/l*81.9%
Simplified81.9%
clear-num81.8%
un-div-inv82.1%
Applied egg-rr82.1%
Final simplification82.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))))
(if (<= t -3.9e-123)
t_1
(if (<= t -7.8e-306)
(* x (+ (/ (/ z b) x) (/ t (* y b))))
(if (<= t 1.2e-191) (/ (* y z) (+ (* y b) (* t (+ a 1.0)))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -3.9e-123) {
tmp = t_1;
} else if (t <= -7.8e-306) {
tmp = x * (((z / b) / x) + (t / (y * b)));
} else if (t <= 1.2e-191) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
if (t <= (-3.9d-123)) then
tmp = t_1
else if (t <= (-7.8d-306)) then
tmp = x * (((z / b) / x) + (t / (y * b)))
else if (t <= 1.2d-191) then
tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
double tmp;
if (t <= -3.9e-123) {
tmp = t_1;
} else if (t <= -7.8e-306) {
tmp = x * (((z / b) / x) + (t / (y * b)));
} else if (t <= 1.2e-191) {
tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))) tmp = 0 if t <= -3.9e-123: tmp = t_1 elif t <= -7.8e-306: tmp = x * (((z / b) / x) + (t / (y * b))) elif t <= 1.2e-191: tmp = (y * z) / ((y * b) + (t * (a + 1.0))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))) tmp = 0.0 if (t <= -3.9e-123) tmp = t_1; elseif (t <= -7.8e-306) tmp = Float64(x * Float64(Float64(Float64(z / b) / x) + Float64(t / Float64(y * b)))); elseif (t <= 1.2e-191) tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t))); tmp = 0.0; if (t <= -3.9e-123) tmp = t_1; elseif (t <= -7.8e-306) tmp = x * (((z / b) / x) + (t / (y * b))); elseif (t <= 1.2e-191) tmp = (y * z) / ((y * b) + (t * (a + 1.0))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.9e-123], t$95$1, If[LessEqual[t, -7.8e-306], N[(x * N[(N[(N[(z / b), $MachinePrecision] / x), $MachinePrecision] + N[(t / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.2e-191], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\
\mathbf{if}\;t \leq -3.9 \cdot 10^{-123}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -7.8 \cdot 10^{-306}:\\
\;\;\;\;x \cdot \left(\frac{\frac{z}{b}}{x} + \frac{t}{y \cdot b}\right)\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{-191}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -3.89999999999999976e-123 or 1.2e-191 < t Initial program 80.9%
associate-/l*82.1%
associate-/l*85.3%
Simplified85.3%
if -3.89999999999999976e-123 < t < -7.799999999999999e-306Initial program 49.5%
associate-/l*39.2%
associate-/l*32.3%
Simplified32.3%
Taylor expanded in b around inf 37.3%
associate-/l*35.7%
+-commutative35.7%
associate-*r/30.1%
fma-undefine30.1%
*-commutative30.1%
Simplified30.1%
Taylor expanded in x around inf 56.1%
+-commutative56.1%
associate-/r*70.0%
*-commutative70.0%
Simplified70.0%
if -7.799999999999999e-306 < t < 1.2e-191Initial program 58.8%
associate-/l*40.0%
associate-/l*39.8%
Simplified39.8%
Taylor expanded in x around 0 59.1%
Taylor expanded in t around 0 77.9%
Final simplification81.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (/ z b) (* (/ t b) (/ x y)))))
(if (<= y -5.4e+100)
t_1
(if (<= y -7e+49)
(* z (+ (/ (/ y t) (+ a 1.0)) (/ (/ x z) (+ a 1.0))))
(if (or (<= y -3000000.0) (not (<= y 1.4e+111)))
t_1
(/ (+ x (/ (* y z) t)) (+ a 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z / b) + ((t / b) * (x / y));
double tmp;
if (y <= -5.4e+100) {
tmp = t_1;
} else if (y <= -7e+49) {
tmp = z * (((y / t) / (a + 1.0)) + ((x / z) / (a + 1.0)));
} else if ((y <= -3000000.0) || !(y <= 1.4e+111)) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (z / b) + ((t / b) * (x / y))
if (y <= (-5.4d+100)) then
tmp = t_1
else if (y <= (-7d+49)) then
tmp = z * (((y / t) / (a + 1.0d0)) + ((x / z) / (a + 1.0d0)))
else if ((y <= (-3000000.0d0)) .or. (.not. (y <= 1.4d+111))) then
tmp = t_1
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 t_1 = (z / b) + ((t / b) * (x / y));
double tmp;
if (y <= -5.4e+100) {
tmp = t_1;
} else if (y <= -7e+49) {
tmp = z * (((y / t) / (a + 1.0)) + ((x / z) / (a + 1.0)));
} else if ((y <= -3000000.0) || !(y <= 1.4e+111)) {
tmp = t_1;
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z / b) + ((t / b) * (x / y)) tmp = 0 if y <= -5.4e+100: tmp = t_1 elif y <= -7e+49: tmp = z * (((y / t) / (a + 1.0)) + ((x / z) / (a + 1.0))) elif (y <= -3000000.0) or not (y <= 1.4e+111): tmp = t_1 else: tmp = (x + ((y * z) / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))) tmp = 0.0 if (y <= -5.4e+100) tmp = t_1; elseif (y <= -7e+49) tmp = Float64(z * Float64(Float64(Float64(y / t) / Float64(a + 1.0)) + Float64(Float64(x / z) / Float64(a + 1.0)))); elseif ((y <= -3000000.0) || !(y <= 1.4e+111)) tmp = t_1; 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) t_1 = (z / b) + ((t / b) * (x / y)); tmp = 0.0; if (y <= -5.4e+100) tmp = t_1; elseif (y <= -7e+49) tmp = z * (((y / t) / (a + 1.0)) + ((x / z) / (a + 1.0))); elseif ((y <= -3000000.0) || ~((y <= 1.4e+111))) tmp = t_1; else tmp = (x + ((y * z) / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -5.4e+100], t$95$1, If[LessEqual[y, -7e+49], N[(z * N[(N[(N[(y / t), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x / z), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -3000000.0], N[Not[LessEqual[y, 1.4e+111]], $MachinePrecision]], t$95$1, N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{if}\;y \leq -5.4 \cdot 10^{+100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -7 \cdot 10^{+49}:\\
\;\;\;\;z \cdot \left(\frac{\frac{y}{t}}{a + 1} + \frac{\frac{x}{z}}{a + 1}\right)\\
\mathbf{elif}\;y \leq -3000000 \lor \neg \left(y \leq 1.4 \cdot 10^{+111}\right):\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -5.39999999999999997e100 or -6.9999999999999995e49 < y < -3e6 or 1.4e111 < y Initial program 40.9%
associate-/l*43.1%
associate-/l*52.4%
Simplified52.4%
Taylor expanded in b around inf 20.9%
associate-/l*21.0%
+-commutative21.0%
associate-*r/23.3%
fma-undefine23.3%
*-commutative23.3%
Simplified23.3%
Taylor expanded in t around 0 68.4%
times-frac72.6%
Simplified72.6%
if -5.39999999999999997e100 < y < -6.9999999999999995e49Initial program 61.2%
associate-/l*71.0%
associate-/l*80.7%
Simplified80.7%
Taylor expanded in z around inf 80.1%
associate-+r+80.1%
*-commutative80.1%
associate-+r+80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in t around 0 80.1%
Taylor expanded in b around 0 70.1%
+-commutative70.1%
associate-/r*70.1%
associate-/r*79.7%
Simplified79.7%
if -3e6 < y < 1.4e111Initial program 93.7%
associate-/l*86.5%
associate-/l*82.0%
Simplified82.0%
Taylor expanded in b around 0 78.7%
Final simplification76.5%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -0.00285)
(/ z b)
(if (<= y -1.14e-225)
(/ x a)
(if (<= y 4.7e-254)
x
(if (<= y 6.5e-112) (/ x a) (if (<= y 2.4e+14) x (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -0.00285) {
tmp = z / b;
} else if (y <= -1.14e-225) {
tmp = x / a;
} else if (y <= 4.7e-254) {
tmp = x;
} else if (y <= 6.5e-112) {
tmp = x / a;
} else if (y <= 2.4e+14) {
tmp = x;
} 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 <= (-0.00285d0)) then
tmp = z / b
else if (y <= (-1.14d-225)) then
tmp = x / a
else if (y <= 4.7d-254) then
tmp = x
else if (y <= 6.5d-112) then
tmp = x / a
else if (y <= 2.4d+14) then
tmp = x
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 <= -0.00285) {
tmp = z / b;
} else if (y <= -1.14e-225) {
tmp = x / a;
} else if (y <= 4.7e-254) {
tmp = x;
} else if (y <= 6.5e-112) {
tmp = x / a;
} else if (y <= 2.4e+14) {
tmp = x;
} else {
tmp = z / b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -0.00285: tmp = z / b elif y <= -1.14e-225: tmp = x / a elif y <= 4.7e-254: tmp = x elif y <= 6.5e-112: tmp = x / a elif y <= 2.4e+14: tmp = x else: tmp = z / b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -0.00285) tmp = Float64(z / b); elseif (y <= -1.14e-225) tmp = Float64(x / a); elseif (y <= 4.7e-254) tmp = x; elseif (y <= 6.5e-112) tmp = Float64(x / a); elseif (y <= 2.4e+14) tmp = x; else tmp = Float64(z / b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -0.00285) tmp = z / b; elseif (y <= -1.14e-225) tmp = x / a; elseif (y <= 4.7e-254) tmp = x; elseif (y <= 6.5e-112) tmp = x / a; elseif (y <= 2.4e+14) tmp = x; else tmp = z / b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -0.00285], N[(z / b), $MachinePrecision], If[LessEqual[y, -1.14e-225], N[(x / a), $MachinePrecision], If[LessEqual[y, 4.7e-254], x, If[LessEqual[y, 6.5e-112], N[(x / a), $MachinePrecision], If[LessEqual[y, 2.4e+14], x, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.00285:\\
\;\;\;\;\frac{z}{b}\\
\mathbf{elif}\;y \leq -1.14 \cdot 10^{-225}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;y \leq 4.7 \cdot 10^{-254}:\\
\;\;\;\;x\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{-112}:\\
\;\;\;\;\frac{x}{a}\\
\mathbf{elif}\;y \leq 2.4 \cdot 10^{+14}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\
\end{array}
\end{array}
if y < -0.0028500000000000001 or 2.4e14 < y Initial program 47.5%
associate-/l*50.1%
associate-/l*58.3%
Simplified58.3%
Taylor expanded in y around inf 59.1%
if -0.0028500000000000001 < y < -1.14e-225 or 4.70000000000000027e-254 < y < 6.49999999999999956e-112Initial program 95.4%
associate-/l*90.1%
associate-/l*81.5%
Simplified81.5%
Taylor expanded in x around inf 64.9%
Taylor expanded in a around inf 50.0%
if -1.14e-225 < y < 4.70000000000000027e-254 or 6.49999999999999956e-112 < y < 2.4e14Initial program 94.8%
associate-/l*83.2%
associate-/l*83.2%
Simplified83.2%
Taylor expanded in x around inf 72.5%
Taylor expanded in a around 0 56.2%
Taylor expanded in b around 0 49.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -5.2e+94) (not (<= y 2.6e+109))) (+ (/ z b) (* (/ t b) (/ x y))) (/ (+ x (/ (* y z) t)) (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.2e+94) || !(y <= 2.6e+109)) {
tmp = (z / b) + ((t / b) * (x / y));
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-5.2d+94)) .or. (.not. (y <= 2.6d+109))) then
tmp = (z / b) + ((t / b) * (x / y))
else
tmp = (x + ((y * z) / t)) / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -5.2e+94) || !(y <= 2.6e+109)) {
tmp = (z / b) + ((t / b) * (x / y));
} else {
tmp = (x + ((y * z) / t)) / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -5.2e+94) or not (y <= 2.6e+109): tmp = (z / b) + ((t / b) * (x / y)) else: tmp = (x + ((y * z) / t)) / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -5.2e+94) || !(y <= 2.6e+109)) tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); else tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -5.2e+94) || ~((y <= 2.6e+109))) tmp = (z / b) + ((t / b) * (x / y)); else tmp = (x + ((y * z) / t)) / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -5.2e+94], N[Not[LessEqual[y, 2.6e+109]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+94} \lor \neg \left(y \leq 2.6 \cdot 10^{+109}\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\
\end{array}
\end{array}
if y < -5.1999999999999998e94 or 2.5999999999999998e109 < y Initial program 38.0%
associate-/l*40.5%
associate-/l*51.9%
Simplified51.9%
Taylor expanded in b around inf 19.3%
associate-/l*19.4%
+-commutative19.4%
associate-*r/21.9%
fma-undefine21.9%
*-commutative21.9%
Simplified21.9%
Taylor expanded in t around 0 68.4%
times-frac73.0%
Simplified73.0%
if -5.1999999999999998e94 < y < 2.5999999999999998e109Initial program 90.4%
associate-/l*84.6%
associate-/l*80.7%
Simplified80.7%
Taylor expanded in b around 0 75.4%
Final simplification74.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.5e+39) (not (<= y 2e+113))) (+ (/ z b) (* (/ t b) (/ x y))) (/ x (+ (+ a 1.0) (* b (/ y t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8.5e+39) || !(y <= 2e+113)) {
tmp = (z / b) + ((t / b) * (x / y));
} else {
tmp = x / ((a + 1.0) + (b * (y / 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 <= (-8.5d+39)) .or. (.not. (y <= 2d+113))) then
tmp = (z / b) + ((t / b) * (x / y))
else
tmp = x / ((a + 1.0d0) + (b * (y / 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 <= -8.5e+39) || !(y <= 2e+113)) {
tmp = (z / b) + ((t / b) * (x / y));
} else {
tmp = x / ((a + 1.0) + (b * (y / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8.5e+39) or not (y <= 2e+113): tmp = (z / b) + ((t / b) * (x / y)) else: tmp = x / ((a + 1.0) + (b * (y / t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8.5e+39) || !(y <= 2e+113)) tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); else tmp = Float64(x / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8.5e+39) || ~((y <= 2e+113))) tmp = (z / b) + ((t / b) * (x / y)); else tmp = x / ((a + 1.0) + (b * (y / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8.5e+39], N[Not[LessEqual[y, 2e+113]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+39} \lor \neg \left(y \leq 2 \cdot 10^{+113}\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\
\end{array}
\end{array}
if y < -8.49999999999999971e39 or 2e113 < y Initial program 39.1%
associate-/l*42.3%
associate-/l*52.4%
Simplified52.4%
Taylor expanded in b around inf 17.5%
associate-/l*18.6%
+-commutative18.6%
associate-*r/20.8%
fma-undefine20.8%
*-commutative20.8%
Simplified20.8%
Taylor expanded in t around 0 65.0%
times-frac69.0%
Simplified69.0%
if -8.49999999999999971e39 < y < 2e113Initial program 93.4%
*-commutative93.4%
associate-/l*93.4%
Applied egg-rr93.4%
Taylor expanded in x around inf 70.9%
Final simplification70.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.4e+40) (not (<= y 1.3e+111))) (+ (/ z b) (* (/ t b) (/ x y))) (/ x (+ (/ (* y b) t) (+ a 1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.4e+40) || !(y <= 1.3e+111)) {
tmp = (z / b) + ((t / b) * (x / y));
} else {
tmp = x / (((y * b) / t) + (a + 1.0));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-4.4d+40)) .or. (.not. (y <= 1.3d+111))) then
tmp = (z / b) + ((t / b) * (x / y))
else
tmp = x / (((y * b) / t) + (a + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.4e+40) || !(y <= 1.3e+111)) {
tmp = (z / b) + ((t / b) * (x / y));
} else {
tmp = x / (((y * b) / t) + (a + 1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.4e+40) or not (y <= 1.3e+111): tmp = (z / b) + ((t / b) * (x / y)) else: tmp = x / (((y * b) / t) + (a + 1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.4e+40) || !(y <= 1.3e+111)) tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); else tmp = Float64(x / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.4e+40) || ~((y <= 1.3e+111))) tmp = (z / b) + ((t / b) * (x / y)); else tmp = x / (((y * b) / t) + (a + 1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.4e+40], N[Not[LessEqual[y, 1.3e+111]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+40} \lor \neg \left(y \leq 1.3 \cdot 10^{+111}\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\
\end{array}
\end{array}
if y < -4.3999999999999998e40 or 1.2999999999999999e111 < y Initial program 39.1%
associate-/l*42.3%
associate-/l*52.4%
Simplified52.4%
Taylor expanded in b around inf 17.5%
associate-/l*18.6%
+-commutative18.6%
associate-*r/20.8%
fma-undefine20.8%
*-commutative20.8%
Simplified20.8%
Taylor expanded in t around 0 65.0%
times-frac69.0%
Simplified69.0%
if -4.3999999999999998e40 < y < 1.2999999999999999e111Initial program 93.4%
associate-/l*86.6%
associate-/l*82.3%
Simplified82.3%
Taylor expanded in x around inf 70.9%
associate-+r+70.9%
*-commutative70.9%
Simplified70.9%
Final simplification70.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -15.6) (not (<= y 6.5e+15))) (+ (/ z b) (* (/ t b) (/ x y))) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -15.6) || !(y <= 6.5e+15)) {
tmp = (z / b) + ((t / b) * (x / y));
} 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 <= (-15.6d0)) .or. (.not. (y <= 6.5d+15))) then
tmp = (z / b) + ((t / b) * (x / y))
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 <= -15.6) || !(y <= 6.5e+15)) {
tmp = (z / b) + ((t / b) * (x / y));
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -15.6) or not (y <= 6.5e+15): tmp = (z / b) + ((t / b) * (x / y)) else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -15.6) || !(y <= 6.5e+15)) tmp = Float64(Float64(z / b) + Float64(Float64(t / b) * Float64(x / y))); 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 <= -15.6) || ~((y <= 6.5e+15))) tmp = (z / b) + ((t / b) * (x / y)); else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -15.6], N[Not[LessEqual[y, 6.5e+15]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(N[(t / b), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -15.6 \lor \neg \left(y \leq 6.5 \cdot 10^{+15}\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -15.5999999999999996 or 6.5e15 < y Initial program 47.5%
associate-/l*50.1%
associate-/l*58.3%
Simplified58.3%
Taylor expanded in b around inf 21.1%
associate-/l*22.8%
+-commutative22.8%
associate-*r/24.6%
fma-undefine24.6%
*-commutative24.6%
Simplified24.6%
Taylor expanded in t around 0 62.0%
times-frac65.2%
Simplified65.2%
if -15.5999999999999996 < y < 6.5e15Initial program 95.2%
associate-/l*87.2%
associate-/l*82.2%
Simplified82.2%
Taylor expanded in y around 0 66.0%
Final simplification65.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.06e+40) (not (<= y 1.5e+30))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.06e+40) || !(y <= 1.5e+30)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.06d+40)) .or. (.not. (y <= 1.5d+30))) then
tmp = z / b
else
tmp = x / (a + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.06e+40) || !(y <= 1.5e+30)) {
tmp = z / b;
} else {
tmp = x / (a + 1.0);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.06e+40) or not (y <= 1.5e+30): tmp = z / b else: tmp = x / (a + 1.0) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.06e+40) || !(y <= 1.5e+30)) tmp = Float64(z / b); else tmp = Float64(x / Float64(a + 1.0)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.06e+40) || ~((y <= 1.5e+30))) tmp = z / b; else tmp = x / (a + 1.0); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.06e+40], N[Not[LessEqual[y, 1.5e+30]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.06 \cdot 10^{+40} \lor \neg \left(y \leq 1.5 \cdot 10^{+30}\right):\\
\;\;\;\;\frac{z}{b}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\
\end{array}
\end{array}
if y < -1.05999999999999996e40 or 1.49999999999999989e30 < y Initial program 43.6%
associate-/l*46.5%
associate-/l*55.4%
Simplified55.4%
Taylor expanded in y around inf 61.5%
if -1.05999999999999996e40 < y < 1.49999999999999989e30Initial program 94.8%
associate-/l*87.4%
associate-/l*82.8%
Simplified82.8%
Taylor expanded in y around 0 64.3%
Final simplification63.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.0) (not (<= a 8400000000000.0))) (/ x a) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.0) || !(a <= 8400000000000.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((a <= (-1.0d0)) .or. (.not. (a <= 8400000000000.0d0))) then
tmp = x / a
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.0) || !(a <= 8400000000000.0)) {
tmp = x / a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.0) or not (a <= 8400000000000.0): tmp = x / a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.0) || !(a <= 8400000000000.0)) tmp = Float64(x / a); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -1.0) || ~((a <= 8400000000000.0))) tmp = x / a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.0], N[Not[LessEqual[a, 8400000000000.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 8400000000000\right):\\
\;\;\;\;\frac{x}{a}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if a < -1 or 8.4e12 < a Initial program 71.8%
associate-/l*69.0%
associate-/l*70.4%
Simplified70.4%
Taylor expanded in x around inf 54.4%
Taylor expanded in a around inf 51.3%
if -1 < a < 8.4e12Initial program 74.4%
associate-/l*71.0%
associate-/l*71.8%
Simplified71.8%
Taylor expanded in x around inf 47.6%
Taylor expanded in a around 0 49.7%
Taylor expanded in b around 0 38.9%
Final simplification45.3%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 73.0%
associate-/l*70.0%
associate-/l*71.1%
Simplified71.1%
Taylor expanded in x around inf 51.1%
Taylor expanded in a around 0 29.0%
Taylor expanded in b around 0 20.8%
(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 2024089
(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))))