
(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 16 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 (+ t (+ x y))) (t_2 (+ y (+ x t))))
(if (or (<= z -720000.0) (not (<= z 2.7e+66)))
(*
z
(+
(/ x t_1)
(- (+ (/ y t_1) (* (/ a z) (/ (+ t y) t_1))) (/ (* b (/ y z)) t_1))))
(+ (* a (/ (+ t y) t_2)) (/ (+ (* y (- z b)) (* z x)) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t + (x + y);
double t_2 = y + (x + t);
double tmp;
if ((z <= -720000.0) || !(z <= 2.7e+66)) {
tmp = z * ((x / t_1) + (((y / t_1) + ((a / z) * ((t + y) / t_1))) - ((b * (y / z)) / t_1)));
} else {
tmp = (a * ((t + y) / t_2)) + (((y * (z - b)) + (z * x)) / 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 = t + (x + y)
t_2 = y + (x + t)
if ((z <= (-720000.0d0)) .or. (.not. (z <= 2.7d+66))) then
tmp = z * ((x / t_1) + (((y / t_1) + ((a / z) * ((t + y) / t_1))) - ((b * (y / z)) / t_1)))
else
tmp = (a * ((t + y) / t_2)) + (((y * (z - b)) + (z * x)) / 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 = t + (x + y);
double t_2 = y + (x + t);
double tmp;
if ((z <= -720000.0) || !(z <= 2.7e+66)) {
tmp = z * ((x / t_1) + (((y / t_1) + ((a / z) * ((t + y) / t_1))) - ((b * (y / z)) / t_1)));
} else {
tmp = (a * ((t + y) / t_2)) + (((y * (z - b)) + (z * x)) / t_2);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t + (x + y) t_2 = y + (x + t) tmp = 0 if (z <= -720000.0) or not (z <= 2.7e+66): tmp = z * ((x / t_1) + (((y / t_1) + ((a / z) * ((t + y) / t_1))) - ((b * (y / z)) / t_1))) else: tmp = (a * ((t + y) / t_2)) + (((y * (z - b)) + (z * x)) / t_2) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t + Float64(x + y)) t_2 = Float64(y + Float64(x + t)) tmp = 0.0 if ((z <= -720000.0) || !(z <= 2.7e+66)) tmp = Float64(z * Float64(Float64(x / t_1) + Float64(Float64(Float64(y / t_1) + Float64(Float64(a / z) * Float64(Float64(t + y) / t_1))) - Float64(Float64(b * Float64(y / z)) / t_1)))); else tmp = Float64(Float64(a * Float64(Float64(t + y) / t_2)) + Float64(Float64(Float64(y * Float64(z - b)) + Float64(z * x)) / t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t + (x + y); t_2 = y + (x + t); tmp = 0.0; if ((z <= -720000.0) || ~((z <= 2.7e+66))) tmp = z * ((x / t_1) + (((y / t_1) + ((a / z) * ((t + y) / t_1))) - ((b * (y / z)) / t_1))); else tmp = (a * ((t + y) / t_2)) + (((y * (z - b)) + (z * x)) / t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t + N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -720000.0], N[Not[LessEqual[z, 2.7e+66]], $MachinePrecision]], N[(z * N[(N[(x / t$95$1), $MachinePrecision] + N[(N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(a / z), $MachinePrecision] * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(b * N[(y / z), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(N[(t + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision] + N[(z * x), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(x + y\right)\\
t_2 := y + \left(x + t\right)\\
\mathbf{if}\;z \leq -720000 \lor \neg \left(z \leq 2.7 \cdot 10^{+66}\right):\\
\;\;\;\;z \cdot \left(\frac{x}{t\_1} + \left(\left(\frac{y}{t\_1} + \frac{a}{z} \cdot \frac{t + y}{t\_1}\right) - \frac{b \cdot \frac{y}{z}}{t\_1}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t + y}{t\_2} + \frac{y \cdot \left(z - b\right) + z \cdot x}{t\_2}\\
\end{array}
\end{array}
if z < -7.2e5 or 2.7e66 < z Initial program 45.5%
Taylor expanded in z around inf 71.0%
associate--l+71.0%
+-commutative71.0%
+-commutative71.0%
times-frac89.0%
+-commutative89.0%
associate-/r*89.6%
associate-/l*96.4%
+-commutative96.4%
Simplified96.4%
if -7.2e5 < z < 2.7e66Initial program 70.6%
Taylor expanded in b around 0 70.6%
mul-1-neg70.6%
+-commutative70.6%
associate-+l+70.6%
associate-/l*89.3%
+-commutative89.3%
associate-+r+89.3%
+-commutative89.3%
associate-+l+89.3%
sub-neg89.3%
div-sub89.3%
Simplified89.3%
Final simplification92.5%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (- (+ (* a (+ t y)) (* z (+ x y))) (* y b)) (+ y (+ x t))))) (if (or (<= t_1 (- INFINITY)) (not (<= t_1 1e+236))) (- (+ z a) b) t_1)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 1e+236)) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 1e+236)) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / (y + (x + t)) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 1e+236): tmp = (z + a) - b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(a * Float64(t + y)) + Float64(z * Float64(x + y))) - Float64(y * b)) / Float64(y + Float64(x + t))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 1e+236)) 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 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / (y + (x + t)); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 1e+236))) 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[(a * N[(t + y), $MachinePrecision]), $MachinePrecision] + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 1e+236]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(a \cdot \left(t + y\right) + z \cdot \left(x + y\right)\right) - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{if}\;t\_1 \leq -\infty \lor \neg \left(t\_1 \leq 10^{+236}\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)) < -inf.0 or 1.00000000000000005e236 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 8.4%
Taylor expanded in y around inf 74.8%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.00000000000000005e236Initial program 99.8%
Final simplification88.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b))
(t_2 (+ y (+ x t)))
(t_3 (* a (/ (+ t y) t_2)))
(t_4 (* z (+ x y))))
(if (<= a -1.05e+89)
t_3
(if (<= a -2.5e+18)
t_1
(if (<= a -2.65e-58)
(/ (+ (* a (+ t y)) t_4) t_2)
(if (<= a -6.5e-195)
t_1
(if (<= a 5.6e-255)
(/ (- t_4 (* y b)) t_2)
(if (<= a 1.85e-103)
(* z (/ (+ x y) t_2))
(if (<= a 4.5e+139)
(* a (+ (- (/ z a) (* b (/ y (* (+ x y) a)))) (/ y (+ x y))))
t_3)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = a * ((t + y) / t_2);
double t_4 = z * (x + y);
double tmp;
if (a <= -1.05e+89) {
tmp = t_3;
} else if (a <= -2.5e+18) {
tmp = t_1;
} else if (a <= -2.65e-58) {
tmp = ((a * (t + y)) + t_4) / t_2;
} else if (a <= -6.5e-195) {
tmp = t_1;
} else if (a <= 5.6e-255) {
tmp = (t_4 - (y * b)) / t_2;
} else if (a <= 1.85e-103) {
tmp = z * ((x + y) / t_2);
} else if (a <= 4.5e+139) {
tmp = a * (((z / a) - (b * (y / ((x + y) * a)))) + (y / (x + 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) :: t_4
real(8) :: tmp
t_1 = (z + a) - b
t_2 = y + (x + t)
t_3 = a * ((t + y) / t_2)
t_4 = z * (x + y)
if (a <= (-1.05d+89)) then
tmp = t_3
else if (a <= (-2.5d+18)) then
tmp = t_1
else if (a <= (-2.65d-58)) then
tmp = ((a * (t + y)) + t_4) / t_2
else if (a <= (-6.5d-195)) then
tmp = t_1
else if (a <= 5.6d-255) then
tmp = (t_4 - (y * b)) / t_2
else if (a <= 1.85d-103) then
tmp = z * ((x + y) / t_2)
else if (a <= 4.5d+139) then
tmp = a * (((z / a) - (b * (y / ((x + y) * a)))) + (y / (x + 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 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = a * ((t + y) / t_2);
double t_4 = z * (x + y);
double tmp;
if (a <= -1.05e+89) {
tmp = t_3;
} else if (a <= -2.5e+18) {
tmp = t_1;
} else if (a <= -2.65e-58) {
tmp = ((a * (t + y)) + t_4) / t_2;
} else if (a <= -6.5e-195) {
tmp = t_1;
} else if (a <= 5.6e-255) {
tmp = (t_4 - (y * b)) / t_2;
} else if (a <= 1.85e-103) {
tmp = z * ((x + y) / t_2);
} else if (a <= 4.5e+139) {
tmp = a * (((z / a) - (b * (y / ((x + y) * a)))) + (y / (x + y)));
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = y + (x + t) t_3 = a * ((t + y) / t_2) t_4 = z * (x + y) tmp = 0 if a <= -1.05e+89: tmp = t_3 elif a <= -2.5e+18: tmp = t_1 elif a <= -2.65e-58: tmp = ((a * (t + y)) + t_4) / t_2 elif a <= -6.5e-195: tmp = t_1 elif a <= 5.6e-255: tmp = (t_4 - (y * b)) / t_2 elif a <= 1.85e-103: tmp = z * ((x + y) / t_2) elif a <= 4.5e+139: tmp = a * (((z / a) - (b * (y / ((x + y) * a)))) + (y / (x + y))) else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(a * Float64(Float64(t + y) / t_2)) t_4 = Float64(z * Float64(x + y)) tmp = 0.0 if (a <= -1.05e+89) tmp = t_3; elseif (a <= -2.5e+18) tmp = t_1; elseif (a <= -2.65e-58) tmp = Float64(Float64(Float64(a * Float64(t + y)) + t_4) / t_2); elseif (a <= -6.5e-195) tmp = t_1; elseif (a <= 5.6e-255) tmp = Float64(Float64(t_4 - Float64(y * b)) / t_2); elseif (a <= 1.85e-103) tmp = Float64(z * Float64(Float64(x + y) / t_2)); elseif (a <= 4.5e+139) tmp = Float64(a * Float64(Float64(Float64(z / a) - Float64(b * Float64(y / Float64(Float64(x + y) * a)))) + Float64(y / Float64(x + y)))); else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = y + (x + t); t_3 = a * ((t + y) / t_2); t_4 = z * (x + y); tmp = 0.0; if (a <= -1.05e+89) tmp = t_3; elseif (a <= -2.5e+18) tmp = t_1; elseif (a <= -2.65e-58) tmp = ((a * (t + y)) + t_4) / t_2; elseif (a <= -6.5e-195) tmp = t_1; elseif (a <= 5.6e-255) tmp = (t_4 - (y * b)) / t_2; elseif (a <= 1.85e-103) tmp = z * ((x + y) / t_2); elseif (a <= 4.5e+139) tmp = a * (((z / a) - (b * (y / ((x + y) * a)))) + (y / (x + y))); else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(N[(t + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.05e+89], t$95$3, If[LessEqual[a, -2.5e+18], t$95$1, If[LessEqual[a, -2.65e-58], N[(N[(N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision] + t$95$4), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[a, -6.5e-195], t$95$1, If[LessEqual[a, 5.6e-255], N[(N[(t$95$4 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[a, 1.85e-103], N[(z * N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.5e+139], N[(a * N[(N[(N[(z / a), $MachinePrecision] - N[(b * N[(y / N[(N[(x + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := y + \left(x + t\right)\\
t_3 := a \cdot \frac{t + y}{t\_2}\\
t_4 := z \cdot \left(x + y\right)\\
\mathbf{if}\;a \leq -1.05 \cdot 10^{+89}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq -2.5 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.65 \cdot 10^{-58}:\\
\;\;\;\;\frac{a \cdot \left(t + y\right) + t\_4}{t\_2}\\
\mathbf{elif}\;a \leq -6.5 \cdot 10^{-195}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 5.6 \cdot 10^{-255}:\\
\;\;\;\;\frac{t\_4 - y \cdot b}{t\_2}\\
\mathbf{elif}\;a \leq 1.85 \cdot 10^{-103}:\\
\;\;\;\;z \cdot \frac{x + y}{t\_2}\\
\mathbf{elif}\;a \leq 4.5 \cdot 10^{+139}:\\
\;\;\;\;a \cdot \left(\left(\frac{z}{a} - b \cdot \frac{y}{\left(x + y\right) \cdot a}\right) + \frac{y}{x + y}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if a < -1.04999999999999993e89 or 4.4999999999999999e139 < a Initial program 41.8%
Taylor expanded in a around inf 36.7%
associate-/l*81.4%
+-commutative81.4%
associate-+r+81.4%
+-commutative81.4%
associate-+l+81.4%
Simplified81.4%
if -1.04999999999999993e89 < a < -2.5e18 or -2.6500000000000002e-58 < a < -6.50000000000000004e-195Initial program 57.5%
Taylor expanded in y around inf 73.9%
if -2.5e18 < a < -2.6500000000000002e-58Initial program 82.2%
Taylor expanded in b around 0 72.8%
if -6.50000000000000004e-195 < a < 5.60000000000000023e-255Initial program 81.4%
Taylor expanded in a around 0 72.5%
+-commutative72.5%
*-commutative72.5%
Simplified72.5%
if 5.60000000000000023e-255 < a < 1.85e-103Initial program 57.7%
Taylor expanded in z around inf 30.5%
associate-/l*72.2%
+-commutative72.2%
+-commutative72.2%
associate-+r+72.2%
+-commutative72.2%
associate-+l+72.2%
Simplified72.2%
if 1.85e-103 < a < 4.4999999999999999e139Initial program 66.9%
Taylor expanded in a around inf 76.0%
associate--l+76.0%
+-commutative76.0%
+-commutative76.0%
associate-/l*85.4%
+-commutative85.4%
+-commutative85.4%
*-commutative85.4%
+-commutative85.4%
Simplified85.4%
Taylor expanded in t around 0 71.4%
associate--l+71.4%
associate-/l*76.2%
Simplified76.2%
Final simplification76.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* z (+ x y)))
(t_2 (+ y (+ x t)))
(t_3 (/ (+ (* a (+ t y)) t_1) t_2))
(t_4 (- (+ z a) b)))
(if (<= y -1.1e+126)
t_4
(if (<= y -1.7e-51)
(/ (- t_1 (* y b)) t_2)
(if (<= y -2.1e-53)
a
(if (<= y 1.1e-294)
t_3
(if (<= y 1.35e-160)
(* x (/ (+ z (* a (/ t x))) (+ x t)))
(if (<= y 6.5e+24) t_3 t_4))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z * (x + y);
double t_2 = y + (x + t);
double t_3 = ((a * (t + y)) + t_1) / t_2;
double t_4 = (z + a) - b;
double tmp;
if (y <= -1.1e+126) {
tmp = t_4;
} else if (y <= -1.7e-51) {
tmp = (t_1 - (y * b)) / t_2;
} else if (y <= -2.1e-53) {
tmp = a;
} else if (y <= 1.1e-294) {
tmp = t_3;
} else if (y <= 1.35e-160) {
tmp = x * ((z + (a * (t / x))) / (x + t));
} else if (y <= 6.5e+24) {
tmp = t_3;
} 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 = z * (x + y)
t_2 = y + (x + t)
t_3 = ((a * (t + y)) + t_1) / t_2
t_4 = (z + a) - b
if (y <= (-1.1d+126)) then
tmp = t_4
else if (y <= (-1.7d-51)) then
tmp = (t_1 - (y * b)) / t_2
else if (y <= (-2.1d-53)) then
tmp = a
else if (y <= 1.1d-294) then
tmp = t_3
else if (y <= 1.35d-160) then
tmp = x * ((z + (a * (t / x))) / (x + t))
else if (y <= 6.5d+24) then
tmp = t_3
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 = z * (x + y);
double t_2 = y + (x + t);
double t_3 = ((a * (t + y)) + t_1) / t_2;
double t_4 = (z + a) - b;
double tmp;
if (y <= -1.1e+126) {
tmp = t_4;
} else if (y <= -1.7e-51) {
tmp = (t_1 - (y * b)) / t_2;
} else if (y <= -2.1e-53) {
tmp = a;
} else if (y <= 1.1e-294) {
tmp = t_3;
} else if (y <= 1.35e-160) {
tmp = x * ((z + (a * (t / x))) / (x + t));
} else if (y <= 6.5e+24) {
tmp = t_3;
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z * (x + y) t_2 = y + (x + t) t_3 = ((a * (t + y)) + t_1) / t_2 t_4 = (z + a) - b tmp = 0 if y <= -1.1e+126: tmp = t_4 elif y <= -1.7e-51: tmp = (t_1 - (y * b)) / t_2 elif y <= -2.1e-53: tmp = a elif y <= 1.1e-294: tmp = t_3 elif y <= 1.35e-160: tmp = x * ((z + (a * (t / x))) / (x + t)) elif y <= 6.5e+24: tmp = t_3 else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z * Float64(x + y)) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(Float64(Float64(a * Float64(t + y)) + t_1) / t_2) t_4 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -1.1e+126) tmp = t_4; elseif (y <= -1.7e-51) tmp = Float64(Float64(t_1 - Float64(y * b)) / t_2); elseif (y <= -2.1e-53) tmp = a; elseif (y <= 1.1e-294) tmp = t_3; elseif (y <= 1.35e-160) tmp = Float64(x * Float64(Float64(z + Float64(a * Float64(t / x))) / Float64(x + t))); elseif (y <= 6.5e+24) tmp = t_3; else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z * (x + y); t_2 = y + (x + t); t_3 = ((a * (t + y)) + t_1) / t_2; t_4 = (z + a) - b; tmp = 0.0; if (y <= -1.1e+126) tmp = t_4; elseif (y <= -1.7e-51) tmp = (t_1 - (y * b)) / t_2; elseif (y <= -2.1e-53) tmp = a; elseif (y <= 1.1e-294) tmp = t_3; elseif (y <= 1.35e-160) tmp = x * ((z + (a * (t / x))) / (x + t)); elseif (y <= 6.5e+24) tmp = t_3; else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -1.1e+126], t$95$4, If[LessEqual[y, -1.7e-51], N[(N[(t$95$1 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[y, -2.1e-53], a, If[LessEqual[y, 1.1e-294], t$95$3, If[LessEqual[y, 1.35e-160], N[(x * N[(N[(z + N[(a * N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e+24], t$95$3, t$95$4]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z \cdot \left(x + y\right)\\
t_2 := y + \left(x + t\right)\\
t_3 := \frac{a \cdot \left(t + y\right) + t\_1}{t\_2}\\
t_4 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -1.1 \cdot 10^{+126}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;y \leq -1.7 \cdot 10^{-51}:\\
\;\;\;\;\frac{t\_1 - y \cdot b}{t\_2}\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-53}:\\
\;\;\;\;a\\
\mathbf{elif}\;y \leq 1.1 \cdot 10^{-294}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;y \leq 1.35 \cdot 10^{-160}:\\
\;\;\;\;x \cdot \frac{z + a \cdot \frac{t}{x}}{x + t}\\
\mathbf{elif}\;y \leq 6.5 \cdot 10^{+24}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
if y < -1.09999999999999999e126 or 6.4999999999999996e24 < y Initial program 36.6%
Taylor expanded in y around inf 79.1%
if -1.09999999999999999e126 < y < -1.70000000000000001e-51Initial program 78.7%
Taylor expanded in a around 0 70.4%
+-commutative70.4%
*-commutative70.4%
Simplified70.4%
if -1.70000000000000001e-51 < y < -2.09999999999999977e-53Initial program 4.8%
Taylor expanded in t around inf 100.0%
if -2.09999999999999977e-53 < y < 1.1e-294 or 1.35000000000000005e-160 < y < 6.4999999999999996e24Initial program 80.6%
Taylor expanded in b around 0 73.7%
if 1.1e-294 < y < 1.35000000000000005e-160Initial program 52.7%
Taylor expanded in x around inf 52.7%
associate-/l*48.2%
associate-/l*43.1%
Simplified43.1%
Taylor expanded in y around 0 45.4%
associate-/l*56.8%
associate-/l*64.3%
+-commutative64.3%
Simplified64.3%
Final simplification74.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ y (+ x t))) (t_3 (* a (/ (+ t y) t_2))))
(if (<= a -5.4e+88)
t_3
(if (<= a -1.05e+18)
t_1
(if (<= a -3.6e-54)
(/ (+ (* t a) (* z x)) (+ x t))
(if (<= a -2.2e-196)
t_1
(if (<= a 3.4e-255)
(/ (- (* z (+ x y)) (* y b)) t_2)
(if (<= a 9.2e-88)
(* z (/ (+ x y) t_2))
(if (<= a 2.4e+138) t_1 t_3)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = a * ((t + y) / t_2);
double tmp;
if (a <= -5.4e+88) {
tmp = t_3;
} else if (a <= -1.05e+18) {
tmp = t_1;
} else if (a <= -3.6e-54) {
tmp = ((t * a) + (z * x)) / (x + t);
} else if (a <= -2.2e-196) {
tmp = t_1;
} else if (a <= 3.4e-255) {
tmp = ((z * (x + y)) - (y * b)) / t_2;
} else if (a <= 9.2e-88) {
tmp = z * ((x + y) / t_2);
} else if (a <= 2.4e+138) {
tmp = t_1;
} 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 = (z + a) - b
t_2 = y + (x + t)
t_3 = a * ((t + y) / t_2)
if (a <= (-5.4d+88)) then
tmp = t_3
else if (a <= (-1.05d+18)) then
tmp = t_1
else if (a <= (-3.6d-54)) then
tmp = ((t * a) + (z * x)) / (x + t)
else if (a <= (-2.2d-196)) then
tmp = t_1
else if (a <= 3.4d-255) then
tmp = ((z * (x + y)) - (y * b)) / t_2
else if (a <= 9.2d-88) then
tmp = z * ((x + y) / t_2)
else if (a <= 2.4d+138) then
tmp = t_1
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 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = a * ((t + y) / t_2);
double tmp;
if (a <= -5.4e+88) {
tmp = t_3;
} else if (a <= -1.05e+18) {
tmp = t_1;
} else if (a <= -3.6e-54) {
tmp = ((t * a) + (z * x)) / (x + t);
} else if (a <= -2.2e-196) {
tmp = t_1;
} else if (a <= 3.4e-255) {
tmp = ((z * (x + y)) - (y * b)) / t_2;
} else if (a <= 9.2e-88) {
tmp = z * ((x + y) / t_2);
} else if (a <= 2.4e+138) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = y + (x + t) t_3 = a * ((t + y) / t_2) tmp = 0 if a <= -5.4e+88: tmp = t_3 elif a <= -1.05e+18: tmp = t_1 elif a <= -3.6e-54: tmp = ((t * a) + (z * x)) / (x + t) elif a <= -2.2e-196: tmp = t_1 elif a <= 3.4e-255: tmp = ((z * (x + y)) - (y * b)) / t_2 elif a <= 9.2e-88: tmp = z * ((x + y) / t_2) elif a <= 2.4e+138: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(a * Float64(Float64(t + y) / t_2)) tmp = 0.0 if (a <= -5.4e+88) tmp = t_3; elseif (a <= -1.05e+18) tmp = t_1; elseif (a <= -3.6e-54) tmp = Float64(Float64(Float64(t * a) + Float64(z * x)) / Float64(x + t)); elseif (a <= -2.2e-196) tmp = t_1; elseif (a <= 3.4e-255) tmp = Float64(Float64(Float64(z * Float64(x + y)) - Float64(y * b)) / t_2); elseif (a <= 9.2e-88) tmp = Float64(z * Float64(Float64(x + y) / t_2)); elseif (a <= 2.4e+138) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = y + (x + t); t_3 = a * ((t + y) / t_2); tmp = 0.0; if (a <= -5.4e+88) tmp = t_3; elseif (a <= -1.05e+18) tmp = t_1; elseif (a <= -3.6e-54) tmp = ((t * a) + (z * x)) / (x + t); elseif (a <= -2.2e-196) tmp = t_1; elseif (a <= 3.4e-255) tmp = ((z * (x + y)) - (y * b)) / t_2; elseif (a <= 9.2e-88) tmp = z * ((x + y) / t_2); elseif (a <= 2.4e+138) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(N[(t + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.4e+88], t$95$3, If[LessEqual[a, -1.05e+18], t$95$1, If[LessEqual[a, -3.6e-54], N[(N[(N[(t * a), $MachinePrecision] + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -2.2e-196], t$95$1, If[LessEqual[a, 3.4e-255], N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[a, 9.2e-88], N[(z * N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.4e+138], t$95$1, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := y + \left(x + t\right)\\
t_3 := a \cdot \frac{t + y}{t\_2}\\
\mathbf{if}\;a \leq -5.4 \cdot 10^{+88}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq -1.05 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -3.6 \cdot 10^{-54}:\\
\;\;\;\;\frac{t \cdot a + z \cdot x}{x + t}\\
\mathbf{elif}\;a \leq -2.2 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-255}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{t\_2}\\
\mathbf{elif}\;a \leq 9.2 \cdot 10^{-88}:\\
\;\;\;\;z \cdot \frac{x + y}{t\_2}\\
\mathbf{elif}\;a \leq 2.4 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if a < -5.40000000000000031e88 or 2.4000000000000001e138 < a Initial program 41.8%
Taylor expanded in a around inf 36.7%
associate-/l*81.4%
+-commutative81.4%
associate-+r+81.4%
+-commutative81.4%
associate-+l+81.4%
Simplified81.4%
if -5.40000000000000031e88 < a < -1.05e18 or -3.59999999999999976e-54 < a < -2.20000000000000015e-196 or 9.19999999999999945e-88 < a < 2.4000000000000001e138Initial program 60.6%
Taylor expanded in y around inf 72.0%
if -1.05e18 < a < -3.59999999999999976e-54Initial program 82.2%
Taylor expanded in y around 0 66.4%
if -2.20000000000000015e-196 < a < 3.39999999999999983e-255Initial program 81.4%
Taylor expanded in a around 0 72.5%
+-commutative72.5%
*-commutative72.5%
Simplified72.5%
if 3.39999999999999983e-255 < a < 9.19999999999999945e-88Initial program 61.9%
Taylor expanded in z around inf 35.2%
associate-/l*72.7%
+-commutative72.7%
+-commutative72.7%
associate-+r+72.7%
+-commutative72.7%
associate-+l+72.7%
Simplified72.7%
Final simplification74.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ y (+ x t))) (t_3 (* a (/ (+ t y) t_2))))
(if (<= a -5.8e+88)
t_3
(if (<= a -3e+17)
t_1
(if (<= a -3.8e-54)
(/ (+ (* t a) (* z x)) (+ x t))
(if (<= a -8e-196)
t_1
(if (<= a 1.06e-254)
(/ (- (* z x) (* y b)) t_2)
(if (<= a 1.96e-87)
(* z (/ (+ x y) t_2))
(if (<= a 6.6e+138) t_1 t_3)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = a * ((t + y) / t_2);
double tmp;
if (a <= -5.8e+88) {
tmp = t_3;
} else if (a <= -3e+17) {
tmp = t_1;
} else if (a <= -3.8e-54) {
tmp = ((t * a) + (z * x)) / (x + t);
} else if (a <= -8e-196) {
tmp = t_1;
} else if (a <= 1.06e-254) {
tmp = ((z * x) - (y * b)) / t_2;
} else if (a <= 1.96e-87) {
tmp = z * ((x + y) / t_2);
} else if (a <= 6.6e+138) {
tmp = t_1;
} 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 = (z + a) - b
t_2 = y + (x + t)
t_3 = a * ((t + y) / t_2)
if (a <= (-5.8d+88)) then
tmp = t_3
else if (a <= (-3d+17)) then
tmp = t_1
else if (a <= (-3.8d-54)) then
tmp = ((t * a) + (z * x)) / (x + t)
else if (a <= (-8d-196)) then
tmp = t_1
else if (a <= 1.06d-254) then
tmp = ((z * x) - (y * b)) / t_2
else if (a <= 1.96d-87) then
tmp = z * ((x + y) / t_2)
else if (a <= 6.6d+138) then
tmp = t_1
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 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = a * ((t + y) / t_2);
double tmp;
if (a <= -5.8e+88) {
tmp = t_3;
} else if (a <= -3e+17) {
tmp = t_1;
} else if (a <= -3.8e-54) {
tmp = ((t * a) + (z * x)) / (x + t);
} else if (a <= -8e-196) {
tmp = t_1;
} else if (a <= 1.06e-254) {
tmp = ((z * x) - (y * b)) / t_2;
} else if (a <= 1.96e-87) {
tmp = z * ((x + y) / t_2);
} else if (a <= 6.6e+138) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = y + (x + t) t_3 = a * ((t + y) / t_2) tmp = 0 if a <= -5.8e+88: tmp = t_3 elif a <= -3e+17: tmp = t_1 elif a <= -3.8e-54: tmp = ((t * a) + (z * x)) / (x + t) elif a <= -8e-196: tmp = t_1 elif a <= 1.06e-254: tmp = ((z * x) - (y * b)) / t_2 elif a <= 1.96e-87: tmp = z * ((x + y) / t_2) elif a <= 6.6e+138: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(a * Float64(Float64(t + y) / t_2)) tmp = 0.0 if (a <= -5.8e+88) tmp = t_3; elseif (a <= -3e+17) tmp = t_1; elseif (a <= -3.8e-54) tmp = Float64(Float64(Float64(t * a) + Float64(z * x)) / Float64(x + t)); elseif (a <= -8e-196) tmp = t_1; elseif (a <= 1.06e-254) tmp = Float64(Float64(Float64(z * x) - Float64(y * b)) / t_2); elseif (a <= 1.96e-87) tmp = Float64(z * Float64(Float64(x + y) / t_2)); elseif (a <= 6.6e+138) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = y + (x + t); t_3 = a * ((t + y) / t_2); tmp = 0.0; if (a <= -5.8e+88) tmp = t_3; elseif (a <= -3e+17) tmp = t_1; elseif (a <= -3.8e-54) tmp = ((t * a) + (z * x)) / (x + t); elseif (a <= -8e-196) tmp = t_1; elseif (a <= 1.06e-254) tmp = ((z * x) - (y * b)) / t_2; elseif (a <= 1.96e-87) tmp = z * ((x + y) / t_2); elseif (a <= 6.6e+138) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(N[(t + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.8e+88], t$95$3, If[LessEqual[a, -3e+17], t$95$1, If[LessEqual[a, -3.8e-54], N[(N[(N[(t * a), $MachinePrecision] + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -8e-196], t$95$1, If[LessEqual[a, 1.06e-254], N[(N[(N[(z * x), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[a, 1.96e-87], N[(z * N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.6e+138], t$95$1, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := y + \left(x + t\right)\\
t_3 := a \cdot \frac{t + y}{t\_2}\\
\mathbf{if}\;a \leq -5.8 \cdot 10^{+88}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq -3 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -3.8 \cdot 10^{-54}:\\
\;\;\;\;\frac{t \cdot a + z \cdot x}{x + t}\\
\mathbf{elif}\;a \leq -8 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.06 \cdot 10^{-254}:\\
\;\;\;\;\frac{z \cdot x - y \cdot b}{t\_2}\\
\mathbf{elif}\;a \leq 1.96 \cdot 10^{-87}:\\
\;\;\;\;z \cdot \frac{x + y}{t\_2}\\
\mathbf{elif}\;a \leq 6.6 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if a < -5.7999999999999999e88 or 6.59999999999999956e138 < a Initial program 41.8%
Taylor expanded in a around inf 36.7%
associate-/l*81.4%
+-commutative81.4%
associate-+r+81.4%
+-commutative81.4%
associate-+l+81.4%
Simplified81.4%
if -5.7999999999999999e88 < a < -3e17 or -3.8000000000000002e-54 < a < -8.0000000000000004e-196 or 1.96000000000000011e-87 < a < 6.59999999999999956e138Initial program 60.6%
Taylor expanded in y around inf 72.0%
if -3e17 < a < -3.8000000000000002e-54Initial program 82.2%
Taylor expanded in y around 0 66.4%
if -8.0000000000000004e-196 < a < 1.0600000000000001e-254Initial program 81.4%
Taylor expanded in x around inf 76.8%
associate-/l*65.1%
associate-/l*60.4%
Simplified60.4%
Taylor expanded in x around inf 66.7%
if 1.0600000000000001e-254 < a < 1.96000000000000011e-87Initial program 61.9%
Taylor expanded in z around inf 35.2%
associate-/l*72.7%
+-commutative72.7%
+-commutative72.7%
associate-+r+72.7%
+-commutative72.7%
associate-+l+72.7%
Simplified72.7%
Final simplification73.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ y (+ x t))) (t_3 (* a (/ (+ t y) t_2))))
(if (<= a -8.2e+88)
t_3
(if (<= a -7.5e+18)
t_1
(if (<= a -4e-57)
(/ (+ (* t a) (* z x)) (+ x t))
(if (<= a -3.15e-199)
t_1
(if (<= a 7.2e-88)
(* z (/ (+ x y) t_2))
(if (<= a 2.1e+136) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = a * ((t + y) / t_2);
double tmp;
if (a <= -8.2e+88) {
tmp = t_3;
} else if (a <= -7.5e+18) {
tmp = t_1;
} else if (a <= -4e-57) {
tmp = ((t * a) + (z * x)) / (x + t);
} else if (a <= -3.15e-199) {
tmp = t_1;
} else if (a <= 7.2e-88) {
tmp = z * ((x + y) / t_2);
} else if (a <= 2.1e+136) {
tmp = t_1;
} 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 = (z + a) - b
t_2 = y + (x + t)
t_3 = a * ((t + y) / t_2)
if (a <= (-8.2d+88)) then
tmp = t_3
else if (a <= (-7.5d+18)) then
tmp = t_1
else if (a <= (-4d-57)) then
tmp = ((t * a) + (z * x)) / (x + t)
else if (a <= (-3.15d-199)) then
tmp = t_1
else if (a <= 7.2d-88) then
tmp = z * ((x + y) / t_2)
else if (a <= 2.1d+136) then
tmp = t_1
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 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = a * ((t + y) / t_2);
double tmp;
if (a <= -8.2e+88) {
tmp = t_3;
} else if (a <= -7.5e+18) {
tmp = t_1;
} else if (a <= -4e-57) {
tmp = ((t * a) + (z * x)) / (x + t);
} else if (a <= -3.15e-199) {
tmp = t_1;
} else if (a <= 7.2e-88) {
tmp = z * ((x + y) / t_2);
} else if (a <= 2.1e+136) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = y + (x + t) t_3 = a * ((t + y) / t_2) tmp = 0 if a <= -8.2e+88: tmp = t_3 elif a <= -7.5e+18: tmp = t_1 elif a <= -4e-57: tmp = ((t * a) + (z * x)) / (x + t) elif a <= -3.15e-199: tmp = t_1 elif a <= 7.2e-88: tmp = z * ((x + y) / t_2) elif a <= 2.1e+136: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(a * Float64(Float64(t + y) / t_2)) tmp = 0.0 if (a <= -8.2e+88) tmp = t_3; elseif (a <= -7.5e+18) tmp = t_1; elseif (a <= -4e-57) tmp = Float64(Float64(Float64(t * a) + Float64(z * x)) / Float64(x + t)); elseif (a <= -3.15e-199) tmp = t_1; elseif (a <= 7.2e-88) tmp = Float64(z * Float64(Float64(x + y) / t_2)); elseif (a <= 2.1e+136) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = y + (x + t); t_3 = a * ((t + y) / t_2); tmp = 0.0; if (a <= -8.2e+88) tmp = t_3; elseif (a <= -7.5e+18) tmp = t_1; elseif (a <= -4e-57) tmp = ((t * a) + (z * x)) / (x + t); elseif (a <= -3.15e-199) tmp = t_1; elseif (a <= 7.2e-88) tmp = z * ((x + y) / t_2); elseif (a <= 2.1e+136) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(N[(t + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8.2e+88], t$95$3, If[LessEqual[a, -7.5e+18], t$95$1, If[LessEqual[a, -4e-57], N[(N[(N[(t * a), $MachinePrecision] + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -3.15e-199], t$95$1, If[LessEqual[a, 7.2e-88], N[(z * N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.1e+136], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := y + \left(x + t\right)\\
t_3 := a \cdot \frac{t + y}{t\_2}\\
\mathbf{if}\;a \leq -8.2 \cdot 10^{+88}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq -7.5 \cdot 10^{+18}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -4 \cdot 10^{-57}:\\
\;\;\;\;\frac{t \cdot a + z \cdot x}{x + t}\\
\mathbf{elif}\;a \leq -3.15 \cdot 10^{-199}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 7.2 \cdot 10^{-88}:\\
\;\;\;\;z \cdot \frac{x + y}{t\_2}\\
\mathbf{elif}\;a \leq 2.1 \cdot 10^{+136}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if a < -8.20000000000000055e88 or 2.0999999999999999e136 < a Initial program 41.8%
Taylor expanded in a around inf 36.7%
associate-/l*81.4%
+-commutative81.4%
associate-+r+81.4%
+-commutative81.4%
associate-+l+81.4%
Simplified81.4%
if -8.20000000000000055e88 < a < -7.5e18 or -3.99999999999999982e-57 < a < -3.1499999999999998e-199 or 7.1999999999999999e-88 < a < 2.0999999999999999e136Initial program 61.5%
Taylor expanded in y around inf 71.5%
if -7.5e18 < a < -3.99999999999999982e-57Initial program 82.2%
Taylor expanded in y around 0 66.4%
if -3.1499999999999998e-199 < a < 7.1999999999999999e-88Initial program 72.5%
Taylor expanded in z around inf 37.6%
associate-/l*61.8%
+-commutative61.8%
+-commutative61.8%
associate-+r+61.8%
+-commutative61.8%
associate-+l+61.8%
Simplified61.8%
Final simplification71.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ y (+ x t))) (t_3 (* a (/ (+ t y) t_2))))
(if (<= a -1.1e+89)
t_3
(if (<= a -1.8e+17)
t_1
(if (<= a 2.2e-89)
(* z (/ (+ x y) t_2))
(if (<= a 2.3e+138) t_1 t_3))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = a * ((t + y) / t_2);
double tmp;
if (a <= -1.1e+89) {
tmp = t_3;
} else if (a <= -1.8e+17) {
tmp = t_1;
} else if (a <= 2.2e-89) {
tmp = z * ((x + y) / t_2);
} else if (a <= 2.3e+138) {
tmp = t_1;
} 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 = (z + a) - b
t_2 = y + (x + t)
t_3 = a * ((t + y) / t_2)
if (a <= (-1.1d+89)) then
tmp = t_3
else if (a <= (-1.8d+17)) then
tmp = t_1
else if (a <= 2.2d-89) then
tmp = z * ((x + y) / t_2)
else if (a <= 2.3d+138) then
tmp = t_1
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 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = a * ((t + y) / t_2);
double tmp;
if (a <= -1.1e+89) {
tmp = t_3;
} else if (a <= -1.8e+17) {
tmp = t_1;
} else if (a <= 2.2e-89) {
tmp = z * ((x + y) / t_2);
} else if (a <= 2.3e+138) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = y + (x + t) t_3 = a * ((t + y) / t_2) tmp = 0 if a <= -1.1e+89: tmp = t_3 elif a <= -1.8e+17: tmp = t_1 elif a <= 2.2e-89: tmp = z * ((x + y) / t_2) elif a <= 2.3e+138: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(a * Float64(Float64(t + y) / t_2)) tmp = 0.0 if (a <= -1.1e+89) tmp = t_3; elseif (a <= -1.8e+17) tmp = t_1; elseif (a <= 2.2e-89) tmp = Float64(z * Float64(Float64(x + y) / t_2)); elseif (a <= 2.3e+138) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = y + (x + t); t_3 = a * ((t + y) / t_2); tmp = 0.0; if (a <= -1.1e+89) tmp = t_3; elseif (a <= -1.8e+17) tmp = t_1; elseif (a <= 2.2e-89) tmp = z * ((x + y) / t_2); elseif (a <= 2.3e+138) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a * N[(N[(t + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.1e+89], t$95$3, If[LessEqual[a, -1.8e+17], t$95$1, If[LessEqual[a, 2.2e-89], N[(z * N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.3e+138], t$95$1, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := y + \left(x + t\right)\\
t_3 := a \cdot \frac{t + y}{t\_2}\\
\mathbf{if}\;a \leq -1.1 \cdot 10^{+89}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;a \leq -1.8 \cdot 10^{+17}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{-89}:\\
\;\;\;\;z \cdot \frac{x + y}{t\_2}\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{+138}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if a < -1.1e89 or 2.30000000000000008e138 < a Initial program 41.8%
Taylor expanded in a around inf 36.7%
associate-/l*81.4%
+-commutative81.4%
associate-+r+81.4%
+-commutative81.4%
associate-+l+81.4%
Simplified81.4%
if -1.1e89 < a < -1.8e17 or 2.20000000000000012e-89 < a < 2.30000000000000008e138Initial program 60.4%
Taylor expanded in y around inf 73.6%
if -1.8e17 < a < 2.20000000000000012e-89Initial program 71.4%
Taylor expanded in z around inf 36.8%
associate-/l*59.8%
+-commutative59.8%
+-commutative59.8%
associate-+r+59.8%
+-commutative59.8%
associate-+l+59.8%
Simplified59.8%
Final simplification69.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (/ (+ t y) (+ y (+ x t))))))
(if (<= a -1.2e+89)
t_1
(if (<= a -6.2e-137)
(- (+ z a) b)
(if (<= a 7.8e-248)
(* b (- (/ a b) (/ y (+ t y))))
(if (<= a 2.8e+32) (- z (/ (* y b) (+ x y))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * ((t + y) / (y + (x + t)));
double tmp;
if (a <= -1.2e+89) {
tmp = t_1;
} else if (a <= -6.2e-137) {
tmp = (z + a) - b;
} else if (a <= 7.8e-248) {
tmp = b * ((a / b) - (y / (t + y)));
} else if (a <= 2.8e+32) {
tmp = z - ((y * b) / (x + y));
} 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 * ((t + y) / (y + (x + t)))
if (a <= (-1.2d+89)) then
tmp = t_1
else if (a <= (-6.2d-137)) then
tmp = (z + a) - b
else if (a <= 7.8d-248) then
tmp = b * ((a / b) - (y / (t + y)))
else if (a <= 2.8d+32) then
tmp = z - ((y * b) / (x + y))
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 * ((t + y) / (y + (x + t)));
double tmp;
if (a <= -1.2e+89) {
tmp = t_1;
} else if (a <= -6.2e-137) {
tmp = (z + a) - b;
} else if (a <= 7.8e-248) {
tmp = b * ((a / b) - (y / (t + y)));
} else if (a <= 2.8e+32) {
tmp = z - ((y * b) / (x + y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * ((t + y) / (y + (x + t))) tmp = 0 if a <= -1.2e+89: tmp = t_1 elif a <= -6.2e-137: tmp = (z + a) - b elif a <= 7.8e-248: tmp = b * ((a / b) - (y / (t + y))) elif a <= 2.8e+32: tmp = z - ((y * b) / (x + y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(Float64(t + y) / Float64(y + Float64(x + t)))) tmp = 0.0 if (a <= -1.2e+89) tmp = t_1; elseif (a <= -6.2e-137) tmp = Float64(Float64(z + a) - b); elseif (a <= 7.8e-248) tmp = Float64(b * Float64(Float64(a / b) - Float64(y / Float64(t + y)))); elseif (a <= 2.8e+32) tmp = Float64(z - Float64(Float64(y * b) / Float64(x + y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * ((t + y) / (y + (x + t))); tmp = 0.0; if (a <= -1.2e+89) tmp = t_1; elseif (a <= -6.2e-137) tmp = (z + a) - b; elseif (a <= 7.8e-248) tmp = b * ((a / b) - (y / (t + y))); elseif (a <= 2.8e+32) tmp = z - ((y * b) / (x + y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(N[(t + y), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.2e+89], t$95$1, If[LessEqual[a, -6.2e-137], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[a, 7.8e-248], N[(b * N[(N[(a / b), $MachinePrecision] - N[(y / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.8e+32], N[(z - N[(N[(y * b), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \frac{t + y}{y + \left(x + t\right)}\\
\mathbf{if}\;a \leq -1.2 \cdot 10^{+89}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -6.2 \cdot 10^{-137}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{-248}:\\
\;\;\;\;b \cdot \left(\frac{a}{b} - \frac{y}{t + y}\right)\\
\mathbf{elif}\;a \leq 2.8 \cdot 10^{+32}:\\
\;\;\;\;z - \frac{y \cdot b}{x + y}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.20000000000000002e89 or 2.8e32 < a Initial program 44.2%
Taylor expanded in a around inf 36.5%
associate-/l*77.3%
+-commutative77.3%
associate-+r+77.3%
+-commutative77.3%
associate-+l+77.3%
Simplified77.3%
if -1.20000000000000002e89 < a < -6.19999999999999955e-137Initial program 67.1%
Taylor expanded in y around inf 66.9%
if -6.19999999999999955e-137 < a < 7.800000000000001e-248Initial program 72.9%
Taylor expanded in z around 0 43.4%
*-commutative43.4%
Simplified43.4%
Taylor expanded in x around 0 39.8%
Taylor expanded in b around inf 46.2%
+-commutative46.2%
mul-1-neg46.2%
unsub-neg46.2%
+-commutative46.2%
Simplified46.2%
if 7.800000000000001e-248 < a < 2.8e32Initial program 69.0%
Taylor expanded in a around inf 68.8%
associate--l+68.8%
+-commutative68.8%
+-commutative68.8%
associate-/l*77.7%
+-commutative77.7%
+-commutative77.7%
*-commutative77.7%
+-commutative77.7%
Simplified77.7%
Taylor expanded in t around 0 61.4%
associate--l+61.4%
associate-/l*63.7%
Simplified63.7%
Taylor expanded in a around 0 71.3%
+-commutative71.3%
Simplified71.3%
Final simplification67.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -2.5e-178)
t_1
(if (<= y 7.3e-180)
(* a (/ t (+ x t)))
(if (<= y 8e+51) (* a (+ (/ z a) (/ y (+ x y)))) 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 <= -2.5e-178) {
tmp = t_1;
} else if (y <= 7.3e-180) {
tmp = a * (t / (x + t));
} else if (y <= 8e+51) {
tmp = a * ((z / a) + (y / (x + y)));
} 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 <= (-2.5d-178)) then
tmp = t_1
else if (y <= 7.3d-180) then
tmp = a * (t / (x + t))
else if (y <= 8d+51) then
tmp = a * ((z / a) + (y / (x + y)))
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 <= -2.5e-178) {
tmp = t_1;
} else if (y <= 7.3e-180) {
tmp = a * (t / (x + t));
} else if (y <= 8e+51) {
tmp = a * ((z / a) + (y / (x + y)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -2.5e-178: tmp = t_1 elif y <= 7.3e-180: tmp = a * (t / (x + t)) elif y <= 8e+51: tmp = a * ((z / a) + (y / (x + y))) 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 <= -2.5e-178) tmp = t_1; elseif (y <= 7.3e-180) tmp = Float64(a * Float64(t / Float64(x + t))); elseif (y <= 8e+51) tmp = Float64(a * Float64(Float64(z / a) + Float64(y / Float64(x + y)))); 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 <= -2.5e-178) tmp = t_1; elseif (y <= 7.3e-180) tmp = a * (t / (x + t)); elseif (y <= 8e+51) tmp = a * ((z / a) + (y / (x + y))); 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, -2.5e-178], t$95$1, If[LessEqual[y, 7.3e-180], N[(a * N[(t / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 8e+51], N[(a * N[(N[(z / a), $MachinePrecision] + N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{-178}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 7.3 \cdot 10^{-180}:\\
\;\;\;\;a \cdot \frac{t}{x + t}\\
\mathbf{elif}\;y \leq 8 \cdot 10^{+51}:\\
\;\;\;\;a \cdot \left(\frac{z}{a} + \frac{y}{x + y}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -2.49999999999999988e-178 or 8e51 < y Initial program 49.2%
Taylor expanded in y around inf 69.9%
if -2.49999999999999988e-178 < y < 7.2999999999999996e-180Initial program 67.1%
Taylor expanded in z around 0 42.4%
*-commutative42.4%
Simplified42.4%
Taylor expanded in y around 0 38.1%
associate-/l*55.0%
+-commutative55.0%
Simplified55.0%
if 7.2999999999999996e-180 < y < 8e51Initial program 79.9%
Taylor expanded in a around inf 89.3%
associate--l+89.3%
+-commutative89.3%
+-commutative89.3%
associate-/l*93.6%
+-commutative93.6%
+-commutative93.6%
*-commutative93.6%
+-commutative93.6%
Simplified93.6%
Taylor expanded in t around 0 58.6%
associate--l+58.6%
associate-/l*58.6%
Simplified58.6%
Taylor expanded in b around 0 58.0%
+-commutative58.0%
Simplified58.0%
Final simplification63.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.75e-180) (not (<= y 3.45e+55))) (- (+ z a) b) (* a (/ (+ t y) (+ y (+ x t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.75e-180) || !(y <= 3.45e+55)) {
tmp = (z + a) - b;
} else {
tmp = a * ((t + y) / (y + (x + t)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.75d-180)) .or. (.not. (y <= 3.45d+55))) then
tmp = (z + a) - b
else
tmp = a * ((t + y) / (y + (x + t)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.75e-180) || !(y <= 3.45e+55)) {
tmp = (z + a) - b;
} else {
tmp = a * ((t + y) / (y + (x + t)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.75e-180) or not (y <= 3.45e+55): tmp = (z + a) - b else: tmp = a * ((t + y) / (y + (x + t))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.75e-180) || !(y <= 3.45e+55)) tmp = Float64(Float64(z + a) - b); else tmp = Float64(a * Float64(Float64(t + y) / Float64(y + Float64(x + t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.75e-180) || ~((y <= 3.45e+55))) tmp = (z + a) - b; else tmp = a * ((t + y) / (y + (x + t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.75e-180], N[Not[LessEqual[y, 3.45e+55]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(a * N[(N[(t + y), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{-180} \lor \neg \left(y \leq 3.45 \cdot 10^{+55}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t + y}{y + \left(x + t\right)}\\
\end{array}
\end{array}
if y < -1.75e-180 or 3.4500000000000002e55 < y Initial program 49.1%
Taylor expanded in y around inf 70.1%
if -1.75e-180 < y < 3.4500000000000002e55Initial program 72.1%
Taylor expanded in a around inf 39.8%
associate-/l*56.0%
+-commutative56.0%
associate-+r+56.0%
+-commutative56.0%
associate-+l+56.0%
Simplified56.0%
Final simplification63.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.8e-178) (not (<= y 1.2e+20))) (- (+ z a) b) (* a (/ t (+ x t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.8e-178) || !(y <= 1.2e+20)) {
tmp = (z + a) - b;
} else {
tmp = a * (t / (x + t));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-4.8d-178)) .or. (.not. (y <= 1.2d+20))) then
tmp = (z + a) - b
else
tmp = a * (t / (x + t))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.8e-178) || !(y <= 1.2e+20)) {
tmp = (z + a) - b;
} else {
tmp = a * (t / (x + t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.8e-178) or not (y <= 1.2e+20): tmp = (z + a) - b else: tmp = a * (t / (x + t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.8e-178) || !(y <= 1.2e+20)) tmp = Float64(Float64(z + a) - b); else tmp = Float64(a * Float64(t / Float64(x + t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.8e-178) || ~((y <= 1.2e+20))) tmp = (z + a) - b; else tmp = a * (t / (x + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.8e-178], N[Not[LessEqual[y, 1.2e+20]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(a * N[(t / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{-178} \lor \neg \left(y \leq 1.2 \cdot 10^{+20}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t}{x + t}\\
\end{array}
\end{array}
if y < -4.8000000000000001e-178 or 1.2e20 < y Initial program 50.6%
Taylor expanded in y around inf 69.0%
if -4.8000000000000001e-178 < y < 1.2e20Initial program 72.1%
Taylor expanded in z around 0 46.8%
*-commutative46.8%
Simplified46.8%
Taylor expanded in y around 0 35.7%
associate-/l*50.8%
+-commutative50.8%
Simplified50.8%
Final simplification61.6%
(FPCore (x y z t a b) :precision binary64 (if (<= z -7.5) z (if (<= z 5.2e+61) (- a b) z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -7.5) {
tmp = z;
} else if (z <= 5.2e+61) {
tmp = a - b;
} else {
tmp = z;
}
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 (z <= (-7.5d0)) then
tmp = z
else if (z <= 5.2d+61) then
tmp = a - b
else
tmp = z
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 (z <= -7.5) {
tmp = z;
} else if (z <= 5.2e+61) {
tmp = a - b;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -7.5: tmp = z elif z <= 5.2e+61: tmp = a - b else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -7.5) tmp = z; elseif (z <= 5.2e+61) tmp = Float64(a - b); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -7.5) tmp = z; elseif (z <= 5.2e+61) tmp = a - b; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -7.5], z, If[LessEqual[z, 5.2e+61], N[(a - b), $MachinePrecision], z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.5:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{+61}:\\
\;\;\;\;a - b\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -7.5 or 5.19999999999999945e61 < z Initial program 46.9%
Taylor expanded in x around inf 56.3%
if -7.5 < z < 5.19999999999999945e61Initial program 70.0%
Taylor expanded in z around 0 54.1%
*-commutative54.1%
Simplified54.1%
Taylor expanded in y around inf 50.5%
(FPCore (x y z t a b) :precision binary64 (if (<= z -1.55e-32) z (if (<= z 4.6e+61) a z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.55e-32) {
tmp = z;
} else if (z <= 4.6e+61) {
tmp = a;
} else {
tmp = z;
}
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 (z <= (-1.55d-32)) then
tmp = z
else if (z <= 4.6d+61) then
tmp = a
else
tmp = z
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 (z <= -1.55e-32) {
tmp = z;
} else if (z <= 4.6e+61) {
tmp = a;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if z <= -1.55e-32: tmp = z elif z <= 4.6e+61: tmp = a else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.55e-32) tmp = z; elseif (z <= 4.6e+61) tmp = a; else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (z <= -1.55e-32) tmp = z; elseif (z <= 4.6e+61) tmp = a; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.55e-32], z, If[LessEqual[z, 4.6e+61], a, z]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.55 \cdot 10^{-32}:\\
\;\;\;\;z\\
\mathbf{elif}\;z \leq 4.6 \cdot 10^{+61}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if z < -1.55000000000000005e-32 or 4.5999999999999999e61 < z Initial program 47.0%
Taylor expanded in x around inf 55.5%
if -1.55000000000000005e-32 < z < 4.5999999999999999e61Initial program 70.2%
Taylor expanded in t around inf 46.3%
(FPCore (x y z t a b) :precision binary64 (if (<= t 6.6e+167) (- (+ z a) b) a))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 6.6e+167) {
tmp = (z + a) - b;
} 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 <= 6.6d+167) then
tmp = (z + a) - b
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 <= 6.6e+167) {
tmp = (z + a) - b;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 6.6e+167: tmp = (z + a) - b else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 6.6e+167) tmp = Float64(Float64(z + a) - b); else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= 6.6e+167) tmp = (z + a) - b; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 6.6e+167], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 6.6 \cdot 10^{+167}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < 6.60000000000000036e167Initial program 62.3%
Taylor expanded in y around inf 57.8%
if 6.60000000000000036e167 < t Initial program 40.9%
Taylor expanded in t around inf 67.7%
Final simplification59.1%
(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 59.4%
Taylor expanded in t around inf 34.6%
(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 2024086
(FPCore (x y z t a b)
:name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
:precision binary64
:alt
(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)))