
(FPCore (x y z t a b) :precision binary64 (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
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 + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b): return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\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 y) a)) (* y b)) (+ (+ x t) y)))
double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
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 + y) * a)) - (y * b)) / ((x + t) + y)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y);
}
def code(x, y, z, t, a, b): return ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) / Float64(Float64(x + t) + y)) end
function tmp = code(x, y, z, t, a, b) tmp = ((((x + y) * z) + ((t + y) * a)) - (y * b)) / ((x + t) + y); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b}{\left(x + t\right) + y}
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))))
(+
(/ (- z b) (/ t_1 y))
(+ (* a (+ (/ y t_1) (/ t t_1))) (/ z (/ t_1 x))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
return ((z - b) / (t_1 / y)) + ((a * ((y / t_1) + (t / t_1))) + (z / (t_1 / 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
real(8) :: t_1
t_1 = y + (x + t)
code = ((z - b) / (t_1 / y)) + ((a * ((y / t_1) + (t / t_1))) + (z / (t_1 / x)))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
return ((z - b) / (t_1 / y)) + ((a * ((y / t_1) + (t / t_1))) + (z / (t_1 / x)));
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) return ((z - b) / (t_1 / y)) + ((a * ((y / t_1) + (t / t_1))) + (z / (t_1 / x)))
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) return Float64(Float64(Float64(z - b) / Float64(t_1 / y)) + Float64(Float64(a * Float64(Float64(y / t_1) + Float64(t / t_1))) + Float64(z / Float64(t_1 / x)))) end
function tmp = code(x, y, z, t, a, b) t_1 = y + (x + t); tmp = ((z - b) / (t_1 / y)) + ((a * ((y / t_1) + (t / t_1))) + (z / (t_1 / x))); end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, N[(N[(N[(z - b), $MachinePrecision] / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] + N[(N[(a * N[(N[(y / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\frac{z - b}{\frac{t_1}{y}} + \left(a \cdot \left(\frac{y}{t_1} + \frac{t}{t_1}\right) + \frac{z}{\frac{t_1}{x}}\right)
\end{array}
\end{array}
Initial program 64.5%
Simplified64.7%
Taylor expanded in a around 0 76.1%
associate-/l*88.9%
+-commutative88.9%
+-commutative88.9%
+-commutative88.9%
+-commutative88.9%
+-commutative88.9%
+-commutative88.9%
+-commutative88.9%
associate-/l*99.2%
+-commutative99.2%
+-commutative99.2%
Simplified99.2%
Final simplification99.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (* z (+ x y)))
(t_3 (/ (- (+ t_2 (* a (+ t y))) (* b y)) t_1)))
(if (or (<= t_3 -1e+201) (not (<= t_3 2e+245)))
(+ (/ (- z b) (/ t_1 y)) (+ a (/ z (/ t_1 x))))
(+ (/ t_2 t_1) (+ (/ a (/ t_1 t)) (/ (* y (- a b)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = z * (x + y);
double t_3 = ((t_2 + (a * (t + y))) - (b * y)) / t_1;
double tmp;
if ((t_3 <= -1e+201) || !(t_3 <= 2e+245)) {
tmp = ((z - b) / (t_1 / y)) + (a + (z / (t_1 / x)));
} else {
tmp = (t_2 / t_1) + ((a / (t_1 / t)) + ((y * (a - b)) / 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) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y + (x + t)
t_2 = z * (x + y)
t_3 = ((t_2 + (a * (t + y))) - (b * y)) / t_1
if ((t_3 <= (-1d+201)) .or. (.not. (t_3 <= 2d+245))) then
tmp = ((z - b) / (t_1 / y)) + (a + (z / (t_1 / x)))
else
tmp = (t_2 / t_1) + ((a / (t_1 / t)) + ((y * (a - b)) / 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 = y + (x + t);
double t_2 = z * (x + y);
double t_3 = ((t_2 + (a * (t + y))) - (b * y)) / t_1;
double tmp;
if ((t_3 <= -1e+201) || !(t_3 <= 2e+245)) {
tmp = ((z - b) / (t_1 / y)) + (a + (z / (t_1 / x)));
} else {
tmp = (t_2 / t_1) + ((a / (t_1 / t)) + ((y * (a - b)) / t_1));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = z * (x + y) t_3 = ((t_2 + (a * (t + y))) - (b * y)) / t_1 tmp = 0 if (t_3 <= -1e+201) or not (t_3 <= 2e+245): tmp = ((z - b) / (t_1 / y)) + (a + (z / (t_1 / x))) else: tmp = (t_2 / t_1) + ((a / (t_1 / t)) + ((y * (a - b)) / t_1)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(z * Float64(x + y)) t_3 = Float64(Float64(Float64(t_2 + Float64(a * Float64(t + y))) - Float64(b * y)) / t_1) tmp = 0.0 if ((t_3 <= -1e+201) || !(t_3 <= 2e+245)) tmp = Float64(Float64(Float64(z - b) / Float64(t_1 / y)) + Float64(a + Float64(z / Float64(t_1 / x)))); else tmp = Float64(Float64(t_2 / t_1) + Float64(Float64(a / Float64(t_1 / t)) + Float64(Float64(y * Float64(a - b)) / t_1))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = z * (x + y); t_3 = ((t_2 + (a * (t + y))) - (b * y)) / t_1; tmp = 0.0; if ((t_3 <= -1e+201) || ~((t_3 <= 2e+245))) tmp = ((z - b) / (t_1 / y)) + (a + (z / (t_1 / x))); else tmp = (t_2 / t_1) + ((a / (t_1 / t)) + ((y * (a - b)) / t_1)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(t$95$2 + N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$3, -1e+201], N[Not[LessEqual[t$95$3, 2e+245]], $MachinePrecision]], N[(N[(N[(z - b), $MachinePrecision] / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] + N[(a + N[(z / N[(t$95$1 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$2 / t$95$1), $MachinePrecision] + N[(N[(a / N[(t$95$1 / t), $MachinePrecision]), $MachinePrecision] + N[(N[(y * N[(a - b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := z \cdot \left(x + y\right)\\
t_3 := \frac{\left(t_2 + a \cdot \left(t + y\right)\right) - b \cdot y}{t_1}\\
\mathbf{if}\;t_3 \leq -1 \cdot 10^{+201} \lor \neg \left(t_3 \leq 2 \cdot 10^{+245}\right):\\
\;\;\;\;\frac{z - b}{\frac{t_1}{y}} + \left(a + \frac{z}{\frac{t_1}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t_2}{t_1} + \left(\frac{a}{\frac{t_1}{t}} + \frac{y \cdot \left(a - b\right)}{t_1}\right)\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -1.00000000000000004e201 or 2.00000000000000009e245 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 21.4%
Simplified21.7%
Taylor expanded in a around 0 47.1%
associate-/l*77.2%
+-commutative77.2%
+-commutative77.2%
+-commutative77.2%
+-commutative77.2%
+-commutative77.2%
+-commutative77.2%
+-commutative77.2%
associate-/l*100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in y around inf 92.4%
if -1.00000000000000004e201 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.00000000000000009e245Initial program 99.7%
*-commutative99.7%
distribute-rgt-in99.7%
associate-+r+99.7%
associate--l+99.7%
+-commutative99.7%
+-commutative99.7%
distribute-lft-out--99.7%
fma-def99.7%
+-commutative99.7%
fma-def99.8%
associate-+l+99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in z around inf 99.7%
*-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
+-commutative99.7%
associate-/l*99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
+-commutative99.8%
Simplified99.8%
Final simplification96.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (+ t y)))
(t_2 (+ y (+ x t)))
(t_3 (* z (+ x y)))
(t_4 (/ (- (+ t_3 t_1) (* b y)) t_2)))
(if (or (<= t_4 (- INFINITY)) (not (<= t_4 INFINITY)))
(+ (+ a (/ z (/ t_2 x))) (* y (/ (- z b) (+ x (+ t y)))))
(/ (+ t_3 (- t_1 (* b y))) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + y);
double t_2 = y + (x + t);
double t_3 = z * (x + y);
double t_4 = ((t_3 + t_1) - (b * y)) / t_2;
double tmp;
if ((t_4 <= -((double) INFINITY)) || !(t_4 <= ((double) INFINITY))) {
tmp = (a + (z / (t_2 / x))) + (y * ((z - b) / (x + (t + y))));
} else {
tmp = (t_3 + (t_1 - (b * y))) / t_2;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + y);
double t_2 = y + (x + t);
double t_3 = z * (x + y);
double t_4 = ((t_3 + t_1) - (b * y)) / t_2;
double tmp;
if ((t_4 <= -Double.POSITIVE_INFINITY) || !(t_4 <= Double.POSITIVE_INFINITY)) {
tmp = (a + (z / (t_2 / x))) + (y * ((z - b) / (x + (t + y))));
} else {
tmp = (t_3 + (t_1 - (b * y))) / t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (t + y) t_2 = y + (x + t) t_3 = z * (x + y) t_4 = ((t_3 + t_1) - (b * y)) / t_2 tmp = 0 if (t_4 <= -math.inf) or not (t_4 <= math.inf): tmp = (a + (z / (t_2 / x))) + (y * ((z - b) / (x + (t + y)))) else: tmp = (t_3 + (t_1 - (b * y))) / t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(t + y)) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(z * Float64(x + y)) t_4 = Float64(Float64(Float64(t_3 + t_1) - Float64(b * y)) / t_2) tmp = 0.0 if ((t_4 <= Float64(-Inf)) || !(t_4 <= Inf)) tmp = Float64(Float64(a + Float64(z / Float64(t_2 / x))) + Float64(y * Float64(Float64(z - b) / Float64(x + Float64(t + y))))); else tmp = Float64(Float64(t_3 + Float64(t_1 - Float64(b * y))) / t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (t + y); t_2 = y + (x + t); t_3 = z * (x + y); t_4 = ((t_3 + t_1) - (b * y)) / t_2; tmp = 0.0; if ((t_4 <= -Inf) || ~((t_4 <= Inf))) tmp = (a + (z / (t_2 / x))) + (y * ((z - b) / (x + (t + y)))); else tmp = (t_3 + (t_1 - (b * y))) / t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$3 + t$95$1), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[Or[LessEqual[t$95$4, (-Infinity)], N[Not[LessEqual[t$95$4, Infinity]], $MachinePrecision]], N[(N[(a + N[(z / N[(t$95$2 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y * N[(N[(z - b), $MachinePrecision] / N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$3 + N[(t$95$1 - N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(t + y\right)\\
t_2 := y + \left(x + t\right)\\
t_3 := z \cdot \left(x + y\right)\\
t_4 := \frac{\left(t_3 + t_1\right) - b \cdot y}{t_2}\\
\mathbf{if}\;t_4 \leq -\infty \lor \neg \left(t_4 \leq \infty\right):\\
\;\;\;\;\left(a + \frac{z}{\frac{t_2}{x}}\right) + y \cdot \frac{z - b}{x + \left(t + y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{t_3 + \left(t_1 - b \cdot y\right)}{t_2}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or +inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 3.8%
Simplified5.1%
Taylor expanded in a around 0 33.0%
associate-/l*68.1%
+-commutative68.1%
+-commutative68.1%
+-commutative68.1%
+-commutative68.1%
+-commutative68.1%
+-commutative68.1%
+-commutative68.1%
associate-/l*100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in y around inf 87.8%
associate-/r/87.7%
associate-+l+87.7%
Applied egg-rr87.7%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < +inf.0Initial program 78.2%
associate--l+78.2%
+-commutative78.2%
+-commutative78.2%
*-commutative78.2%
Applied egg-rr78.2%
Final simplification79.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (+ t y)))
(t_2 (+ y (+ x t)))
(t_3 (* z (+ x y)))
(t_4 (/ (- (+ t_3 t_1) (* b y)) t_2)))
(if (or (<= t_4 -1e+201) (not (<= t_4 2e+245)))
(+ (/ (- z b) (/ t_2 y)) (+ a (/ z (/ t_2 x))))
(/ (+ t_3 (- t_1 (* b y))) t_2))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + y);
double t_2 = y + (x + t);
double t_3 = z * (x + y);
double t_4 = ((t_3 + t_1) - (b * y)) / t_2;
double tmp;
if ((t_4 <= -1e+201) || !(t_4 <= 2e+245)) {
tmp = ((z - b) / (t_2 / y)) + (a + (z / (t_2 / x)));
} else {
tmp = (t_3 + (t_1 - (b * y))) / t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = a * (t + y)
t_2 = y + (x + t)
t_3 = z * (x + y)
t_4 = ((t_3 + t_1) - (b * y)) / t_2
if ((t_4 <= (-1d+201)) .or. (.not. (t_4 <= 2d+245))) then
tmp = ((z - b) / (t_2 / y)) + (a + (z / (t_2 / x)))
else
tmp = (t_3 + (t_1 - (b * y))) / t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + y);
double t_2 = y + (x + t);
double t_3 = z * (x + y);
double t_4 = ((t_3 + t_1) - (b * y)) / t_2;
double tmp;
if ((t_4 <= -1e+201) || !(t_4 <= 2e+245)) {
tmp = ((z - b) / (t_2 / y)) + (a + (z / (t_2 / x)));
} else {
tmp = (t_3 + (t_1 - (b * y))) / t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (t + y) t_2 = y + (x + t) t_3 = z * (x + y) t_4 = ((t_3 + t_1) - (b * y)) / t_2 tmp = 0 if (t_4 <= -1e+201) or not (t_4 <= 2e+245): tmp = ((z - b) / (t_2 / y)) + (a + (z / (t_2 / x))) else: tmp = (t_3 + (t_1 - (b * y))) / t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(t + y)) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(z * Float64(x + y)) t_4 = Float64(Float64(Float64(t_3 + t_1) - Float64(b * y)) / t_2) tmp = 0.0 if ((t_4 <= -1e+201) || !(t_4 <= 2e+245)) tmp = Float64(Float64(Float64(z - b) / Float64(t_2 / y)) + Float64(a + Float64(z / Float64(t_2 / x)))); else tmp = Float64(Float64(t_3 + Float64(t_1 - Float64(b * y))) / t_2); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (t + y); t_2 = y + (x + t); t_3 = z * (x + y); t_4 = ((t_3 + t_1) - (b * y)) / t_2; tmp = 0.0; if ((t_4 <= -1e+201) || ~((t_4 <= 2e+245))) tmp = ((z - b) / (t_2 / y)) + (a + (z / (t_2 / x))); else tmp = (t_3 + (t_1 - (b * y))) / t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$3 + t$95$1), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[Or[LessEqual[t$95$4, -1e+201], N[Not[LessEqual[t$95$4, 2e+245]], $MachinePrecision]], N[(N[(N[(z - b), $MachinePrecision] / N[(t$95$2 / y), $MachinePrecision]), $MachinePrecision] + N[(a + N[(z / N[(t$95$2 / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$3 + N[(t$95$1 - N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(t + y\right)\\
t_2 := y + \left(x + t\right)\\
t_3 := z \cdot \left(x + y\right)\\
t_4 := \frac{\left(t_3 + t_1\right) - b \cdot y}{t_2}\\
\mathbf{if}\;t_4 \leq -1 \cdot 10^{+201} \lor \neg \left(t_4 \leq 2 \cdot 10^{+245}\right):\\
\;\;\;\;\frac{z - b}{\frac{t_2}{y}} + \left(a + \frac{z}{\frac{t_2}{x}}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t_3 + \left(t_1 - b \cdot y\right)}{t_2}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -1.00000000000000004e201 or 2.00000000000000009e245 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 21.4%
Simplified21.7%
Taylor expanded in a around 0 47.1%
associate-/l*77.2%
+-commutative77.2%
+-commutative77.2%
+-commutative77.2%
+-commutative77.2%
+-commutative77.2%
+-commutative77.2%
+-commutative77.2%
associate-/l*100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in y around inf 92.4%
if -1.00000000000000004e201 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.00000000000000009e245Initial program 99.7%
associate--l+99.7%
+-commutative99.7%
+-commutative99.7%
*-commutative99.7%
Applied egg-rr99.7%
Final simplification96.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (+ t y)))
(t_2 (+ y (+ x t)))
(t_3 (* z (+ x y)))
(t_4 (/ (- (+ t_3 t_1) (* b y)) t_2)))
(if (<= t_4 (- INFINITY))
(+ z a)
(if (<= t_4 2e+279) (/ (+ t_3 (- t_1 (* b y))) t_2) (+ (- z b) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + y);
double t_2 = y + (x + t);
double t_3 = z * (x + y);
double t_4 = ((t_3 + t_1) - (b * y)) / t_2;
double tmp;
if (t_4 <= -((double) INFINITY)) {
tmp = z + a;
} else if (t_4 <= 2e+279) {
tmp = (t_3 + (t_1 - (b * y))) / t_2;
} else {
tmp = (z - b) + a;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + y);
double t_2 = y + (x + t);
double t_3 = z * (x + y);
double t_4 = ((t_3 + t_1) - (b * y)) / t_2;
double tmp;
if (t_4 <= -Double.POSITIVE_INFINITY) {
tmp = z + a;
} else if (t_4 <= 2e+279) {
tmp = (t_3 + (t_1 - (b * y))) / t_2;
} else {
tmp = (z - b) + a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (t + y) t_2 = y + (x + t) t_3 = z * (x + y) t_4 = ((t_3 + t_1) - (b * y)) / t_2 tmp = 0 if t_4 <= -math.inf: tmp = z + a elif t_4 <= 2e+279: tmp = (t_3 + (t_1 - (b * y))) / t_2 else: tmp = (z - b) + a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(t + y)) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(z * Float64(x + y)) t_4 = Float64(Float64(Float64(t_3 + t_1) - Float64(b * y)) / t_2) tmp = 0.0 if (t_4 <= Float64(-Inf)) tmp = Float64(z + a); elseif (t_4 <= 2e+279) tmp = Float64(Float64(t_3 + Float64(t_1 - Float64(b * y))) / t_2); else tmp = Float64(Float64(z - b) + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (t + y); t_2 = y + (x + t); t_3 = z * (x + y); t_4 = ((t_3 + t_1) - (b * y)) / t_2; tmp = 0.0; if (t_4 <= -Inf) tmp = z + a; elseif (t_4 <= 2e+279) tmp = (t_3 + (t_1 - (b * y))) / t_2; else tmp = (z - b) + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(t$95$3 + t$95$1), $MachinePrecision] - N[(b * y), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[t$95$4, (-Infinity)], N[(z + a), $MachinePrecision], If[LessEqual[t$95$4, 2e+279], N[(N[(t$95$3 + N[(t$95$1 - N[(b * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], N[(N[(z - b), $MachinePrecision] + a), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(t + y\right)\\
t_2 := y + \left(x + t\right)\\
t_3 := z \cdot \left(x + y\right)\\
t_4 := \frac{\left(t_3 + t_1\right) - b \cdot y}{t_2}\\
\mathbf{if}\;t_4 \leq -\infty:\\
\;\;\;\;z + a\\
\mathbf{elif}\;t_4 \leq 2 \cdot 10^{+279}:\\
\;\;\;\;\frac{t_3 + \left(t_1 - b \cdot y\right)}{t_2}\\
\mathbf{else}:\\
\;\;\;\;\left(z - b\right) + a\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0Initial program 6.2%
*-commutative6.2%
distribute-rgt-in5.9%
associate-+r+5.9%
associate--l+5.9%
+-commutative5.9%
+-commutative5.9%
distribute-lft-out--5.9%
fma-def6.2%
+-commutative6.2%
fma-def6.2%
associate-+l+6.2%
+-commutative6.2%
Simplified6.2%
Taylor expanded in y around inf 79.8%
associate--l+79.8%
Simplified79.8%
Taylor expanded in b around 0 80.0%
+-commutative80.0%
Simplified80.0%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 2.00000000000000012e279Initial program 99.7%
associate--l+99.7%
+-commutative99.7%
+-commutative99.7%
*-commutative99.7%
Applied egg-rr99.7%
if 2.00000000000000012e279 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 7.1%
*-commutative7.1%
distribute-rgt-in7.1%
associate-+r+7.1%
associate--l+7.1%
+-commutative7.1%
+-commutative7.1%
distribute-lft-out--7.4%
fma-def7.9%
+-commutative7.9%
fma-def8.1%
associate-+l+8.1%
+-commutative8.1%
Simplified8.1%
Taylor expanded in y around inf 74.6%
associate--l+74.6%
Simplified74.6%
Final simplification90.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ (- z b) (/ (+ y (+ x t)) y)))
(t_2 (+ t_1 (+ a (/ (* z x) t)))))
(if (<= t -2.45e-28)
t_2
(if (<= t 6e-131)
(+ (- z b) a)
(if (<= t 1.08e+110) (+ t_1 (+ z a)) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z - b) / ((y + (x + t)) / y);
double t_2 = t_1 + (a + ((z * x) / t));
double tmp;
if (t <= -2.45e-28) {
tmp = t_2;
} else if (t <= 6e-131) {
tmp = (z - b) + a;
} else if (t <= 1.08e+110) {
tmp = t_1 + (z + a);
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = (z - b) / ((y + (x + t)) / y)
t_2 = t_1 + (a + ((z * x) / t))
if (t <= (-2.45d-28)) then
tmp = t_2
else if (t <= 6d-131) then
tmp = (z - b) + a
else if (t <= 1.08d+110) then
tmp = t_1 + (z + a)
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z - b) / ((y + (x + t)) / y);
double t_2 = t_1 + (a + ((z * x) / t));
double tmp;
if (t <= -2.45e-28) {
tmp = t_2;
} else if (t <= 6e-131) {
tmp = (z - b) + a;
} else if (t <= 1.08e+110) {
tmp = t_1 + (z + a);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z - b) / ((y + (x + t)) / y) t_2 = t_1 + (a + ((z * x) / t)) tmp = 0 if t <= -2.45e-28: tmp = t_2 elif t <= 6e-131: tmp = (z - b) + a elif t <= 1.08e+110: tmp = t_1 + (z + a) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z - b) / Float64(Float64(y + Float64(x + t)) / y)) t_2 = Float64(t_1 + Float64(a + Float64(Float64(z * x) / t))) tmp = 0.0 if (t <= -2.45e-28) tmp = t_2; elseif (t <= 6e-131) tmp = Float64(Float64(z - b) + a); elseif (t <= 1.08e+110) tmp = Float64(t_1 + Float64(z + a)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z - b) / ((y + (x + t)) / y); t_2 = t_1 + (a + ((z * x) / t)); tmp = 0.0; if (t <= -2.45e-28) tmp = t_2; elseif (t <= 6e-131) tmp = (z - b) + a; elseif (t <= 1.08e+110) tmp = t_1 + (z + a); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z - b), $MachinePrecision] / N[(N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 + N[(a + N[(N[(z * x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.45e-28], t$95$2, If[LessEqual[t, 6e-131], N[(N[(z - b), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t, 1.08e+110], N[(t$95$1 + N[(z + a), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{z - b}{\frac{y + \left(x + t\right)}{y}}\\
t_2 := t_1 + \left(a + \frac{z \cdot x}{t}\right)\\
\mathbf{if}\;t \leq -2.45 \cdot 10^{-28}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 6 \cdot 10^{-131}:\\
\;\;\;\;\left(z - b\right) + a\\
\mathbf{elif}\;t \leq 1.08 \cdot 10^{+110}:\\
\;\;\;\;t_1 + \left(z + a\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if t < -2.45000000000000015e-28 or 1.08000000000000001e110 < t Initial program 60.9%
Simplified61.1%
Taylor expanded in a around 0 83.5%
associate-/l*94.2%
+-commutative94.2%
+-commutative94.2%
+-commutative94.2%
+-commutative94.2%
+-commutative94.2%
+-commutative94.2%
+-commutative94.2%
associate-/l*99.0%
+-commutative99.0%
+-commutative99.0%
Simplified99.0%
Taylor expanded in y around inf 94.2%
Taylor expanded in t around inf 86.3%
if -2.45000000000000015e-28 < t < 5.99999999999999992e-131Initial program 69.0%
*-commutative69.0%
distribute-rgt-in69.0%
associate-+r+69.0%
associate--l+69.0%
+-commutative69.0%
+-commutative69.0%
distribute-lft-out--69.2%
fma-def69.4%
+-commutative69.4%
fma-def69.4%
associate-+l+69.4%
+-commutative69.4%
Simplified69.4%
Taylor expanded in y around inf 74.3%
associate--l+74.3%
Simplified74.3%
if 5.99999999999999992e-131 < t < 1.08000000000000001e110Initial program 63.8%
Simplified63.9%
Taylor expanded in a around 0 70.3%
associate-/l*80.0%
+-commutative80.0%
+-commutative80.0%
+-commutative80.0%
+-commutative80.0%
+-commutative80.0%
+-commutative80.0%
+-commutative80.0%
associate-/l*100.0%
+-commutative100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in y around inf 85.1%
Taylor expanded in x around inf 70.4%
Final simplification79.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ a (/ (+ x (+ t y)) (+ t y)))))
(if (<= t -2.75e+153)
t_1
(if (<= t -1.96e+98)
(/ (* (- z b) y) (+ t y))
(if (<= t -3.9e+45)
(/ (+ (* z x) (* t a)) (+ x t))
(if (<= t 8.5e+175) (+ (- z b) a) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / ((x + (t + y)) / (t + y));
double tmp;
if (t <= -2.75e+153) {
tmp = t_1;
} else if (t <= -1.96e+98) {
tmp = ((z - b) * y) / (t + y);
} else if (t <= -3.9e+45) {
tmp = ((z * x) + (t * a)) / (x + t);
} else if (t <= 8.5e+175) {
tmp = (z - b) + a;
} 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 = a / ((x + (t + y)) / (t + y))
if (t <= (-2.75d+153)) then
tmp = t_1
else if (t <= (-1.96d+98)) then
tmp = ((z - b) * y) / (t + y)
else if (t <= (-3.9d+45)) then
tmp = ((z * x) + (t * a)) / (x + t)
else if (t <= 8.5d+175) then
tmp = (z - b) + a
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 = a / ((x + (t + y)) / (t + y));
double tmp;
if (t <= -2.75e+153) {
tmp = t_1;
} else if (t <= -1.96e+98) {
tmp = ((z - b) * y) / (t + y);
} else if (t <= -3.9e+45) {
tmp = ((z * x) + (t * a)) / (x + t);
} else if (t <= 8.5e+175) {
tmp = (z - b) + a;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / ((x + (t + y)) / (t + y)) tmp = 0 if t <= -2.75e+153: tmp = t_1 elif t <= -1.96e+98: tmp = ((z - b) * y) / (t + y) elif t <= -3.9e+45: tmp = ((z * x) + (t * a)) / (x + t) elif t <= 8.5e+175: tmp = (z - b) + a else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(Float64(x + Float64(t + y)) / Float64(t + y))) tmp = 0.0 if (t <= -2.75e+153) tmp = t_1; elseif (t <= -1.96e+98) tmp = Float64(Float64(Float64(z - b) * y) / Float64(t + y)); elseif (t <= -3.9e+45) tmp = Float64(Float64(Float64(z * x) + Float64(t * a)) / Float64(x + t)); elseif (t <= 8.5e+175) tmp = Float64(Float64(z - b) + a); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / ((x + (t + y)) / (t + y)); tmp = 0.0; if (t <= -2.75e+153) tmp = t_1; elseif (t <= -1.96e+98) tmp = ((z - b) * y) / (t + y); elseif (t <= -3.9e+45) tmp = ((z * x) + (t * a)) / (x + t); elseif (t <= 8.5e+175) tmp = (z - b) + a; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / N[(N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.75e+153], t$95$1, If[LessEqual[t, -1.96e+98], N[(N[(N[(z - b), $MachinePrecision] * y), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -3.9e+45], N[(N[(N[(z * x), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8.5e+175], N[(N[(z - b), $MachinePrecision] + a), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{\frac{x + \left(t + y\right)}{t + y}}\\
\mathbf{if}\;t \leq -2.75 \cdot 10^{+153}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.96 \cdot 10^{+98}:\\
\;\;\;\;\frac{\left(z - b\right) \cdot y}{t + y}\\
\mathbf{elif}\;t \leq -3.9 \cdot 10^{+45}:\\
\;\;\;\;\frac{z \cdot x + t \cdot a}{x + t}\\
\mathbf{elif}\;t \leq 8.5 \cdot 10^{+175}:\\
\;\;\;\;\left(z - b\right) + a\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if t < -2.7500000000000001e153 or 8.50000000000000034e175 < t Initial program 56.2%
*-commutative56.2%
distribute-rgt-in56.1%
associate-+r+56.1%
associate--l+56.1%
+-commutative56.1%
+-commutative56.1%
distribute-lft-out--56.1%
fma-def56.2%
+-commutative56.2%
fma-def56.4%
associate-+l+56.4%
+-commutative56.4%
Simplified56.4%
Taylor expanded in a around inf 40.0%
*-un-lft-identity40.0%
associate-/l*72.9%
+-commutative72.9%
+-commutative72.9%
associate-+l+72.9%
+-commutative72.9%
Applied egg-rr72.9%
if -2.7500000000000001e153 < t < -1.95999999999999986e98Initial program 71.9%
Taylor expanded in a around 0 72.9%
div-inv72.7%
*-commutative72.7%
+-commutative72.7%
*-commutative72.7%
associate-+l+72.7%
Applied egg-rr72.7%
Taylor expanded in x around 0 67.3%
distribute-lft-out--67.3%
Simplified67.3%
if -1.95999999999999986e98 < t < -3.8999999999999999e45Initial program 99.6%
*-commutative99.6%
distribute-rgt-in99.6%
associate-+r+99.6%
associate--l+99.6%
+-commutative99.6%
+-commutative99.6%
distribute-lft-out--99.6%
fma-def99.6%
+-commutative99.6%
fma-def99.6%
associate-+l+99.6%
+-commutative99.6%
Simplified99.6%
Taylor expanded in y around 0 75.1%
if -3.8999999999999999e45 < t < 8.50000000000000034e175Initial program 66.1%
*-commutative66.1%
distribute-rgt-in66.1%
associate-+r+66.1%
associate--l+66.1%
+-commutative66.1%
+-commutative66.1%
distribute-lft-out--66.2%
fma-def66.4%
+-commutative66.4%
fma-def66.5%
associate-+l+66.5%
+-commutative66.5%
Simplified66.5%
Taylor expanded in y around inf 69.6%
associate--l+69.6%
Simplified69.6%
Final simplification70.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))))
(if (<= x -4.8e+93)
(/ z (/ t_1 (+ x y)))
(if (<= x 2e+184)
(+ (/ (- z b) (/ t_1 y)) (+ z a))
(/ z (/ (+ x t) x))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if (x <= -4.8e+93) {
tmp = z / (t_1 / (x + y));
} else if (x <= 2e+184) {
tmp = ((z - b) / (t_1 / y)) + (z + a);
} else {
tmp = z / ((x + t) / 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) :: t_1
real(8) :: tmp
t_1 = y + (x + t)
if (x <= (-4.8d+93)) then
tmp = z / (t_1 / (x + y))
else if (x <= 2d+184) then
tmp = ((z - b) / (t_1 / y)) + (z + a)
else
tmp = z / ((x + t) / x)
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 = y + (x + t);
double tmp;
if (x <= -4.8e+93) {
tmp = z / (t_1 / (x + y));
} else if (x <= 2e+184) {
tmp = ((z - b) / (t_1 / y)) + (z + a);
} else {
tmp = z / ((x + t) / x);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) tmp = 0 if x <= -4.8e+93: tmp = z / (t_1 / (x + y)) elif x <= 2e+184: tmp = ((z - b) / (t_1 / y)) + (z + a) else: tmp = z / ((x + t) / x) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) tmp = 0.0 if (x <= -4.8e+93) tmp = Float64(z / Float64(t_1 / Float64(x + y))); elseif (x <= 2e+184) tmp = Float64(Float64(Float64(z - b) / Float64(t_1 / y)) + Float64(z + a)); else tmp = Float64(z / Float64(Float64(x + t) / x)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); tmp = 0.0; if (x <= -4.8e+93) tmp = z / (t_1 / (x + y)); elseif (x <= 2e+184) tmp = ((z - b) / (t_1 / y)) + (z + a); else tmp = z / ((x + t) / x); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.8e+93], N[(z / N[(t$95$1 / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 2e+184], N[(N[(N[(z - b), $MachinePrecision] / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] + N[(z + a), $MachinePrecision]), $MachinePrecision], N[(z / N[(N[(x + t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;x \leq -4.8 \cdot 10^{+93}:\\
\;\;\;\;\frac{z}{\frac{t_1}{x + y}}\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+184}:\\
\;\;\;\;\frac{z - b}{\frac{t_1}{y}} + \left(z + a\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{z}{\frac{x + t}{x}}\\
\end{array}
\end{array}
if x < -4.80000000000000021e93Initial program 57.2%
Taylor expanded in a around 0 50.3%
Taylor expanded in z around inf 43.1%
*-commutative43.1%
+-commutative43.1%
+-commutative43.1%
+-commutative43.1%
associate-+r+43.1%
associate-/l*74.9%
associate-+r+74.9%
+-commutative74.9%
+-commutative74.9%
+-commutative74.9%
Simplified74.9%
if -4.80000000000000021e93 < x < 2.00000000000000003e184Initial program 68.5%
Simplified68.8%
Taylor expanded in a around 0 81.4%
associate-/l*97.4%
+-commutative97.4%
+-commutative97.4%
+-commutative97.4%
+-commutative97.4%
+-commutative97.4%
+-commutative97.4%
+-commutative97.4%
associate-/l*99.4%
+-commutative99.4%
+-commutative99.4%
Simplified99.4%
Taylor expanded in y around inf 94.7%
Taylor expanded in x around inf 66.3%
if 2.00000000000000003e184 < x Initial program 44.3%
Taylor expanded in a around 0 40.6%
Taylor expanded in z around inf 37.1%
*-commutative37.1%
+-commutative37.1%
+-commutative37.1%
+-commutative37.1%
associate-+r+37.1%
associate-/l*80.2%
associate-+r+80.2%
+-commutative80.2%
+-commutative80.2%
+-commutative80.2%
Simplified80.2%
Taylor expanded in y around 0 37.1%
associate-/l*80.2%
Simplified80.2%
Final simplification68.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= x -5e+93) (not (<= x 1.9e+148))) (/ z (/ (+ y (+ x t)) (+ x y))) (+ (- z b) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -5e+93) || !(x <= 1.9e+148)) {
tmp = z / ((y + (x + t)) / (x + y));
} else {
tmp = (z - b) + 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 ((x <= (-5d+93)) .or. (.not. (x <= 1.9d+148))) then
tmp = z / ((y + (x + t)) / (x + y))
else
tmp = (z - b) + 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 ((x <= -5e+93) || !(x <= 1.9e+148)) {
tmp = z / ((y + (x + t)) / (x + y));
} else {
tmp = (z - b) + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x <= -5e+93) or not (x <= 1.9e+148): tmp = z / ((y + (x + t)) / (x + y)) else: tmp = (z - b) + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -5e+93) || !(x <= 1.9e+148)) tmp = Float64(z / Float64(Float64(y + Float64(x + t)) / Float64(x + y))); else tmp = Float64(Float64(z - b) + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x <= -5e+93) || ~((x <= 1.9e+148))) tmp = z / ((y + (x + t)) / (x + y)); else tmp = (z - b) + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -5e+93], N[Not[LessEqual[x, 1.9e+148]], $MachinePrecision]], N[(z / N[(N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z - b), $MachinePrecision] + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{+93} \lor \neg \left(x \leq 1.9 \cdot 10^{+148}\right):\\
\;\;\;\;\frac{z}{\frac{y + \left(x + t\right)}{x + y}}\\
\mathbf{else}:\\
\;\;\;\;\left(z - b\right) + a\\
\end{array}
\end{array}
if x < -5.0000000000000001e93 or 1.8999999999999999e148 < x Initial program 53.0%
Taylor expanded in a around 0 46.3%
Taylor expanded in z around inf 39.5%
*-commutative39.5%
+-commutative39.5%
+-commutative39.5%
+-commutative39.5%
associate-+r+39.5%
associate-/l*74.4%
associate-+r+74.4%
+-commutative74.4%
+-commutative74.4%
+-commutative74.4%
Simplified74.4%
if -5.0000000000000001e93 < x < 1.8999999999999999e148Initial program 68.6%
*-commutative68.6%
distribute-rgt-in68.6%
associate-+r+68.6%
associate--l+68.6%
+-commutative68.6%
+-commutative68.6%
distribute-lft-out--68.6%
fma-def68.7%
+-commutative68.7%
fma-def68.8%
associate-+l+68.8%
+-commutative68.8%
Simplified68.8%
Taylor expanded in y around inf 64.7%
associate--l+64.7%
Simplified64.7%
Final simplification67.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= t -1.52e+173)
a
(if (<= t -2.9e-224)
(+ z a)
(if (<= t 2.1e-252) (- z b) (if (<= t 2.6e+187) (+ z a) a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.52e+173) {
tmp = a;
} else if (t <= -2.9e-224) {
tmp = z + a;
} else if (t <= 2.1e-252) {
tmp = z - b;
} else if (t <= 2.6e+187) {
tmp = z + a;
} else {
tmp = 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 (t <= (-1.52d+173)) then
tmp = a
else if (t <= (-2.9d-224)) then
tmp = z + a
else if (t <= 2.1d-252) then
tmp = z - b
else if (t <= 2.6d+187) then
tmp = z + a
else
tmp = 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 (t <= -1.52e+173) {
tmp = a;
} else if (t <= -2.9e-224) {
tmp = z + a;
} else if (t <= 2.1e-252) {
tmp = z - b;
} else if (t <= 2.6e+187) {
tmp = z + a;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.52e+173: tmp = a elif t <= -2.9e-224: tmp = z + a elif t <= 2.1e-252: tmp = z - b elif t <= 2.6e+187: tmp = z + a else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.52e+173) tmp = a; elseif (t <= -2.9e-224) tmp = Float64(z + a); elseif (t <= 2.1e-252) tmp = Float64(z - b); elseif (t <= 2.6e+187) tmp = Float64(z + a); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.52e+173) tmp = a; elseif (t <= -2.9e-224) tmp = z + a; elseif (t <= 2.1e-252) tmp = z - b; elseif (t <= 2.6e+187) tmp = z + a; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.52e+173], a, If[LessEqual[t, -2.9e-224], N[(z + a), $MachinePrecision], If[LessEqual[t, 2.1e-252], N[(z - b), $MachinePrecision], If[LessEqual[t, 2.6e+187], N[(z + a), $MachinePrecision], a]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.52 \cdot 10^{+173}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq -2.9 \cdot 10^{-224}:\\
\;\;\;\;z + a\\
\mathbf{elif}\;t \leq 2.1 \cdot 10^{-252}:\\
\;\;\;\;z - b\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+187}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -1.51999999999999988e173 or 2.5999999999999999e187 < t Initial program 55.7%
*-commutative55.7%
distribute-rgt-in55.6%
associate-+r+55.6%
associate--l+55.6%
+-commutative55.6%
+-commutative55.6%
distribute-lft-out--55.6%
fma-def55.8%
+-commutative55.8%
fma-def55.9%
associate-+l+55.9%
+-commutative55.9%
Simplified55.9%
Taylor expanded in t around inf 71.6%
if -1.51999999999999988e173 < t < -2.9e-224 or 2.1e-252 < t < 2.5999999999999999e187Initial program 69.6%
*-commutative69.6%
distribute-rgt-in69.6%
associate-+r+69.6%
associate--l+69.6%
+-commutative69.6%
+-commutative69.6%
distribute-lft-out--69.6%
fma-def69.8%
+-commutative69.8%
fma-def69.8%
associate-+l+69.8%
+-commutative69.8%
Simplified69.8%
Taylor expanded in y around inf 63.6%
associate--l+63.6%
Simplified63.6%
Taylor expanded in b around 0 58.2%
+-commutative58.2%
Simplified58.2%
if -2.9e-224 < t < 2.1e-252Initial program 53.9%
Taylor expanded in a around 0 48.3%
div-inv48.1%
*-commutative48.1%
+-commutative48.1%
*-commutative48.1%
associate-+l+48.1%
Applied egg-rr48.1%
Taylor expanded in y around inf 84.6%
Final simplification64.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= x -3.6e+93) (not (<= x 6.8e+146))) (/ z (/ (+ x t) x)) (+ (- z b) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -3.6e+93) || !(x <= 6.8e+146)) {
tmp = z / ((x + t) / x);
} else {
tmp = (z - b) + 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 ((x <= (-3.6d+93)) .or. (.not. (x <= 6.8d+146))) then
tmp = z / ((x + t) / x)
else
tmp = (z - b) + 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 ((x <= -3.6e+93) || !(x <= 6.8e+146)) {
tmp = z / ((x + t) / x);
} else {
tmp = (z - b) + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x <= -3.6e+93) or not (x <= 6.8e+146): tmp = z / ((x + t) / x) else: tmp = (z - b) + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -3.6e+93) || !(x <= 6.8e+146)) tmp = Float64(z / Float64(Float64(x + t) / x)); else tmp = Float64(Float64(z - b) + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((x <= -3.6e+93) || ~((x <= 6.8e+146))) tmp = z / ((x + t) / x); else tmp = (z - b) + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -3.6e+93], N[Not[LessEqual[x, 6.8e+146]], $MachinePrecision]], N[(z / N[(N[(x + t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(z - b), $MachinePrecision] + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.6 \cdot 10^{+93} \lor \neg \left(x \leq 6.8 \cdot 10^{+146}\right):\\
\;\;\;\;\frac{z}{\frac{x + t}{x}}\\
\mathbf{else}:\\
\;\;\;\;\left(z - b\right) + a\\
\end{array}
\end{array}
if x < -3.5999999999999999e93 or 6.79999999999999981e146 < x Initial program 53.0%
Taylor expanded in a around 0 46.3%
Taylor expanded in z around inf 39.5%
*-commutative39.5%
+-commutative39.5%
+-commutative39.5%
+-commutative39.5%
associate-+r+39.5%
associate-/l*74.4%
associate-+r+74.4%
+-commutative74.4%
+-commutative74.4%
+-commutative74.4%
Simplified74.4%
Taylor expanded in y around 0 39.5%
associate-/l*73.0%
Simplified73.0%
if -3.5999999999999999e93 < x < 6.79999999999999981e146Initial program 68.6%
*-commutative68.6%
distribute-rgt-in68.6%
associate-+r+68.6%
associate--l+68.6%
+-commutative68.6%
+-commutative68.6%
distribute-lft-out--68.6%
fma-def68.7%
+-commutative68.7%
fma-def68.8%
associate-+l+68.8%
+-commutative68.8%
Simplified68.8%
Taylor expanded in y around inf 64.7%
associate--l+64.7%
Simplified64.7%
Final simplification66.9%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.08e+172) a (if (<= t 1.35e+174) (+ (- z b) a) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.08e+172) {
tmp = a;
} else if (t <= 1.35e+174) {
tmp = (z - b) + a;
} else {
tmp = 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 (t <= (-1.08d+172)) then
tmp = a
else if (t <= 1.35d+174) then
tmp = (z - b) + a
else
tmp = 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 (t <= -1.08e+172) {
tmp = a;
} else if (t <= 1.35e+174) {
tmp = (z - b) + a;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.08e+172: tmp = a elif t <= 1.35e+174: tmp = (z - b) + a else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.08e+172) tmp = a; elseif (t <= 1.35e+174) tmp = Float64(Float64(z - b) + a); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.08e+172) tmp = a; elseif (t <= 1.35e+174) tmp = (z - b) + a; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.08e+172], a, If[LessEqual[t, 1.35e+174], N[(N[(z - b), $MachinePrecision] + a), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.08 \cdot 10^{+172}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{+174}:\\
\;\;\;\;\left(z - b\right) + a\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -1.0799999999999999e172 or 1.35e174 < t Initial program 56.3%
*-commutative56.3%
distribute-rgt-in56.2%
associate-+r+56.2%
associate--l+56.2%
+-commutative56.2%
+-commutative56.2%
distribute-lft-out--56.2%
fma-def56.3%
+-commutative56.3%
fma-def56.5%
associate-+l+56.5%
+-commutative56.5%
Simplified56.5%
Taylor expanded in t around inf 70.2%
if -1.0799999999999999e172 < t < 1.35e174Initial program 67.5%
*-commutative67.5%
distribute-rgt-in67.5%
associate-+r+67.5%
associate--l+67.5%
+-commutative67.5%
+-commutative67.5%
distribute-lft-out--67.6%
fma-def67.8%
+-commutative67.8%
fma-def67.8%
associate-+l+67.8%
+-commutative67.8%
Simplified67.8%
Taylor expanded in y around inf 66.5%
associate--l+66.5%
Simplified66.5%
Final simplification67.5%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.22e+171) a (if (<= t 2.55e+188) (+ z a) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.22e+171) {
tmp = a;
} else if (t <= 2.55e+188) {
tmp = z + a;
} else {
tmp = 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 (t <= (-1.22d+171)) then
tmp = a
else if (t <= 2.55d+188) then
tmp = z + a
else
tmp = 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 (t <= -1.22e+171) {
tmp = a;
} else if (t <= 2.55e+188) {
tmp = z + a;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.22e+171: tmp = a elif t <= 2.55e+188: tmp = z + a else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.22e+171) tmp = a; elseif (t <= 2.55e+188) tmp = Float64(z + a); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.22e+171) tmp = a; elseif (t <= 2.55e+188) tmp = z + a; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.22e+171], a, If[LessEqual[t, 2.55e+188], N[(z + a), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.22 \cdot 10^{+171}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq 2.55 \cdot 10^{+188}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -1.2200000000000001e171 or 2.5500000000000001e188 < t Initial program 55.7%
*-commutative55.7%
distribute-rgt-in55.6%
associate-+r+55.6%
associate--l+55.6%
+-commutative55.6%
+-commutative55.6%
distribute-lft-out--55.6%
fma-def55.8%
+-commutative55.8%
fma-def55.9%
associate-+l+55.9%
+-commutative55.9%
Simplified55.9%
Taylor expanded in t around inf 71.6%
if -1.2200000000000001e171 < t < 2.5500000000000001e188Initial program 67.5%
*-commutative67.5%
distribute-rgt-in67.5%
associate-+r+67.5%
associate--l+67.5%
+-commutative67.5%
+-commutative67.5%
distribute-lft-out--67.6%
fma-def67.8%
+-commutative67.8%
fma-def67.8%
associate-+l+67.8%
+-commutative67.8%
Simplified67.8%
Taylor expanded in y around inf 66.1%
associate--l+66.1%
Simplified66.1%
Taylor expanded in b around 0 57.0%
+-commutative57.0%
Simplified57.0%
Final simplification60.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t -2.95e-28) a (if (<= t 2.2e+133) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -2.95e-28) {
tmp = a;
} else if (t <= 2.2e+133) {
tmp = z;
} else {
tmp = 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 (t <= (-2.95d-28)) then
tmp = a
else if (t <= 2.2d+133) then
tmp = z
else
tmp = 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 (t <= -2.95e-28) {
tmp = a;
} else if (t <= 2.2e+133) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -2.95e-28: tmp = a elif t <= 2.2e+133: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -2.95e-28) tmp = a; elseif (t <= 2.2e+133) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -2.95e-28) tmp = a; elseif (t <= 2.2e+133) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -2.95e-28], a, If[LessEqual[t, 2.2e+133], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.95 \cdot 10^{-28}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{+133}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -2.9500000000000001e-28 or 2.2e133 < t Initial program 60.5%
*-commutative60.5%
distribute-rgt-in60.4%
associate-+r+60.4%
associate--l+60.4%
+-commutative60.4%
+-commutative60.4%
distribute-lft-out--60.4%
fma-def60.7%
+-commutative60.7%
fma-def60.8%
associate-+l+60.8%
+-commutative60.8%
Simplified60.8%
Taylor expanded in t around inf 57.1%
if -2.9500000000000001e-28 < t < 2.2e133Initial program 67.5%
*-commutative67.5%
distribute-rgt-in67.5%
associate-+r+67.5%
associate--l+67.5%
+-commutative67.5%
+-commutative67.5%
distribute-lft-out--67.6%
fma-def67.8%
+-commutative67.8%
fma-def67.8%
associate-+l+67.8%
+-commutative67.8%
Simplified67.8%
Taylor expanded in x around inf 51.2%
Final simplification53.7%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return 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 = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 64.5%
*-commutative64.5%
distribute-rgt-in64.5%
associate-+r+64.5%
associate--l+64.5%
+-commutative64.5%
+-commutative64.5%
distribute-lft-out--64.6%
fma-def64.8%
+-commutative64.8%
fma-def64.8%
associate-+l+64.8%
+-commutative64.8%
Simplified64.8%
Taylor expanded in t around inf 37.3%
Final simplification37.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x t) y))
(t_2 (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))
(t_3 (/ t_2 t_1))
(t_4 (- (+ z a) b)))
(if (< t_3 -3.5813117084150564e+153)
t_4
(if (< t_3 1.2285964308315609e+82) (/ 1.0 (/ t_1 t_2)) t_4))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (x + t) + y
t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
t_3 = t_2 / t_1
t_4 = (z + a) - b
if (t_3 < (-3.5813117084150564d+153)) then
tmp = t_4
else if (t_3 < 1.2285964308315609d+82) then
tmp = 1.0d0 / (t_1 / t_2)
else
tmp = t_4
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 + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + t) + y t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b) t_3 = t_2 / t_1 t_4 = (z + a) - b tmp = 0 if t_3 < -3.5813117084150564e+153: tmp = t_4 elif t_3 < 1.2285964308315609e+82: tmp = 1.0 / (t_1 / t_2) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + t) + y) t_2 = Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) t_3 = Float64(t_2 / t_1) t_4 = Float64(Float64(z + a) - b) tmp = 0.0 if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = Float64(1.0 / Float64(t_1 / t_2)); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + t) + y; t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b); t_3 = t_2 / t_1; t_4 = (z + a) - b; tmp = 0.0; if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = 1.0 / (t_1 / t_2); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[Less[t$95$3, -3.5813117084150564e+153], t$95$4, If[Less[t$95$3, 1.2285964308315609e+82], N[(1.0 / N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\
t_3 := \frac{t_2}{t_1}\\
t_4 := \left(z + a\right) - b\\
\mathbf{if}\;t_3 < -3.5813117084150564 \cdot 10^{+153}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_3 < 1.2285964308315609 \cdot 10^{+82}:\\
\;\;\;\;\frac{1}{\frac{t_1}{t_2}}\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
herbie shell --seed 2023215
(FPCore (x y z t a b)
:name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
:precision binary64
:herbie-target
(if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3.5813117084150564e+153) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 1.2285964308315609e+82) (/ 1.0 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b)))
(/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))