
(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 17 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)))
(t_2 (/ (+ x y) y))
(t_3 (/ (- (+ (* z (+ x y)) (* (+ y t) a)) (* y b)) t_1))
(t_4 (/ (pow (+ x y) 2.0) y)))
(if (<= t_3 -5e+278)
(+ (* a (+ (/ y t_1) (/ t t_1))) (/ z (/ (+ t (+ x y)) (+ x y))))
(if (<= t_3 1e+263)
t_3
(+
(- z (/ b t_2))
(fma
t
(+ (/ a (+ x y)) (- (/ b t_4) (+ (/ z (+ x y)) (/ a t_4))))
(/ a t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = (x + y) / y;
double t_3 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / t_1;
double t_4 = pow((x + y), 2.0) / y;
double tmp;
if (t_3 <= -5e+278) {
tmp = (a * ((y / t_1) + (t / t_1))) + (z / ((t + (x + y)) / (x + y)));
} else if (t_3 <= 1e+263) {
tmp = t_3;
} else {
tmp = (z - (b / t_2)) + fma(t, ((a / (x + y)) + ((b / t_4) - ((z / (x + y)) + (a / t_4)))), (a / t_2));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(x + y) / y) t_3 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + Float64(Float64(y + t) * a)) - Float64(y * b)) / t_1) t_4 = Float64((Float64(x + y) ^ 2.0) / y) tmp = 0.0 if (t_3 <= -5e+278) tmp = Float64(Float64(a * Float64(Float64(y / t_1) + Float64(t / t_1))) + Float64(z / Float64(Float64(t + Float64(x + y)) / Float64(x + y)))); elseif (t_3 <= 1e+263) tmp = t_3; else tmp = Float64(Float64(z - Float64(b / t_2)) + fma(t, Float64(Float64(a / Float64(x + y)) + Float64(Float64(b / t_4) - Float64(Float64(z / Float64(x + y)) + Float64(a / t_4)))), Float64(a / t_2))); end return 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[(N[(x + y), $MachinePrecision] / y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[Power[N[(x + y), $MachinePrecision], 2.0], $MachinePrecision] / y), $MachinePrecision]}, If[LessEqual[t$95$3, -5e+278], N[(N[(a * N[(N[(y / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / N[(N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+263], t$95$3, N[(N[(z - N[(b / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(a / N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(N[(b / t$95$4), $MachinePrecision] - N[(N[(z / N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(a / t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{x + y}{y}\\
t_3 := \frac{\left(z \cdot \left(x + y\right) + \left(y + t\right) \cdot a\right) - y \cdot b}{t_1}\\
t_4 := \frac{{\left(x + y\right)}^{2}}{y}\\
\mathbf{if}\;t_3 \leq -5 \cdot 10^{+278}:\\
\;\;\;\;a \cdot \left(\frac{y}{t_1} + \frac{t}{t_1}\right) + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\
\mathbf{elif}\;t_3 \leq 10^{+263}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;\left(z - \frac{b}{t_2}\right) + \mathsf{fma}\left(t, \frac{a}{x + y} + \left(\frac{b}{t_4} - \left(\frac{z}{x + y} + \frac{a}{t_4}\right)\right), \frac{a}{t_2}\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)) < -5.00000000000000029e278Initial program 8.5%
Taylor expanded in a around 0 50.1%
associate--l+50.1%
+-commutative50.1%
associate-+r+50.1%
associate-+r+50.1%
div-sub50.1%
+-commutative50.1%
*-commutative50.1%
associate-+r+50.1%
Simplified50.1%
Taylor expanded in z around inf 49.5%
associate-/l*78.9%
+-commutative78.9%
+-commutative78.9%
Simplified78.9%
if -5.00000000000000029e278 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.00000000000000002e263Initial program 99.6%
if 1.00000000000000002e263 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 8.0%
associate--l+8.0%
fma-define8.9%
cancel-sign-sub-inv8.9%
fma-define9.3%
+-commutative9.3%
distribute-lft-neg-out9.3%
distribute-rgt-neg-out9.3%
associate-+l+9.3%
+-commutative9.3%
Simplified9.3%
Taylor expanded in t around 0 29.9%
associate-+r+29.9%
mul-1-neg29.9%
unsub-neg29.9%
associate-/l*30.0%
+-commutative30.0%
fma-define30.0%
Simplified83.5%
Final simplification92.5%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (- (+ (* z (+ x y)) (* (+ y t) a)) (* y b)) (+ y (+ x t))))) (if (or (<= t_1 -5e+278) (not (<= t_1 5e+269))) (- (+ z a) b) t_1)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -5e+278) || !(t_1 <= 5e+269)) {
tmp = (z + a) - 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 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / (y + (x + t))
if ((t_1 <= (-5d+278)) .or. (.not. (t_1 <= 5d+269))) then
tmp = (z + a) - 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 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -5e+278) || !(t_1 <= 5e+269)) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / (y + (x + t)) tmp = 0 if (t_1 <= -5e+278) or not (t_1 <= 5e+269): tmp = (z + a) - b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + Float64(Float64(y + t) * a)) - Float64(y * b)) / Float64(y + Float64(x + t))) tmp = 0.0 if ((t_1 <= -5e+278) || !(t_1 <= 5e+269)) tmp = Float64(Float64(z + a) - b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / (y + (x + t)); tmp = 0.0; if ((t_1 <= -5e+278) || ~((t_1 <= 5e+269))) tmp = (z + a) - b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e+278], N[Not[LessEqual[t$95$1, 5e+269]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(z \cdot \left(x + y\right) + \left(y + t\right) \cdot a\right) - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{if}\;t_1 \leq -5 \cdot 10^{+278} \lor \neg \left(t_1 \leq 5 \cdot 10^{+269}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\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)) < -5.00000000000000029e278 or 5.0000000000000002e269 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 6.4%
Taylor expanded in y around inf 78.9%
if -5.00000000000000029e278 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.0000000000000002e269Initial program 99.6%
Final simplification91.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ (- (+ (* z (+ x y)) (* (+ y t) a)) (* y b)) t_1)))
(if (<= t_2 -5e+278)
(+ (* a (+ (/ y t_1) (/ t t_1))) (/ z (/ (+ t (+ x y)) (+ x y))))
(if (<= t_2 5e+269) t_2 (- (+ z a) b)))))
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)) + ((y + t) * a)) - (y * b)) / t_1;
double tmp;
if (t_2 <= -5e+278) {
tmp = (a * ((y / t_1) + (t / t_1))) + (z / ((t + (x + y)) / (x + y)));
} else if (t_2 <= 5e+269) {
tmp = t_2;
} else {
tmp = (z + a) - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (x + t)
t_2 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / t_1
if (t_2 <= (-5d+278)) then
tmp = (a * ((y / t_1) + (t / t_1))) + (z / ((t + (x + y)) / (x + y)))
else if (t_2 <= 5d+269) then
tmp = t_2
else
tmp = (z + a) - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / t_1;
double tmp;
if (t_2 <= -5e+278) {
tmp = (a * ((y / t_1) + (t / t_1))) + (z / ((t + (x + y)) / (x + y)));
} else if (t_2 <= 5e+269) {
tmp = t_2;
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / t_1 tmp = 0 if t_2 <= -5e+278: tmp = (a * ((y / t_1) + (t / t_1))) + (z / ((t + (x + y)) / (x + y))) elif t_2 <= 5e+269: tmp = t_2 else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + Float64(Float64(y + t) * a)) - Float64(y * b)) / t_1) tmp = 0.0 if (t_2 <= -5e+278) tmp = Float64(Float64(a * Float64(Float64(y / t_1) + Float64(t / t_1))) + Float64(z / Float64(Float64(t + Float64(x + y)) / Float64(x + y)))); elseif (t_2 <= 5e+269) tmp = t_2; else tmp = Float64(Float64(z + a) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = (((z * (x + y)) + ((y + t) * a)) - (y * b)) / t_1; tmp = 0.0; if (t_2 <= -5e+278) tmp = (a * ((y / t_1) + (t / t_1))) + (z / ((t + (x + y)) / (x + y))); elseif (t_2 <= 5e+269) tmp = t_2; else tmp = (z + a) - b; 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[(N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+278], N[(N[(a * N[(N[(y / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z / N[(N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e+269], t$95$2, N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{\left(z \cdot \left(x + y\right) + \left(y + t\right) \cdot a\right) - y \cdot b}{t_1}\\
\mathbf{if}\;t_2 \leq -5 \cdot 10^{+278}:\\
\;\;\;\;a \cdot \left(\frac{y}{t_1} + \frac{t}{t_1}\right) + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\
\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+269}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\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)) < -5.00000000000000029e278Initial program 8.5%
Taylor expanded in a around 0 50.1%
associate--l+50.1%
+-commutative50.1%
associate-+r+50.1%
associate-+r+50.1%
div-sub50.1%
+-commutative50.1%
*-commutative50.1%
associate-+r+50.1%
Simplified50.1%
Taylor expanded in z around inf 49.5%
associate-/l*78.9%
+-commutative78.9%
+-commutative78.9%
Simplified78.9%
if -5.00000000000000029e278 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 5.0000000000000002e269Initial program 99.6%
if 5.0000000000000002e269 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 4.6%
Taylor expanded in y around inf 79.0%
Final simplification91.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (+ a (/ z (/ (+ t (+ x y)) (+ x y)))))
(t_3 (- (+ z a) b)))
(if (<= y -3.8e+155)
t_3
(if (<= y -0.00062)
t_2
(if (<= y -1.8e-144)
(/ (+ (* x z) (* y (- z b))) t_1)
(if (<= y 3.05e-304)
t_2
(if (<= y 1.25e-198)
(/ (+ (* t a) (* x z)) (+ x t))
(if (<= y 5.7e-154)
(- a (/ (* y b) t))
(if (<= y 1.72e-128)
(/ (- (* x z) (* y b)) t_1)
(if (<= y 11000000000.0) t_2 t_3))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = a + (z / ((t + (x + y)) / (x + y)));
double t_3 = (z + a) - b;
double tmp;
if (y <= -3.8e+155) {
tmp = t_3;
} else if (y <= -0.00062) {
tmp = t_2;
} else if (y <= -1.8e-144) {
tmp = ((x * z) + (y * (z - b))) / t_1;
} else if (y <= 3.05e-304) {
tmp = t_2;
} else if (y <= 1.25e-198) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 5.7e-154) {
tmp = a - ((y * b) / t);
} else if (y <= 1.72e-128) {
tmp = ((x * z) - (y * b)) / t_1;
} else if (y <= 11000000000.0) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y + (x + t)
t_2 = a + (z / ((t + (x + y)) / (x + y)))
t_3 = (z + a) - b
if (y <= (-3.8d+155)) then
tmp = t_3
else if (y <= (-0.00062d0)) then
tmp = t_2
else if (y <= (-1.8d-144)) then
tmp = ((x * z) + (y * (z - b))) / t_1
else if (y <= 3.05d-304) then
tmp = t_2
else if (y <= 1.25d-198) then
tmp = ((t * a) + (x * z)) / (x + t)
else if (y <= 5.7d-154) then
tmp = a - ((y * b) / t)
else if (y <= 1.72d-128) then
tmp = ((x * z) - (y * b)) / t_1
else if (y <= 11000000000.0d0) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = a + (z / ((t + (x + y)) / (x + y)));
double t_3 = (z + a) - b;
double tmp;
if (y <= -3.8e+155) {
tmp = t_3;
} else if (y <= -0.00062) {
tmp = t_2;
} else if (y <= -1.8e-144) {
tmp = ((x * z) + (y * (z - b))) / t_1;
} else if (y <= 3.05e-304) {
tmp = t_2;
} else if (y <= 1.25e-198) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 5.7e-154) {
tmp = a - ((y * b) / t);
} else if (y <= 1.72e-128) {
tmp = ((x * z) - (y * b)) / t_1;
} else if (y <= 11000000000.0) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = a + (z / ((t + (x + y)) / (x + y))) t_3 = (z + a) - b tmp = 0 if y <= -3.8e+155: tmp = t_3 elif y <= -0.00062: tmp = t_2 elif y <= -1.8e-144: tmp = ((x * z) + (y * (z - b))) / t_1 elif y <= 3.05e-304: tmp = t_2 elif y <= 1.25e-198: tmp = ((t * a) + (x * z)) / (x + t) elif y <= 5.7e-154: tmp = a - ((y * b) / t) elif y <= 1.72e-128: tmp = ((x * z) - (y * b)) / t_1 elif y <= 11000000000.0: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(a + Float64(z / Float64(Float64(t + Float64(x + y)) / Float64(x + y)))) t_3 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -3.8e+155) tmp = t_3; elseif (y <= -0.00062) tmp = t_2; elseif (y <= -1.8e-144) tmp = Float64(Float64(Float64(x * z) + Float64(y * Float64(z - b))) / t_1); elseif (y <= 3.05e-304) tmp = t_2; elseif (y <= 1.25e-198) tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t)); elseif (y <= 5.7e-154) tmp = Float64(a - Float64(Float64(y * b) / t)); elseif (y <= 1.72e-128) tmp = Float64(Float64(Float64(x * z) - Float64(y * b)) / t_1); elseif (y <= 11000000000.0) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = a + (z / ((t + (x + y)) / (x + y))); t_3 = (z + a) - b; tmp = 0.0; if (y <= -3.8e+155) tmp = t_3; elseif (y <= -0.00062) tmp = t_2; elseif (y <= -1.8e-144) tmp = ((x * z) + (y * (z - b))) / t_1; elseif (y <= 3.05e-304) tmp = t_2; elseif (y <= 1.25e-198) tmp = ((t * a) + (x * z)) / (x + t); elseif (y <= 5.7e-154) tmp = a - ((y * b) / t); elseif (y <= 1.72e-128) tmp = ((x * z) - (y * b)) / t_1; elseif (y <= 11000000000.0) tmp = t_2; else tmp = t_3; 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[(a + N[(z / N[(N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -3.8e+155], t$95$3, If[LessEqual[y, -0.00062], t$95$2, If[LessEqual[y, -1.8e-144], N[(N[(N[(x * z), $MachinePrecision] + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 3.05e-304], t$95$2, If[LessEqual[y, 1.25e-198], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.7e-154], N[(a - N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.72e-128], N[(N[(N[(x * z), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, 11000000000.0], t$95$2, t$95$3]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := a + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\
t_3 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -3.8 \cdot 10^{+155}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq -0.00062:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.8 \cdot 10^{-144}:\\
\;\;\;\;\frac{x \cdot z + y \cdot \left(z - b\right)}{t_1}\\
\mathbf{elif}\;y \leq 3.05 \cdot 10^{-304}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 1.25 \cdot 10^{-198}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\
\mathbf{elif}\;y \leq 5.7 \cdot 10^{-154}:\\
\;\;\;\;a - \frac{y \cdot b}{t}\\
\mathbf{elif}\;y \leq 1.72 \cdot 10^{-128}:\\
\;\;\;\;\frac{x \cdot z - y \cdot b}{t_1}\\
\mathbf{elif}\;y \leq 11000000000:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y < -3.8000000000000001e155 or 1.1e10 < y Initial program 37.8%
Taylor expanded in y around inf 87.0%
if -3.8000000000000001e155 < y < -6.2e-4 or -1.8e-144 < y < 3.0500000000000002e-304 or 1.71999999999999992e-128 < y < 1.1e10Initial program 72.4%
Taylor expanded in a around 0 82.7%
associate--l+82.7%
+-commutative82.7%
associate-+r+82.7%
associate-+r+82.7%
div-sub82.7%
+-commutative82.7%
*-commutative82.7%
associate-+r+82.7%
Simplified82.7%
Taylor expanded in z around inf 73.0%
associate-/l*86.3%
+-commutative86.3%
+-commutative86.3%
Simplified86.3%
Taylor expanded in y around inf 75.5%
if -6.2e-4 < y < -1.8e-144Initial program 86.1%
Taylor expanded in a around 0 72.8%
+-commutative72.8%
*-commutative72.8%
Simplified72.8%
Taylor expanded in y around 0 72.8%
if 3.0500000000000002e-304 < y < 1.25e-198Initial program 87.1%
Taylor expanded in y around 0 83.8%
if 1.25e-198 < y < 5.6999999999999998e-154Initial program 53.0%
Taylor expanded in z around 0 53.0%
*-commutative53.0%
Simplified53.0%
Taylor expanded in x around 0 53.0%
Taylor expanded in t around inf 99.7%
associate-*r/99.7%
associate-*r*99.7%
neg-mul-199.7%
*-commutative99.7%
Simplified99.7%
if 5.6999999999999998e-154 < y < 1.71999999999999992e-128Initial program 99.4%
Taylor expanded in a around 0 80.1%
+-commutative80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in y around 0 80.1%
*-commutative80.1%
Simplified80.1%
Final simplification80.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (/ z (/ (+ t (+ x y)) (+ x y))))) (t_2 (- (+ z a) b)))
(if (<= y -3.5e+155)
t_2
(if (<= y 5.5e-305)
t_1
(if (<= y 4.6e-198)
(/ (+ (* t a) (* x z)) (+ x t))
(if (<= y 4.1e-153)
(- a (/ (* y b) t))
(if (<= y 1.95e-128)
(/ (- (* x z) (* y b)) (+ y (+ x t)))
(if (<= y 48000000000.0) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (z / ((t + (x + y)) / (x + y)));
double t_2 = (z + a) - b;
double tmp;
if (y <= -3.5e+155) {
tmp = t_2;
} else if (y <= 5.5e-305) {
tmp = t_1;
} else if (y <= 4.6e-198) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 4.1e-153) {
tmp = a - ((y * b) / t);
} else if (y <= 1.95e-128) {
tmp = ((x * z) - (y * b)) / (y + (x + t));
} else if (y <= 48000000000.0) {
tmp = t_1;
} 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 = a + (z / ((t + (x + y)) / (x + y)))
t_2 = (z + a) - b
if (y <= (-3.5d+155)) then
tmp = t_2
else if (y <= 5.5d-305) then
tmp = t_1
else if (y <= 4.6d-198) then
tmp = ((t * a) + (x * z)) / (x + t)
else if (y <= 4.1d-153) then
tmp = a - ((y * b) / t)
else if (y <= 1.95d-128) then
tmp = ((x * z) - (y * b)) / (y + (x + t))
else if (y <= 48000000000.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (z / ((t + (x + y)) / (x + y)));
double t_2 = (z + a) - b;
double tmp;
if (y <= -3.5e+155) {
tmp = t_2;
} else if (y <= 5.5e-305) {
tmp = t_1;
} else if (y <= 4.6e-198) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 4.1e-153) {
tmp = a - ((y * b) / t);
} else if (y <= 1.95e-128) {
tmp = ((x * z) - (y * b)) / (y + (x + t));
} else if (y <= 48000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a + (z / ((t + (x + y)) / (x + y))) t_2 = (z + a) - b tmp = 0 if y <= -3.5e+155: tmp = t_2 elif y <= 5.5e-305: tmp = t_1 elif y <= 4.6e-198: tmp = ((t * a) + (x * z)) / (x + t) elif y <= 4.1e-153: tmp = a - ((y * b) / t) elif y <= 1.95e-128: tmp = ((x * z) - (y * b)) / (y + (x + t)) elif y <= 48000000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a + Float64(z / Float64(Float64(t + Float64(x + y)) / Float64(x + y)))) t_2 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -3.5e+155) tmp = t_2; elseif (y <= 5.5e-305) tmp = t_1; elseif (y <= 4.6e-198) tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t)); elseif (y <= 4.1e-153) tmp = Float64(a - Float64(Float64(y * b) / t)); elseif (y <= 1.95e-128) tmp = Float64(Float64(Float64(x * z) - Float64(y * b)) / Float64(y + Float64(x + t))); elseif (y <= 48000000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a + (z / ((t + (x + y)) / (x + y))); t_2 = (z + a) - b; tmp = 0.0; if (y <= -3.5e+155) tmp = t_2; elseif (y <= 5.5e-305) tmp = t_1; elseif (y <= 4.6e-198) tmp = ((t * a) + (x * z)) / (x + t); elseif (y <= 4.1e-153) tmp = a - ((y * b) / t); elseif (y <= 1.95e-128) tmp = ((x * z) - (y * b)) / (y + (x + t)); elseif (y <= 48000000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(z / N[(N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -3.5e+155], t$95$2, If[LessEqual[y, 5.5e-305], t$95$1, If[LessEqual[y, 4.6e-198], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.1e-153], N[(a - N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.95e-128], N[(N[(N[(x * z), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 48000000000.0], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\
t_2 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -3.5 \cdot 10^{+155}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-305}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-198}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{-153}:\\
\;\;\;\;a - \frac{y \cdot b}{t}\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-128}:\\
\;\;\;\;\frac{x \cdot z - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{elif}\;y \leq 48000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -3.49999999999999985e155 or 4.8e10 < y Initial program 37.8%
Taylor expanded in y around inf 87.0%
if -3.49999999999999985e155 < y < 5.5e-305 or 1.94999999999999998e-128 < y < 4.8e10Initial program 75.4%
Taylor expanded in a around 0 85.6%
associate--l+85.6%
+-commutative85.6%
associate-+r+85.6%
associate-+r+85.6%
div-sub85.6%
+-commutative85.6%
*-commutative85.6%
associate-+r+85.6%
Simplified85.6%
Taylor expanded in z around inf 69.9%
associate-/l*81.1%
+-commutative81.1%
+-commutative81.1%
Simplified81.1%
Taylor expanded in y around inf 70.4%
if 5.5e-305 < y < 4.60000000000000027e-198Initial program 87.1%
Taylor expanded in y around 0 83.8%
if 4.60000000000000027e-198 < y < 4.1e-153Initial program 53.0%
Taylor expanded in z around 0 53.0%
*-commutative53.0%
Simplified53.0%
Taylor expanded in x around 0 53.0%
Taylor expanded in t around inf 99.7%
associate-*r/99.7%
associate-*r*99.7%
neg-mul-199.7%
*-commutative99.7%
Simplified99.7%
if 4.1e-153 < y < 1.94999999999999998e-128Initial program 99.4%
Taylor expanded in a around 0 80.1%
+-commutative80.1%
*-commutative80.1%
Simplified80.1%
Taylor expanded in y around 0 80.1%
*-commutative80.1%
Simplified80.1%
Final simplification78.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (/ z (/ (+ t (+ x y)) (+ x y))))) (t_2 (- (+ z a) b)))
(if (<= y -6.6e+155)
t_2
(if (<= y 2e-304)
t_1
(if (<= y 2.7e-198)
(/ (+ (* t a) (* x z)) (+ x t))
(if (<= y 5.7e-154)
(- a (/ (* y b) t))
(if (<= y 5.8e-127)
(/ (- (* (+ y t) a) (* y b)) (+ y (+ x t)))
(if (<= y 52000000000.0) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (z / ((t + (x + y)) / (x + y)));
double t_2 = (z + a) - b;
double tmp;
if (y <= -6.6e+155) {
tmp = t_2;
} else if (y <= 2e-304) {
tmp = t_1;
} else if (y <= 2.7e-198) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 5.7e-154) {
tmp = a - ((y * b) / t);
} else if (y <= 5.8e-127) {
tmp = (((y + t) * a) - (y * b)) / (y + (x + t));
} else if (y <= 52000000000.0) {
tmp = t_1;
} 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 = a + (z / ((t + (x + y)) / (x + y)))
t_2 = (z + a) - b
if (y <= (-6.6d+155)) then
tmp = t_2
else if (y <= 2d-304) then
tmp = t_1
else if (y <= 2.7d-198) then
tmp = ((t * a) + (x * z)) / (x + t)
else if (y <= 5.7d-154) then
tmp = a - ((y * b) / t)
else if (y <= 5.8d-127) then
tmp = (((y + t) * a) - (y * b)) / (y + (x + t))
else if (y <= 52000000000.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (z / ((t + (x + y)) / (x + y)));
double t_2 = (z + a) - b;
double tmp;
if (y <= -6.6e+155) {
tmp = t_2;
} else if (y <= 2e-304) {
tmp = t_1;
} else if (y <= 2.7e-198) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 5.7e-154) {
tmp = a - ((y * b) / t);
} else if (y <= 5.8e-127) {
tmp = (((y + t) * a) - (y * b)) / (y + (x + t));
} else if (y <= 52000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a + (z / ((t + (x + y)) / (x + y))) t_2 = (z + a) - b tmp = 0 if y <= -6.6e+155: tmp = t_2 elif y <= 2e-304: tmp = t_1 elif y <= 2.7e-198: tmp = ((t * a) + (x * z)) / (x + t) elif y <= 5.7e-154: tmp = a - ((y * b) / t) elif y <= 5.8e-127: tmp = (((y + t) * a) - (y * b)) / (y + (x + t)) elif y <= 52000000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a + Float64(z / Float64(Float64(t + Float64(x + y)) / Float64(x + y)))) t_2 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -6.6e+155) tmp = t_2; elseif (y <= 2e-304) tmp = t_1; elseif (y <= 2.7e-198) tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t)); elseif (y <= 5.7e-154) tmp = Float64(a - Float64(Float64(y * b) / t)); elseif (y <= 5.8e-127) tmp = Float64(Float64(Float64(Float64(y + t) * a) - Float64(y * b)) / Float64(y + Float64(x + t))); elseif (y <= 52000000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a + (z / ((t + (x + y)) / (x + y))); t_2 = (z + a) - b; tmp = 0.0; if (y <= -6.6e+155) tmp = t_2; elseif (y <= 2e-304) tmp = t_1; elseif (y <= 2.7e-198) tmp = ((t * a) + (x * z)) / (x + t); elseif (y <= 5.7e-154) tmp = a - ((y * b) / t); elseif (y <= 5.8e-127) tmp = (((y + t) * a) - (y * b)) / (y + (x + t)); elseif (y <= 52000000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(z / N[(N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -6.6e+155], t$95$2, If[LessEqual[y, 2e-304], t$95$1, If[LessEqual[y, 2.7e-198], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.7e-154], N[(a - N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.8e-127], N[(N[(N[(N[(y + t), $MachinePrecision] * a), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 52000000000.0], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\
t_2 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -6.6 \cdot 10^{+155}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 2 \cdot 10^{-304}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-198}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\
\mathbf{elif}\;y \leq 5.7 \cdot 10^{-154}:\\
\;\;\;\;a - \frac{y \cdot b}{t}\\
\mathbf{elif}\;y \leq 5.8 \cdot 10^{-127}:\\
\;\;\;\;\frac{\left(y + t\right) \cdot a - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{elif}\;y \leq 52000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -6.5999999999999997e155 or 5.2e10 < y Initial program 37.8%
Taylor expanded in y around inf 87.0%
if -6.5999999999999997e155 < y < 1.99999999999999994e-304 or 5.8000000000000001e-127 < y < 5.2e10Initial program 75.4%
Taylor expanded in a around 0 85.6%
associate--l+85.6%
+-commutative85.6%
associate-+r+85.6%
associate-+r+85.6%
div-sub85.6%
+-commutative85.6%
*-commutative85.6%
associate-+r+85.6%
Simplified85.6%
Taylor expanded in z around inf 69.9%
associate-/l*81.1%
+-commutative81.1%
+-commutative81.1%
Simplified81.1%
Taylor expanded in y around inf 70.4%
if 1.99999999999999994e-304 < y < 2.7000000000000002e-198Initial program 87.1%
Taylor expanded in y around 0 83.8%
if 2.7000000000000002e-198 < y < 5.6999999999999998e-154Initial program 53.0%
Taylor expanded in z around 0 53.0%
*-commutative53.0%
Simplified53.0%
Taylor expanded in x around 0 53.0%
Taylor expanded in t around inf 99.7%
associate-*r/99.7%
associate-*r*99.7%
neg-mul-199.7%
*-commutative99.7%
Simplified99.7%
if 5.6999999999999998e-154 < y < 5.8000000000000001e-127Initial program 99.4%
Taylor expanded in z around 0 80.9%
*-commutative80.9%
Simplified80.9%
Final simplification78.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (+ x (+ y t)))
(t_3 (+ z (* a (+ (/ y t_1) (/ t t_1))))))
(if (<= a -6e+139)
t_3
(if (<= a -1.6e-52)
(+ a (/ z (/ (+ t (+ x y)) (+ x y))))
(if (<= a 0.00013) (- (* z (/ (+ x y) t_2)) (/ b (/ t_2 y))) t_3)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = x + (y + t);
double t_3 = z + (a * ((y / t_1) + (t / t_1)));
double tmp;
if (a <= -6e+139) {
tmp = t_3;
} else if (a <= -1.6e-52) {
tmp = a + (z / ((t + (x + y)) / (x + y)));
} else if (a <= 0.00013) {
tmp = (z * ((x + y) / t_2)) - (b / (t_2 / y));
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y + (x + t)
t_2 = x + (y + t)
t_3 = z + (a * ((y / t_1) + (t / t_1)))
if (a <= (-6d+139)) then
tmp = t_3
else if (a <= (-1.6d-52)) then
tmp = a + (z / ((t + (x + y)) / (x + y)))
else if (a <= 0.00013d0) then
tmp = (z * ((x + y) / t_2)) - (b / (t_2 / y))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = x + (y + t);
double t_3 = z + (a * ((y / t_1) + (t / t_1)));
double tmp;
if (a <= -6e+139) {
tmp = t_3;
} else if (a <= -1.6e-52) {
tmp = a + (z / ((t + (x + y)) / (x + y)));
} else if (a <= 0.00013) {
tmp = (z * ((x + y) / t_2)) - (b / (t_2 / y));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = x + (y + t) t_3 = z + (a * ((y / t_1) + (t / t_1))) tmp = 0 if a <= -6e+139: tmp = t_3 elif a <= -1.6e-52: tmp = a + (z / ((t + (x + y)) / (x + y))) elif a <= 0.00013: tmp = (z * ((x + y) / t_2)) - (b / (t_2 / y)) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(x + Float64(y + t)) t_3 = Float64(z + Float64(a * Float64(Float64(y / t_1) + Float64(t / t_1)))) tmp = 0.0 if (a <= -6e+139) tmp = t_3; elseif (a <= -1.6e-52) tmp = Float64(a + Float64(z / Float64(Float64(t + Float64(x + y)) / Float64(x + y)))); elseif (a <= 0.00013) tmp = Float64(Float64(z * Float64(Float64(x + y) / t_2)) - Float64(b / Float64(t_2 / y))); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = x + (y + t); t_3 = z + (a * ((y / t_1) + (t / t_1))); tmp = 0.0; if (a <= -6e+139) tmp = t_3; elseif (a <= -1.6e-52) tmp = a + (z / ((t + (x + y)) / (x + y))); elseif (a <= 0.00013) tmp = (z * ((x + y) / t_2)) - (b / (t_2 / y)); else tmp = t_3; 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[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z + N[(a * N[(N[(y / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6e+139], t$95$3, If[LessEqual[a, -1.6e-52], N[(a + N[(z / N[(N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.00013], N[(N[(z * N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] - N[(b / N[(t$95$2 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := x + \left(y + t\right)\\
t_3 := z + a \cdot \left(\frac{y}{t_1} + \frac{t}{t_1}\right)\\
\mathbf{if}\;a \leq -6 \cdot 10^{+139}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \leq -1.6 \cdot 10^{-52}:\\
\;\;\;\;a + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\
\mathbf{elif}\;a \leq 0.00013:\\
\;\;\;\;z \cdot \frac{x + y}{t_2} - \frac{b}{\frac{t_2}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if a < -5.9999999999999999e139 or 1.29999999999999989e-4 < a Initial program 47.3%
Taylor expanded in a around 0 75.2%
associate--l+75.2%
+-commutative75.2%
associate-+r+75.2%
associate-+r+75.2%
div-sub75.2%
+-commutative75.2%
*-commutative75.2%
associate-+r+75.2%
Simplified75.2%
Taylor expanded in x around inf 84.1%
if -5.9999999999999999e139 < a < -1.60000000000000005e-52Initial program 68.0%
Taylor expanded in a around 0 78.1%
associate--l+78.1%
+-commutative78.1%
associate-+r+78.1%
associate-+r+78.1%
div-sub78.1%
+-commutative78.1%
*-commutative78.1%
associate-+r+78.1%
Simplified78.1%
Taylor expanded in z around inf 68.1%
associate-/l*77.9%
+-commutative77.9%
+-commutative77.9%
Simplified77.9%
Taylor expanded in y around inf 70.2%
if -1.60000000000000005e-52 < a < 1.29999999999999989e-4Initial program 74.9%
Taylor expanded in a around 0 65.9%
+-commutative65.9%
*-commutative65.9%
Simplified65.9%
div-sub65.9%
associate-*l/68.6%
+-commutative68.6%
associate-+r+68.6%
+-commutative68.6%
associate-/r/77.4%
div-inv77.3%
clear-num77.3%
+-commutative77.3%
associate-+r+77.3%
+-commutative77.3%
associate-+l+77.3%
*-commutative77.3%
associate-/l*90.7%
associate-+l+90.7%
Applied egg-rr90.7%
Final simplification85.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (+ x (+ y t)))
(t_3 (+ z (* a (+ (/ y t_1) (/ t t_1))))))
(if (<= a -3.5e+88)
t_3
(if (<= a -4.8e-53)
(/ (+ (* t a) (+ (* x z) (* y (- (+ z a) b)))) t_1)
(if (<= a 24000.0) (- (* z (/ (+ x y) t_2)) (/ b (/ t_2 y))) t_3)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = x + (y + t);
double t_3 = z + (a * ((y / t_1) + (t / t_1)));
double tmp;
if (a <= -3.5e+88) {
tmp = t_3;
} else if (a <= -4.8e-53) {
tmp = ((t * a) + ((x * z) + (y * ((z + a) - b)))) / t_1;
} else if (a <= 24000.0) {
tmp = (z * ((x + y) / t_2)) - (b / (t_2 / y));
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = y + (x + t)
t_2 = x + (y + t)
t_3 = z + (a * ((y / t_1) + (t / t_1)))
if (a <= (-3.5d+88)) then
tmp = t_3
else if (a <= (-4.8d-53)) then
tmp = ((t * a) + ((x * z) + (y * ((z + a) - b)))) / t_1
else if (a <= 24000.0d0) then
tmp = (z * ((x + y) / t_2)) - (b / (t_2 / y))
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = x + (y + t);
double t_3 = z + (a * ((y / t_1) + (t / t_1)));
double tmp;
if (a <= -3.5e+88) {
tmp = t_3;
} else if (a <= -4.8e-53) {
tmp = ((t * a) + ((x * z) + (y * ((z + a) - b)))) / t_1;
} else if (a <= 24000.0) {
tmp = (z * ((x + y) / t_2)) - (b / (t_2 / y));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = x + (y + t) t_3 = z + (a * ((y / t_1) + (t / t_1))) tmp = 0 if a <= -3.5e+88: tmp = t_3 elif a <= -4.8e-53: tmp = ((t * a) + ((x * z) + (y * ((z + a) - b)))) / t_1 elif a <= 24000.0: tmp = (z * ((x + y) / t_2)) - (b / (t_2 / y)) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(x + Float64(y + t)) t_3 = Float64(z + Float64(a * Float64(Float64(y / t_1) + Float64(t / t_1)))) tmp = 0.0 if (a <= -3.5e+88) tmp = t_3; elseif (a <= -4.8e-53) tmp = Float64(Float64(Float64(t * a) + Float64(Float64(x * z) + Float64(y * Float64(Float64(z + a) - b)))) / t_1); elseif (a <= 24000.0) tmp = Float64(Float64(z * Float64(Float64(x + y) / t_2)) - Float64(b / Float64(t_2 / y))); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = x + (y + t); t_3 = z + (a * ((y / t_1) + (t / t_1))); tmp = 0.0; if (a <= -3.5e+88) tmp = t_3; elseif (a <= -4.8e-53) tmp = ((t * a) + ((x * z) + (y * ((z + a) - b)))) / t_1; elseif (a <= 24000.0) tmp = (z * ((x + y) / t_2)) - (b / (t_2 / y)); else tmp = t_3; 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[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z + N[(a * N[(N[(y / t$95$1), $MachinePrecision] + N[(t / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.5e+88], t$95$3, If[LessEqual[a, -4.8e-53], N[(N[(N[(t * a), $MachinePrecision] + N[(N[(x * z), $MachinePrecision] + N[(y * N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[a, 24000.0], N[(N[(z * N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] - N[(b / N[(t$95$2 / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := x + \left(y + t\right)\\
t_3 := z + a \cdot \left(\frac{y}{t_1} + \frac{t}{t_1}\right)\\
\mathbf{if}\;a \leq -3.5 \cdot 10^{+88}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \leq -4.8 \cdot 10^{-53}:\\
\;\;\;\;\frac{t \cdot a + \left(x \cdot z + y \cdot \left(\left(z + a\right) - b\right)\right)}{t_1}\\
\mathbf{elif}\;a \leq 24000:\\
\;\;\;\;z \cdot \frac{x + y}{t_2} - \frac{b}{\frac{t_2}{y}}\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if a < -3.4999999999999998e88 or 24000 < a Initial program 45.2%
Taylor expanded in a around 0 75.0%
associate--l+75.0%
+-commutative75.0%
associate-+r+75.0%
associate-+r+75.0%
div-sub75.0%
+-commutative75.0%
*-commutative75.0%
associate-+r+75.0%
Simplified75.0%
Taylor expanded in x around inf 82.3%
if -3.4999999999999998e88 < a < -4.80000000000000015e-53Initial program 78.9%
Taylor expanded in y around 0 79.4%
if -4.80000000000000015e-53 < a < 24000Initial program 74.9%
Taylor expanded in a around 0 65.9%
+-commutative65.9%
*-commutative65.9%
Simplified65.9%
div-sub65.9%
associate-*l/68.6%
+-commutative68.6%
associate-+r+68.6%
+-commutative68.6%
associate-/r/77.4%
div-inv77.3%
clear-num77.3%
+-commutative77.3%
associate-+r+77.3%
+-commutative77.3%
associate-+l+77.3%
*-commutative77.3%
associate-/l*90.7%
associate-+l+90.7%
Applied egg-rr90.7%
Final simplification86.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ a (/ z (/ (+ t (+ x y)) (+ x y))))) (t_2 (- (+ z a) b)))
(if (<= y -2.05e+156)
t_2
(if (<= y 8e-305)
t_1
(if (<= y 2.7e-180)
(/ (+ (* t a) (* x z)) (+ x t))
(if (<= y 52000000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (z / ((t + (x + y)) / (x + y)));
double t_2 = (z + a) - b;
double tmp;
if (y <= -2.05e+156) {
tmp = t_2;
} else if (y <= 8e-305) {
tmp = t_1;
} else if (y <= 2.7e-180) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 52000000000.0) {
tmp = t_1;
} 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 = a + (z / ((t + (x + y)) / (x + y)))
t_2 = (z + a) - b
if (y <= (-2.05d+156)) then
tmp = t_2
else if (y <= 8d-305) then
tmp = t_1
else if (y <= 2.7d-180) then
tmp = ((t * a) + (x * z)) / (x + t)
else if (y <= 52000000000.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a + (z / ((t + (x + y)) / (x + y)));
double t_2 = (z + a) - b;
double tmp;
if (y <= -2.05e+156) {
tmp = t_2;
} else if (y <= 8e-305) {
tmp = t_1;
} else if (y <= 2.7e-180) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 52000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a + (z / ((t + (x + y)) / (x + y))) t_2 = (z + a) - b tmp = 0 if y <= -2.05e+156: tmp = t_2 elif y <= 8e-305: tmp = t_1 elif y <= 2.7e-180: tmp = ((t * a) + (x * z)) / (x + t) elif y <= 52000000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a + Float64(z / Float64(Float64(t + Float64(x + y)) / Float64(x + y)))) t_2 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -2.05e+156) tmp = t_2; elseif (y <= 8e-305) tmp = t_1; elseif (y <= 2.7e-180) tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t)); elseif (y <= 52000000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a + (z / ((t + (x + y)) / (x + y))); t_2 = (z + a) - b; tmp = 0.0; if (y <= -2.05e+156) tmp = t_2; elseif (y <= 8e-305) tmp = t_1; elseif (y <= 2.7e-180) tmp = ((t * a) + (x * z)) / (x + t); elseif (y <= 52000000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a + N[(z / N[(N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -2.05e+156], t$95$2, If[LessEqual[y, 8e-305], t$95$1, If[LessEqual[y, 2.7e-180], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 52000000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a + \frac{z}{\frac{t + \left(x + y\right)}{x + y}}\\
t_2 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -2.05 \cdot 10^{+156}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 8 \cdot 10^{-305}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-180}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\
\mathbf{elif}\;y \leq 52000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -2.0500000000000001e156 or 5.2e10 < y Initial program 37.8%
Taylor expanded in y around inf 87.0%
if -2.0500000000000001e156 < y < 7.99999999999999997e-305 or 2.70000000000000014e-180 < y < 5.2e10Initial program 74.9%
Taylor expanded in a around 0 86.5%
associate--l+86.5%
+-commutative86.5%
associate-+r+86.5%
associate-+r+86.5%
div-sub86.5%
+-commutative86.5%
*-commutative86.5%
associate-+r+86.5%
Simplified86.5%
Taylor expanded in z around inf 69.1%
associate-/l*79.6%
+-commutative79.6%
+-commutative79.6%
Simplified79.6%
Taylor expanded in y around inf 68.9%
if 7.99999999999999997e-305 < y < 2.70000000000000014e-180Initial program 87.9%
Taylor expanded in y around 0 81.8%
Final simplification76.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -2.5e+64)
t_1
(if (<= y -5.4e-110)
(/ (* y (- z b)) (+ y t))
(if (or (<= y -2.3e-141) (not (<= y 1.6e-132)))
t_1
(/ a (/ (+ y (+ x t)) (+ y t))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -2.5e+64) {
tmp = t_1;
} else if (y <= -5.4e-110) {
tmp = (y * (z - b)) / (y + t);
} else if ((y <= -2.3e-141) || !(y <= 1.6e-132)) {
tmp = t_1;
} else {
tmp = a / ((y + (x + t)) / (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) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (y <= (-2.5d+64)) then
tmp = t_1
else if (y <= (-5.4d-110)) then
tmp = (y * (z - b)) / (y + t)
else if ((y <= (-2.3d-141)) .or. (.not. (y <= 1.6d-132))) then
tmp = t_1
else
tmp = a / ((y + (x + t)) / (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 t_1 = (z + a) - b;
double tmp;
if (y <= -2.5e+64) {
tmp = t_1;
} else if (y <= -5.4e-110) {
tmp = (y * (z - b)) / (y + t);
} else if ((y <= -2.3e-141) || !(y <= 1.6e-132)) {
tmp = t_1;
} else {
tmp = a / ((y + (x + t)) / (y + t));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -2.5e+64: tmp = t_1 elif y <= -5.4e-110: tmp = (y * (z - b)) / (y + t) elif (y <= -2.3e-141) or not (y <= 1.6e-132): tmp = t_1 else: tmp = a / ((y + (x + t)) / (y + t)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -2.5e+64) tmp = t_1; elseif (y <= -5.4e-110) tmp = Float64(Float64(y * Float64(z - b)) / Float64(y + t)); elseif ((y <= -2.3e-141) || !(y <= 1.6e-132)) tmp = t_1; else tmp = Float64(a / Float64(Float64(y + Float64(x + t)) / Float64(y + t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -2.5e+64) tmp = t_1; elseif (y <= -5.4e-110) tmp = (y * (z - b)) / (y + t); elseif ((y <= -2.3e-141) || ~((y <= 1.6e-132))) tmp = t_1; else tmp = a / ((y + (x + t)) / (y + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -2.5e+64], t$95$1, If[LessEqual[y, -5.4e-110], N[(N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, -2.3e-141], N[Not[LessEqual[y, 1.6e-132]], $MachinePrecision]], t$95$1, N[(a / N[(N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision] / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{+64}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -5.4 \cdot 10^{-110}:\\
\;\;\;\;\frac{y \cdot \left(z - b\right)}{y + t}\\
\mathbf{elif}\;y \leq -2.3 \cdot 10^{-141} \lor \neg \left(y \leq 1.6 \cdot 10^{-132}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{\frac{y + \left(x + t\right)}{y + t}}\\
\end{array}
\end{array}
if y < -2.5e64 or -5.3999999999999996e-110 < y < -2.29999999999999995e-141 or 1.6000000000000001e-132 < y Initial program 50.0%
Taylor expanded in y around inf 77.9%
if -2.5e64 < y < -5.3999999999999996e-110Initial program 80.3%
Taylor expanded in a around 0 63.6%
+-commutative63.6%
*-commutative63.6%
Simplified63.6%
Taylor expanded in x around 0 51.2%
*-commutative51.2%
distribute-lft-out--51.1%
+-commutative51.1%
Simplified51.1%
if -2.29999999999999995e-141 < y < 1.6000000000000001e-132Initial program 79.1%
Taylor expanded in a around inf 37.3%
associate-/l*46.2%
associate-+r+46.2%
Simplified46.2%
Final simplification63.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -9.2e-57)
t_1
(if (<= y 4.6e-198)
(/ (+ (* t a) (* x z)) (+ x t))
(if (<= y 1.6e-145) (- a (/ (* y b) t)) (if (<= y 3e-122) z t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -9.2e-57) {
tmp = t_1;
} else if (y <= 4.6e-198) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 1.6e-145) {
tmp = a - ((y * b) / t);
} else if (y <= 3e-122) {
tmp = z;
} 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 + a) - b
if (y <= (-9.2d-57)) then
tmp = t_1
else if (y <= 4.6d-198) then
tmp = ((t * a) + (x * z)) / (x + t)
else if (y <= 1.6d-145) then
tmp = a - ((y * b) / t)
else if (y <= 3d-122) then
tmp = z
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 + a) - b;
double tmp;
if (y <= -9.2e-57) {
tmp = t_1;
} else if (y <= 4.6e-198) {
tmp = ((t * a) + (x * z)) / (x + t);
} else if (y <= 1.6e-145) {
tmp = a - ((y * b) / t);
} else if (y <= 3e-122) {
tmp = z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -9.2e-57: tmp = t_1 elif y <= 4.6e-198: tmp = ((t * a) + (x * z)) / (x + t) elif y <= 1.6e-145: tmp = a - ((y * b) / t) elif y <= 3e-122: tmp = z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -9.2e-57) tmp = t_1; elseif (y <= 4.6e-198) tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t)); elseif (y <= 1.6e-145) tmp = Float64(a - Float64(Float64(y * b) / t)); elseif (y <= 3e-122) tmp = z; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -9.2e-57) tmp = t_1; elseif (y <= 4.6e-198) tmp = ((t * a) + (x * z)) / (x + t); elseif (y <= 1.6e-145) tmp = a - ((y * b) / t); elseif (y <= 3e-122) tmp = z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -9.2e-57], t$95$1, If[LessEqual[y, 4.6e-198], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.6e-145], N[(a - N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e-122], z, t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -9.2 \cdot 10^{-57}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-198}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\
\mathbf{elif}\;y \leq 1.6 \cdot 10^{-145}:\\
\;\;\;\;a - \frac{y \cdot b}{t}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-122}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -9.2000000000000001e-57 or 3.00000000000000004e-122 < y Initial program 52.8%
Taylor expanded in y around inf 74.7%
if -9.2000000000000001e-57 < y < 4.60000000000000027e-198Initial program 81.9%
Taylor expanded in y around 0 66.9%
if 4.60000000000000027e-198 < y < 1.60000000000000004e-145Initial program 64.8%
Taylor expanded in z around 0 64.8%
*-commutative64.8%
Simplified64.8%
Taylor expanded in x around 0 52.4%
Taylor expanded in t around inf 87.5%
associate-*r/87.5%
associate-*r*87.5%
neg-mul-187.5%
*-commutative87.5%
Simplified87.5%
if 1.60000000000000004e-145 < y < 3.00000000000000004e-122Initial program 80.3%
Taylor expanded in x around inf 62.6%
Final simplification72.1%
(FPCore (x y z t a b)
:precision binary64
(if (<= a -3.4e-56)
a
(if (or (<= a 3.2e-48) (and (not (<= a 2.15e-14)) (<= a 6.1e+119)))
z
(- a b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -3.4e-56) {
tmp = a;
} else if ((a <= 3.2e-48) || (!(a <= 2.15e-14) && (a <= 6.1e+119))) {
tmp = z;
} else {
tmp = a - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-3.4d-56)) then
tmp = a
else if ((a <= 3.2d-48) .or. (.not. (a <= 2.15d-14)) .and. (a <= 6.1d+119)) then
tmp = z
else
tmp = a - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -3.4e-56) {
tmp = a;
} else if ((a <= 3.2e-48) || (!(a <= 2.15e-14) && (a <= 6.1e+119))) {
tmp = z;
} else {
tmp = a - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -3.4e-56: tmp = a elif (a <= 3.2e-48) or (not (a <= 2.15e-14) and (a <= 6.1e+119)): tmp = z else: tmp = a - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -3.4e-56) tmp = a; elseif ((a <= 3.2e-48) || (!(a <= 2.15e-14) && (a <= 6.1e+119))) tmp = z; else tmp = Float64(a - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -3.4e-56) tmp = a; elseif ((a <= 3.2e-48) || (~((a <= 2.15e-14)) && (a <= 6.1e+119))) tmp = z; else tmp = a - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -3.4e-56], a, If[Or[LessEqual[a, 3.2e-48], And[N[Not[LessEqual[a, 2.15e-14]], $MachinePrecision], LessEqual[a, 6.1e+119]]], z, N[(a - b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \cdot 10^{-56}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{-48} \lor \neg \left(a \leq 2.15 \cdot 10^{-14}\right) \land a \leq 6.1 \cdot 10^{+119}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a - b\\
\end{array}
\end{array}
if a < -3.39999999999999982e-56Initial program 52.0%
Taylor expanded in t around inf 57.5%
if -3.39999999999999982e-56 < a < 3.1999999999999998e-48 or 2.14999999999999999e-14 < a < 6.1e119Initial program 75.7%
Taylor expanded in x around inf 41.0%
if 3.1999999999999998e-48 < a < 2.14999999999999999e-14 or 6.1e119 < a Initial program 47.8%
Taylor expanded in z around 0 35.7%
*-commutative35.7%
Simplified35.7%
Taylor expanded in y around inf 64.3%
Final simplification49.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -2.2e+162) (not (<= t 3.5e+141))) (/ a (/ (+ x t) t)) (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.2e+162) || !(t <= 3.5e+141)) {
tmp = a / ((x + t) / t);
} else {
tmp = (z + a) - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((t <= (-2.2d+162)) .or. (.not. (t <= 3.5d+141))) then
tmp = a / ((x + t) / t)
else
tmp = (z + a) - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -2.2e+162) || !(t <= 3.5e+141)) {
tmp = a / ((x + t) / t);
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -2.2e+162) or not (t <= 3.5e+141): tmp = a / ((x + t) / t) else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -2.2e+162) || !(t <= 3.5e+141)) tmp = Float64(a / Float64(Float64(x + t) / t)); else tmp = Float64(Float64(z + a) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -2.2e+162) || ~((t <= 3.5e+141))) tmp = a / ((x + t) / t); else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -2.2e+162], N[Not[LessEqual[t, 3.5e+141]], $MachinePrecision]], N[(a / N[(N[(x + t), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{+162} \lor \neg \left(t \leq 3.5 \cdot 10^{+141}\right):\\
\;\;\;\;\frac{a}{\frac{x + t}{t}}\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if t < -2.2000000000000002e162 or 3.5e141 < t Initial program 47.7%
Taylor expanded in z around 0 31.9%
*-commutative31.9%
Simplified31.9%
Taylor expanded in t around inf 25.1%
*-commutative25.1%
Simplified25.1%
Taylor expanded in y around 0 25.1%
associate-/l*59.6%
+-commutative59.6%
Simplified59.6%
if -2.2000000000000002e162 < t < 3.5e141Initial program 68.9%
Taylor expanded in y around inf 62.6%
Final simplification61.9%
(FPCore (x y z t a b) :precision binary64 (if (<= a -3.3e-52) a (if (<= a 2.9e+121) (- z b) (- a b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -3.3e-52) {
tmp = a;
} else if (a <= 2.9e+121) {
tmp = z - b;
} else {
tmp = a - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-3.3d-52)) then
tmp = a
else if (a <= 2.9d+121) then
tmp = z - b
else
tmp = a - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -3.3e-52) {
tmp = a;
} else if (a <= 2.9e+121) {
tmp = z - b;
} else {
tmp = a - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -3.3e-52: tmp = a elif a <= 2.9e+121: tmp = z - b else: tmp = a - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -3.3e-52) tmp = a; elseif (a <= 2.9e+121) tmp = Float64(z - b); else tmp = Float64(a - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -3.3e-52) tmp = a; elseif (a <= 2.9e+121) tmp = z - b; else tmp = a - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -3.3e-52], a, If[LessEqual[a, 2.9e+121], N[(z - b), $MachinePrecision], N[(a - b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.3 \cdot 10^{-52}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{+121}:\\
\;\;\;\;z - b\\
\mathbf{else}:\\
\;\;\;\;a - b\\
\end{array}
\end{array}
if a < -3.29999999999999995e-52Initial program 52.6%
Taylor expanded in t around inf 58.3%
if -3.29999999999999995e-52 < a < 2.8999999999999999e121Initial program 74.3%
Taylor expanded in a around 0 60.9%
+-commutative60.9%
*-commutative60.9%
Simplified60.9%
Taylor expanded in y around inf 50.1%
if 2.8999999999999999e121 < a Initial program 45.8%
Taylor expanded in z around 0 31.4%
*-commutative31.4%
Simplified31.4%
Taylor expanded in y around inf 62.8%
Final simplification54.3%
(FPCore (x y z t a b) :precision binary64 (if (<= a -7.8e-57) a (if (<= a 2.9e+118) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -7.8e-57) {
tmp = a;
} else if (a <= 2.9e+118) {
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 (a <= (-7.8d-57)) then
tmp = a
else if (a <= 2.9d+118) 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 (a <= -7.8e-57) {
tmp = a;
} else if (a <= 2.9e+118) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -7.8e-57: tmp = a elif a <= 2.9e+118: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -7.8e-57) tmp = a; elseif (a <= 2.9e+118) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -7.8e-57) tmp = a; elseif (a <= 2.9e+118) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -7.8e-57], a, If[LessEqual[a, 2.9e+118], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.8 \cdot 10^{-57}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 2.9 \cdot 10^{+118}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -7.80000000000000013e-57 or 2.90000000000000016e118 < a Initial program 49.9%
Taylor expanded in t around inf 57.8%
if -7.80000000000000013e-57 < a < 2.90000000000000016e118Initial program 74.8%
Taylor expanded in x around inf 39.1%
Final simplification47.3%
(FPCore (x y z t a b) :precision binary64 (if (<= t -3.2e+162) a (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.2e+162) {
tmp = a;
} else {
tmp = (z + a) - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= (-3.2d+162)) then
tmp = a
else
tmp = (z + a) - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -3.2e+162) {
tmp = a;
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -3.2e+162: tmp = a else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -3.2e+162) tmp = a; else tmp = Float64(Float64(z + a) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -3.2e+162) tmp = a; else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -3.2e+162], a, N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.2 \cdot 10^{+162}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if t < -3.2000000000000001e162Initial program 46.4%
Taylor expanded in t around inf 66.9%
if -3.2000000000000001e162 < t Initial program 66.2%
Taylor expanded in y around inf 58.6%
Final simplification59.6%
(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 63.9%
Taylor expanded in t around inf 31.4%
Final simplification31.4%
(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 2024026
(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)))