
(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 20 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 (+ x (+ t y))))
(if (or (<= z -1.76e-71) (not (<= z 6.4e-41)))
(*
z
(+
(/ x t_1)
(- (+ (/ y t_1) (* (/ a z) (/ (+ t y) t_1))) (/ (* b (/ y z)) t_1))))
(+
(* a (/ (+ t y) (+ y (+ x t))))
(* b (- (* (+ x y) (/ (/ z b) t_2)) (/ y 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 = x + (t + y);
double tmp;
if ((z <= -1.76e-71) || !(z <= 6.4e-41)) {
tmp = z * ((x / t_1) + (((y / t_1) + ((a / z) * ((t + y) / t_1))) - ((b * (y / z)) / t_1)));
} else {
tmp = (a * ((t + y) / (y + (x + t)))) + (b * (((x + y) * ((z / b) / t_2)) - (y / t_2)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t + (x + y)
t_2 = x + (t + y)
if ((z <= (-1.76d-71)) .or. (.not. (z <= 6.4d-41))) 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) / (y + (x + t)))) + (b * (((x + y) * ((z / b) / t_2)) - (y / t_2)))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t + (x + y);
double t_2 = x + (t + y);
double tmp;
if ((z <= -1.76e-71) || !(z <= 6.4e-41)) {
tmp = z * ((x / t_1) + (((y / t_1) + ((a / z) * ((t + y) / t_1))) - ((b * (y / z)) / t_1)));
} else {
tmp = (a * ((t + y) / (y + (x + t)))) + (b * (((x + y) * ((z / b) / t_2)) - (y / t_2)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t + (x + y) t_2 = x + (t + y) tmp = 0 if (z <= -1.76e-71) or not (z <= 6.4e-41): tmp = z * ((x / t_1) + (((y / t_1) + ((a / z) * ((t + y) / t_1))) - ((b * (y / z)) / t_1))) else: tmp = (a * ((t + y) / (y + (x + t)))) + (b * (((x + y) * ((z / b) / t_2)) - (y / t_2))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t + Float64(x + y)) t_2 = Float64(x + Float64(t + y)) tmp = 0.0 if ((z <= -1.76e-71) || !(z <= 6.4e-41)) 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) / Float64(y + Float64(x + t)))) + Float64(b * Float64(Float64(Float64(x + y) * Float64(Float64(z / b) / t_2)) - Float64(y / t_2)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t + (x + y); t_2 = x + (t + y); tmp = 0.0; if ((z <= -1.76e-71) || ~((z <= 6.4e-41))) tmp = z * ((x / t_1) + (((y / t_1) + ((a / z) * ((t + y) / t_1))) - ((b * (y / z)) / t_1))); else tmp = (a * ((t + y) / (y + (x + t)))) + (b * (((x + y) * ((z / b) / t_2)) - (y / 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[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -1.76e-71], N[Not[LessEqual[z, 6.4e-41]], $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] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(N[(N[(x + y), $MachinePrecision] * N[(N[(z / b), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] - N[(y / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(x + y\right)\\
t_2 := x + \left(t + y\right)\\
\mathbf{if}\;z \leq -1.76 \cdot 10^{-71} \lor \neg \left(z \leq 6.4 \cdot 10^{-41}\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}{y + \left(x + t\right)} + b \cdot \left(\left(x + y\right) \cdot \frac{\frac{z}{b}}{t\_2} - \frac{y}{t\_2}\right)\\
\end{array}
\end{array}
if z < -1.76000000000000002e-71 or 6.40000000000000024e-41 < z Initial program 53.0%
Taylor expanded in z around inf 69.1%
associate--l+69.1%
+-commutative69.1%
+-commutative69.1%
times-frac87.5%
+-commutative87.5%
associate-/r*88.4%
associate-/l*95.2%
+-commutative95.2%
Simplified95.2%
if -1.76000000000000002e-71 < z < 6.40000000000000024e-41Initial program 68.2%
Taylor expanded in b around 0 68.2%
mul-1-neg68.2%
+-commutative68.2%
associate-+l+68.2%
associate-/l*89.8%
+-commutative89.8%
associate-+r+89.8%
+-commutative89.8%
associate-+l+89.8%
sub-neg89.8%
div-sub89.8%
Simplified89.8%
Taylor expanded in b around inf 94.7%
+-commutative94.7%
mul-1-neg94.7%
unsub-neg94.7%
Simplified91.9%
Taylor expanded in b around inf 94.7%
+-commutative94.7%
mul-1-neg94.7%
sub-neg94.7%
+-commutative94.7%
associate-+r+94.7%
associate-*r/91.9%
+-commutative91.9%
associate-+r+91.9%
associate-*r/91.9%
distribute-rgt-in91.9%
Simplified92.8%
Final simplification94.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ t y)))
(t_2 (+ y (+ x t)))
(t_3 (/ (- (+ (* a (+ t y)) (* z (+ x y))) (* y b)) t_2))
(t_4 (* a (/ (+ t y) t_2))))
(if (or (<= t_3 (- INFINITY)) (not (<= t_3 4e+245)))
(+ t_4 (* b (- (* (+ x y) (/ (/ z b) t_1)) (/ y t_1))))
(+ t_4 (/ (+ (* z x) (* y (- z b))) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (t + y);
double t_2 = y + (x + t);
double t_3 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / t_2;
double t_4 = a * ((t + y) / t_2);
double tmp;
if ((t_3 <= -((double) INFINITY)) || !(t_3 <= 4e+245)) {
tmp = t_4 + (b * (((x + y) * ((z / b) / t_1)) - (y / t_1)));
} else {
tmp = t_4 + (((z * x) + (y * (z - b))) / t_2);
}
return tmp;
}
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 = y + (x + t);
double t_3 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / t_2;
double t_4 = a * ((t + y) / t_2);
double tmp;
if ((t_3 <= -Double.POSITIVE_INFINITY) || !(t_3 <= 4e+245)) {
tmp = t_4 + (b * (((x + y) * ((z / b) / t_1)) - (y / t_1)));
} else {
tmp = t_4 + (((z * x) + (y * (z - b))) / t_2);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (t + y) t_2 = y + (x + t) t_3 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / t_2 t_4 = a * ((t + y) / t_2) tmp = 0 if (t_3 <= -math.inf) or not (t_3 <= 4e+245): tmp = t_4 + (b * (((x + y) * ((z / b) / t_1)) - (y / t_1))) else: tmp = t_4 + (((z * x) + (y * (z - b))) / t_2) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(t + y)) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(Float64(Float64(Float64(a * Float64(t + y)) + Float64(z * Float64(x + y))) - Float64(y * b)) / t_2) t_4 = Float64(a * Float64(Float64(t + y) / t_2)) tmp = 0.0 if ((t_3 <= Float64(-Inf)) || !(t_3 <= 4e+245)) tmp = Float64(t_4 + Float64(b * Float64(Float64(Float64(x + y) * Float64(Float64(z / b) / t_1)) - Float64(y / t_1)))); else tmp = Float64(t_4 + Float64(Float64(Float64(z * x) + Float64(y * Float64(z - b))) / t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (t + y); t_2 = y + (x + t); t_3 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / t_2; t_4 = a * ((t + y) / t_2); tmp = 0.0; if ((t_3 <= -Inf) || ~((t_3 <= 4e+245))) tmp = t_4 + (b * (((x + y) * ((z / b) / t_1)) - (y / t_1))); else tmp = t_4 + (((z * x) + (y * (z - b))) / t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision] + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(a * N[(N[(t + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$3, (-Infinity)], N[Not[LessEqual[t$95$3, 4e+245]], $MachinePrecision]], N[(t$95$4 + N[(b * N[(N[(N[(x + y), $MachinePrecision] * N[(N[(z / b), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$4 + N[(N[(N[(z * x), $MachinePrecision] + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t + y\right)\\
t_2 := y + \left(x + t\right)\\
t_3 := \frac{\left(a \cdot \left(t + y\right) + z \cdot \left(x + y\right)\right) - y \cdot b}{t\_2}\\
t_4 := a \cdot \frac{t + y}{t\_2}\\
\mathbf{if}\;t\_3 \leq -\infty \lor \neg \left(t\_3 \leq 4 \cdot 10^{+245}\right):\\
\;\;\;\;t\_4 + b \cdot \left(\left(x + y\right) \cdot \frac{\frac{z}{b}}{t\_1} - \frac{y}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;t\_4 + \frac{z \cdot x + y \cdot \left(z - b\right)}{t\_2}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 4.00000000000000018e245 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 6.2%
Taylor expanded in b around 0 6.2%
mul-1-neg6.2%
+-commutative6.2%
associate-+l+6.2%
associate-/l*38.0%
+-commutative38.0%
associate-+r+38.0%
+-commutative38.0%
associate-+l+38.0%
sub-neg38.0%
div-sub38.0%
Simplified38.2%
Taylor expanded in b around inf 49.7%
+-commutative49.7%
mul-1-neg49.7%
unsub-neg49.7%
Simplified68.9%
Taylor expanded in b around inf 49.7%
+-commutative49.7%
mul-1-neg49.7%
sub-neg49.7%
+-commutative49.7%
associate-+r+49.7%
associate-*r/56.3%
+-commutative56.3%
associate-+r+56.3%
associate-*r/68.9%
distribute-rgt-in69.4%
Simplified81.5%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.00000000000000018e245Initial program 99.7%
Taylor expanded in b around 0 99.7%
mul-1-neg99.7%
+-commutative99.7%
associate-+l+99.7%
associate-/l*99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
sub-neg99.7%
div-sub99.7%
Simplified99.7%
Final simplification91.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ t y)))
(t_2 (+ y (+ x t)))
(t_3 (/ (- (+ (* a (+ t y)) (* z (+ x y))) (* y b)) t_2))
(t_4 (* a (/ (+ t y) t_2))))
(if (<= t_3 (- INFINITY))
(+ a (* b (- (* (+ x y) (/ (/ z b) t_1)) (/ y t_1))))
(if (<= t_3 4e+235)
(+ t_4 (/ (+ (* z x) (* y (- z b))) t_2))
(+ z 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 = y + (x + t);
double t_3 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / t_2;
double t_4 = a * ((t + y) / t_2);
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = a + (b * (((x + y) * ((z / b) / t_1)) - (y / t_1)));
} else if (t_3 <= 4e+235) {
tmp = t_4 + (((z * x) + (y * (z - b))) / t_2);
} else {
tmp = z + t_4;
}
return tmp;
}
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 = y + (x + t);
double t_3 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / t_2;
double t_4 = a * ((t + y) / t_2);
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = a + (b * (((x + y) * ((z / b) / t_1)) - (y / t_1)));
} else if (t_3 <= 4e+235) {
tmp = t_4 + (((z * x) + (y * (z - b))) / t_2);
} else {
tmp = z + t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (t + y) t_2 = y + (x + t) t_3 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / t_2 t_4 = a * ((t + y) / t_2) tmp = 0 if t_3 <= -math.inf: tmp = a + (b * (((x + y) * ((z / b) / t_1)) - (y / t_1))) elif t_3 <= 4e+235: tmp = t_4 + (((z * x) + (y * (z - b))) / t_2) else: tmp = z + t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(t + y)) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(Float64(Float64(Float64(a * Float64(t + y)) + Float64(z * Float64(x + y))) - Float64(y * b)) / t_2) t_4 = Float64(a * Float64(Float64(t + y) / t_2)) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(a + Float64(b * Float64(Float64(Float64(x + y) * Float64(Float64(z / b) / t_1)) - Float64(y / t_1)))); elseif (t_3 <= 4e+235) tmp = Float64(t_4 + Float64(Float64(Float64(z * x) + Float64(y * Float64(z - b))) / t_2)); else tmp = Float64(z + t_4); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (t + y); t_2 = y + (x + t); t_3 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / t_2; t_4 = a * ((t + y) / t_2); tmp = 0.0; if (t_3 <= -Inf) tmp = a + (b * (((x + y) * ((z / b) / t_1)) - (y / t_1))); elseif (t_3 <= 4e+235) tmp = t_4 + (((z * x) + (y * (z - b))) / t_2); else tmp = z + t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision] + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(a * N[(N[(t + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(a + N[(b * N[(N[(N[(x + y), $MachinePrecision] * N[(N[(z / b), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 4e+235], N[(t$95$4 + N[(N[(N[(z * x), $MachinePrecision] + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], N[(z + t$95$4), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t + y\right)\\
t_2 := y + \left(x + t\right)\\
t_3 := \frac{\left(a \cdot \left(t + y\right) + z \cdot \left(x + y\right)\right) - y \cdot b}{t\_2}\\
t_4 := a \cdot \frac{t + y}{t\_2}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;a + b \cdot \left(\left(x + y\right) \cdot \frac{\frac{z}{b}}{t\_1} - \frac{y}{t\_1}\right)\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+235}:\\
\;\;\;\;t\_4 + \frac{z \cdot x + y \cdot \left(z - b\right)}{t\_2}\\
\mathbf{else}:\\
\;\;\;\;z + t\_4\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0Initial program 6.3%
Taylor expanded in b around 0 6.3%
mul-1-neg6.3%
+-commutative6.3%
associate-+l+6.3%
associate-/l*41.6%
+-commutative41.6%
associate-+r+41.6%
+-commutative41.6%
associate-+l+41.6%
sub-neg41.6%
div-sub41.6%
Simplified41.2%
Taylor expanded in b around inf 56.2%
+-commutative56.2%
mul-1-neg56.2%
unsub-neg56.2%
Simplified80.1%
Taylor expanded in b around inf 56.2%
+-commutative56.2%
mul-1-neg56.2%
sub-neg56.2%
+-commutative56.2%
associate-+r+56.2%
associate-*r/66.0%
+-commutative66.0%
associate-+r+66.0%
associate-*r/80.1%
distribute-rgt-in80.1%
Simplified86.3%
Taylor expanded in t around inf 80.7%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.0000000000000002e235Initial program 99.7%
Taylor expanded in b around 0 99.7%
mul-1-neg99.7%
+-commutative99.7%
associate-+l+99.7%
associate-/l*99.7%
+-commutative99.7%
associate-+r+99.7%
+-commutative99.7%
associate-+l+99.7%
sub-neg99.7%
div-sub99.7%
Simplified99.7%
if 4.0000000000000002e235 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 7.6%
Taylor expanded in b around 0 7.6%
mul-1-neg7.6%
+-commutative7.6%
associate-+l+7.6%
associate-/l*36.3%
+-commutative36.3%
associate-+r+36.3%
+-commutative36.3%
associate-+l+36.3%
sub-neg36.3%
div-sub36.3%
Simplified36.8%
Taylor expanded in x around inf 74.3%
Final simplification89.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ (- (+ (* a (+ t y)) (* z (+ x y))) (* y b)) t_1)))
(if (<= t_2 -5e+291)
(- (+ z a) b)
(if (<= t_2 4e+235) t_2 (+ z (* a (/ (+ t y) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / t_1;
double tmp;
if (t_2 <= -5e+291) {
tmp = (z + a) - b;
} else if (t_2 <= 4e+235) {
tmp = t_2;
} else {
tmp = z + (a * ((t + y) / t_1));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (x + t)
t_2 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / t_1
if (t_2 <= (-5d+291)) then
tmp = (z + a) - b
else if (t_2 <= 4d+235) then
tmp = t_2
else
tmp = z + (a * ((t + y) / t_1))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / t_1;
double tmp;
if (t_2 <= -5e+291) {
tmp = (z + a) - b;
} else if (t_2 <= 4e+235) {
tmp = t_2;
} else {
tmp = z + (a * ((t + y) / t_1));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / t_1 tmp = 0 if t_2 <= -5e+291: tmp = (z + a) - b elif t_2 <= 4e+235: tmp = t_2 else: tmp = z + (a * ((t + y) / t_1)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(Float64(Float64(a * Float64(t + y)) + Float64(z * Float64(x + y))) - Float64(y * b)) / t_1) tmp = 0.0 if (t_2 <= -5e+291) tmp = Float64(Float64(z + a) - b); elseif (t_2 <= 4e+235) tmp = t_2; else tmp = Float64(z + Float64(a * Float64(Float64(t + y) / t_1))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / t_1; tmp = 0.0; if (t_2 <= -5e+291) tmp = (z + a) - b; elseif (t_2 <= 4e+235) tmp = t_2; else tmp = z + (a * ((t + y) / t_1)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision] + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+291], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[t$95$2, 4e+235], t$95$2, N[(z + N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{\left(a \cdot \left(t + y\right) + z \cdot \left(x + y\right)\right) - y \cdot b}{t\_1}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+291}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{+235}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;z + a \cdot \frac{t + y}{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.0000000000000001e291Initial program 10.0%
Taylor expanded in y around inf 78.4%
if -5.0000000000000001e291 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.0000000000000002e235Initial program 99.7%
if 4.0000000000000002e235 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 7.6%
Taylor expanded in b around 0 7.6%
mul-1-neg7.6%
+-commutative7.6%
associate-+l+7.6%
associate-/l*36.3%
+-commutative36.3%
associate-+r+36.3%
+-commutative36.3%
associate-+l+36.3%
sub-neg36.3%
div-sub36.3%
Simplified36.8%
Taylor expanded in x around inf 74.3%
Final simplification89.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ t y)))
(t_2 (+ y (+ x t)))
(t_3 (/ (- (+ (* a (+ t y)) (* z (+ x y))) (* y b)) t_2)))
(if (<= t_3 (- INFINITY))
(+ a (* b (- (* (+ x y) (/ (/ z b) t_1)) (/ y t_1))))
(if (<= t_3 4e+235) t_3 (+ z (* a (/ (+ t y) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (t + y);
double t_2 = y + (x + t);
double t_3 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / t_2;
double tmp;
if (t_3 <= -((double) INFINITY)) {
tmp = a + (b * (((x + y) * ((z / b) / t_1)) - (y / t_1)));
} else if (t_3 <= 4e+235) {
tmp = t_3;
} else {
tmp = z + (a * ((t + y) / t_2));
}
return tmp;
}
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 = y + (x + t);
double t_3 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / t_2;
double tmp;
if (t_3 <= -Double.POSITIVE_INFINITY) {
tmp = a + (b * (((x + y) * ((z / b) / t_1)) - (y / t_1)));
} else if (t_3 <= 4e+235) {
tmp = t_3;
} else {
tmp = z + (a * ((t + y) / t_2));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (t + y) t_2 = y + (x + t) t_3 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / t_2 tmp = 0 if t_3 <= -math.inf: tmp = a + (b * (((x + y) * ((z / b) / t_1)) - (y / t_1))) elif t_3 <= 4e+235: tmp = t_3 else: tmp = z + (a * ((t + y) / t_2)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(t + y)) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(Float64(Float64(Float64(a * Float64(t + y)) + Float64(z * Float64(x + y))) - Float64(y * b)) / t_2) tmp = 0.0 if (t_3 <= Float64(-Inf)) tmp = Float64(a + Float64(b * Float64(Float64(Float64(x + y) * Float64(Float64(z / b) / t_1)) - Float64(y / t_1)))); elseif (t_3 <= 4e+235) tmp = t_3; else tmp = Float64(z + Float64(a * Float64(Float64(t + y) / t_2))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (t + y); t_2 = y + (x + t); t_3 = (((a * (t + y)) + (z * (x + y))) - (y * b)) / t_2; tmp = 0.0; if (t_3 <= -Inf) tmp = a + (b * (((x + y) * ((z / b) / t_1)) - (y / t_1))); elseif (t_3 <= 4e+235) tmp = t_3; else tmp = z + (a * ((t + y) / t_2)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision] + N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(a + N[(b * N[(N[(N[(x + y), $MachinePrecision] * N[(N[(z / b), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] - N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 4e+235], t$95$3, N[(z + N[(a * N[(N[(t + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(t + y\right)\\
t_2 := y + \left(x + t\right)\\
t_3 := \frac{\left(a \cdot \left(t + y\right) + z \cdot \left(x + y\right)\right) - y \cdot b}{t\_2}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;a + b \cdot \left(\left(x + y\right) \cdot \frac{\frac{z}{b}}{t\_1} - \frac{y}{t\_1}\right)\\
\mathbf{elif}\;t\_3 \leq 4 \cdot 10^{+235}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;z + a \cdot \frac{t + y}{t\_2}\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0Initial program 6.3%
Taylor expanded in b around 0 6.3%
mul-1-neg6.3%
+-commutative6.3%
associate-+l+6.3%
associate-/l*41.6%
+-commutative41.6%
associate-+r+41.6%
+-commutative41.6%
associate-+l+41.6%
sub-neg41.6%
div-sub41.6%
Simplified41.2%
Taylor expanded in b around inf 56.2%
+-commutative56.2%
mul-1-neg56.2%
unsub-neg56.2%
Simplified80.1%
Taylor expanded in b around inf 56.2%
+-commutative56.2%
mul-1-neg56.2%
sub-neg56.2%
+-commutative56.2%
associate-+r+56.2%
associate-*r/66.0%
+-commutative66.0%
associate-+r+66.0%
associate-*r/80.1%
distribute-rgt-in80.1%
Simplified86.3%
Taylor expanded in t around inf 80.7%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 4.0000000000000002e235Initial program 99.7%
if 4.0000000000000002e235 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 7.6%
Taylor expanded in b around 0 7.6%
mul-1-neg7.6%
+-commutative7.6%
associate-+l+7.6%
associate-/l*36.3%
+-commutative36.3%
associate-+r+36.3%
+-commutative36.3%
associate-+l+36.3%
sub-neg36.3%
div-sub36.3%
Simplified36.8%
Taylor expanded in x around inf 74.3%
Final simplification89.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b))
(t_2 (* z (/ (+ x y) (+ y (+ x t)))))
(t_3 (+ a (* y (- (/ z t) (/ b t))))))
(if (<= x -7.8e+74)
t_2
(if (<= x -3.6e-146)
t_1
(if (<= x -5e-283)
t_3
(if (<= x 2.9e-262)
t_1
(if (<= x 3.25e-192) t_3 (if (<= x 9e+27) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = z * ((x + y) / (y + (x + t)));
double t_3 = a + (y * ((z / t) - (b / t)));
double tmp;
if (x <= -7.8e+74) {
tmp = t_2;
} else if (x <= -3.6e-146) {
tmp = t_1;
} else if (x <= -5e-283) {
tmp = t_3;
} else if (x <= 2.9e-262) {
tmp = t_1;
} else if (x <= 3.25e-192) {
tmp = t_3;
} else if (x <= 9e+27) {
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) :: t_3
real(8) :: tmp
t_1 = (z + a) - b
t_2 = z * ((x + y) / (y + (x + t)))
t_3 = a + (y * ((z / t) - (b / t)))
if (x <= (-7.8d+74)) then
tmp = t_2
else if (x <= (-3.6d-146)) then
tmp = t_1
else if (x <= (-5d-283)) then
tmp = t_3
else if (x <= 2.9d-262) then
tmp = t_1
else if (x <= 3.25d-192) then
tmp = t_3
else if (x <= 9d+27) 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 = (z + a) - b;
double t_2 = z * ((x + y) / (y + (x + t)));
double t_3 = a + (y * ((z / t) - (b / t)));
double tmp;
if (x <= -7.8e+74) {
tmp = t_2;
} else if (x <= -3.6e-146) {
tmp = t_1;
} else if (x <= -5e-283) {
tmp = t_3;
} else if (x <= 2.9e-262) {
tmp = t_1;
} else if (x <= 3.25e-192) {
tmp = t_3;
} else if (x <= 9e+27) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = z * ((x + y) / (y + (x + t))) t_3 = a + (y * ((z / t) - (b / t))) tmp = 0 if x <= -7.8e+74: tmp = t_2 elif x <= -3.6e-146: tmp = t_1 elif x <= -5e-283: tmp = t_3 elif x <= 2.9e-262: tmp = t_1 elif x <= 3.25e-192: tmp = t_3 elif x <= 9e+27: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(z * Float64(Float64(x + y) / Float64(y + Float64(x + t)))) t_3 = Float64(a + Float64(y * Float64(Float64(z / t) - Float64(b / t)))) tmp = 0.0 if (x <= -7.8e+74) tmp = t_2; elseif (x <= -3.6e-146) tmp = t_1; elseif (x <= -5e-283) tmp = t_3; elseif (x <= 2.9e-262) tmp = t_1; elseif (x <= 3.25e-192) tmp = t_3; elseif (x <= 9e+27) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = z * ((x + y) / (y + (x + t))); t_3 = a + (y * ((z / t) - (b / t))); tmp = 0.0; if (x <= -7.8e+74) tmp = t_2; elseif (x <= -3.6e-146) tmp = t_1; elseif (x <= -5e-283) tmp = t_3; elseif (x <= 2.9e-262) tmp = t_1; elseif (x <= 3.25e-192) tmp = t_3; elseif (x <= 9e+27) tmp = t_1; else tmp = t_2; 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[(z * N[(N[(x + y), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(a + N[(y * N[(N[(z / t), $MachinePrecision] - N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -7.8e+74], t$95$2, If[LessEqual[x, -3.6e-146], t$95$1, If[LessEqual[x, -5e-283], t$95$3, If[LessEqual[x, 2.9e-262], t$95$1, If[LessEqual[x, 3.25e-192], t$95$3, If[LessEqual[x, 9e+27], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := z \cdot \frac{x + y}{y + \left(x + t\right)}\\
t_3 := a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\
\mathbf{if}\;x \leq -7.8 \cdot 10^{+74}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -3.6 \cdot 10^{-146}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -5 \cdot 10^{-283}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-262}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 3.25 \cdot 10^{-192}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq 9 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -7.80000000000000015e74 or 8.9999999999999998e27 < x Initial program 50.0%
Taylor expanded in z around inf 29.8%
associate-/l*60.0%
+-commutative60.0%
+-commutative60.0%
associate-+r+60.0%
+-commutative60.0%
associate-+l+60.0%
Simplified60.0%
if -7.80000000000000015e74 < x < -3.59999999999999978e-146 or -5.0000000000000001e-283 < x < 2.89999999999999996e-262 or 3.24999999999999983e-192 < x < 8.9999999999999998e27Initial program 63.3%
Taylor expanded in y around inf 74.7%
if -3.59999999999999978e-146 < x < -5.0000000000000001e-283 or 2.89999999999999996e-262 < x < 3.24999999999999983e-192Initial program 69.9%
Taylor expanded in x around 0 65.9%
Taylor expanded in y around 0 72.9%
Final simplification68.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (+ a (/ (+ (* z x) (* y (- z b))) t_1)))
(t_3 (+ (* a (/ (+ t y) t_1)) (* x (/ z (+ x t))))))
(if (<= x -145000000.0)
t_3
(if (<= x -1.25e-285)
t_2
(if (<= x 7e-273) (- (+ z a) b) (if (<= x 4.6e-35) 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 * x) + (y * (z - b))) / t_1);
double t_3 = (a * ((t + y) / t_1)) + (x * (z / (x + t)));
double tmp;
if (x <= -145000000.0) {
tmp = t_3;
} else if (x <= -1.25e-285) {
tmp = t_2;
} else if (x <= 7e-273) {
tmp = (z + a) - b;
} else if (x <= 4.6e-35) {
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 * x) + (y * (z - b))) / t_1)
t_3 = (a * ((t + y) / t_1)) + (x * (z / (x + t)))
if (x <= (-145000000.0d0)) then
tmp = t_3
else if (x <= (-1.25d-285)) then
tmp = t_2
else if (x <= 7d-273) then
tmp = (z + a) - b
else if (x <= 4.6d-35) 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 * x) + (y * (z - b))) / t_1);
double t_3 = (a * ((t + y) / t_1)) + (x * (z / (x + t)));
double tmp;
if (x <= -145000000.0) {
tmp = t_3;
} else if (x <= -1.25e-285) {
tmp = t_2;
} else if (x <= 7e-273) {
tmp = (z + a) - b;
} else if (x <= 4.6e-35) {
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 * x) + (y * (z - b))) / t_1) t_3 = (a * ((t + y) / t_1)) + (x * (z / (x + t))) tmp = 0 if x <= -145000000.0: tmp = t_3 elif x <= -1.25e-285: tmp = t_2 elif x <= 7e-273: tmp = (z + a) - b elif x <= 4.6e-35: 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(Float64(Float64(z * x) + Float64(y * Float64(z - b))) / t_1)) t_3 = Float64(Float64(a * Float64(Float64(t + y) / t_1)) + Float64(x * Float64(z / Float64(x + t)))) tmp = 0.0 if (x <= -145000000.0) tmp = t_3; elseif (x <= -1.25e-285) tmp = t_2; elseif (x <= 7e-273) tmp = Float64(Float64(z + a) - b); elseif (x <= 4.6e-35) 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 * x) + (y * (z - b))) / t_1); t_3 = (a * ((t + y) / t_1)) + (x * (z / (x + t))); tmp = 0.0; if (x <= -145000000.0) tmp = t_3; elseif (x <= -1.25e-285) tmp = t_2; elseif (x <= 7e-273) tmp = (z + a) - b; elseif (x <= 4.6e-35) 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[(N[(N[(z * x), $MachinePrecision] + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(x * N[(z / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -145000000.0], t$95$3, If[LessEqual[x, -1.25e-285], t$95$2, If[LessEqual[x, 7e-273], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[x, 4.6e-35], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := a + \frac{z \cdot x + y \cdot \left(z - b\right)}{t\_1}\\
t_3 := a \cdot \frac{t + y}{t\_1} + x \cdot \frac{z}{x + t}\\
\mathbf{if}\;x \leq -145000000:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -1.25 \cdot 10^{-285}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-273}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;x \leq 4.6 \cdot 10^{-35}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x < -1.45e8 or 4.5999999999999998e-35 < x Initial program 51.9%
Taylor expanded in b around 0 52.0%
mul-1-neg52.0%
+-commutative52.0%
associate-+l+52.0%
associate-/l*64.3%
+-commutative64.3%
associate-+r+64.3%
+-commutative64.3%
associate-+l+64.3%
sub-neg64.3%
div-sub64.3%
Simplified64.3%
Taylor expanded in y around 0 61.8%
associate-/l*78.4%
Simplified78.4%
if -1.45e8 < x < -1.25000000000000005e-285 or 6.99999999999999984e-273 < x < 4.5999999999999998e-35Initial program 69.8%
Taylor expanded in b around 0 69.9%
mul-1-neg69.9%
+-commutative69.9%
associate-+l+69.9%
associate-/l*84.9%
+-commutative84.9%
associate-+r+84.9%
+-commutative84.9%
associate-+l+84.9%
sub-neg84.9%
div-sub84.9%
Simplified85.0%
Taylor expanded in t around inf 82.4%
if -1.25000000000000005e-285 < x < 6.99999999999999984e-273Initial program 47.6%
Taylor expanded in y around inf 93.8%
Final simplification81.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b))
(t_2 (+ a (* y (- (/ z t) (/ b t)))))
(t_3 (+ z (* a (/ (+ t y) (+ y (+ x t)))))))
(if (<= x -2.1e-130)
t_3
(if (<= x -4.5e-283)
t_2
(if (<= x 4.4e-262)
t_1
(if (<= x 1.6e-191) t_2 (if (<= x 2.5e-54) 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 = a + (y * ((z / t) - (b / t)));
double t_3 = z + (a * ((t + y) / (y + (x + t))));
double tmp;
if (x <= -2.1e-130) {
tmp = t_3;
} else if (x <= -4.5e-283) {
tmp = t_2;
} else if (x <= 4.4e-262) {
tmp = t_1;
} else if (x <= 1.6e-191) {
tmp = t_2;
} else if (x <= 2.5e-54) {
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 = a + (y * ((z / t) - (b / t)))
t_3 = z + (a * ((t + y) / (y + (x + t))))
if (x <= (-2.1d-130)) then
tmp = t_3
else if (x <= (-4.5d-283)) then
tmp = t_2
else if (x <= 4.4d-262) then
tmp = t_1
else if (x <= 1.6d-191) then
tmp = t_2
else if (x <= 2.5d-54) 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 = a + (y * ((z / t) - (b / t)));
double t_3 = z + (a * ((t + y) / (y + (x + t))));
double tmp;
if (x <= -2.1e-130) {
tmp = t_3;
} else if (x <= -4.5e-283) {
tmp = t_2;
} else if (x <= 4.4e-262) {
tmp = t_1;
} else if (x <= 1.6e-191) {
tmp = t_2;
} else if (x <= 2.5e-54) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = a + (y * ((z / t) - (b / t))) t_3 = z + (a * ((t + y) / (y + (x + t)))) tmp = 0 if x <= -2.1e-130: tmp = t_3 elif x <= -4.5e-283: tmp = t_2 elif x <= 4.4e-262: tmp = t_1 elif x <= 1.6e-191: tmp = t_2 elif x <= 2.5e-54: 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(a + Float64(y * Float64(Float64(z / t) - Float64(b / t)))) t_3 = Float64(z + Float64(a * Float64(Float64(t + y) / Float64(y + Float64(x + t))))) tmp = 0.0 if (x <= -2.1e-130) tmp = t_3; elseif (x <= -4.5e-283) tmp = t_2; elseif (x <= 4.4e-262) tmp = t_1; elseif (x <= 1.6e-191) tmp = t_2; elseif (x <= 2.5e-54) 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 = a + (y * ((z / t) - (b / t))); t_3 = z + (a * ((t + y) / (y + (x + t)))); tmp = 0.0; if (x <= -2.1e-130) tmp = t_3; elseif (x <= -4.5e-283) tmp = t_2; elseif (x <= 4.4e-262) tmp = t_1; elseif (x <= 1.6e-191) tmp = t_2; elseif (x <= 2.5e-54) 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[(a + N[(y * N[(N[(z / t), $MachinePrecision] - N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z + N[(a * N[(N[(t + y), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.1e-130], t$95$3, If[LessEqual[x, -4.5e-283], t$95$2, If[LessEqual[x, 4.4e-262], t$95$1, If[LessEqual[x, 1.6e-191], t$95$2, If[LessEqual[x, 2.5e-54], t$95$1, t$95$3]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := a + y \cdot \left(\frac{z}{t} - \frac{b}{t}\right)\\
t_3 := z + a \cdot \frac{t + y}{y + \left(x + t\right)}\\
\mathbf{if}\;x \leq -2.1 \cdot 10^{-130}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -4.5 \cdot 10^{-283}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{-262}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq 1.6 \cdot 10^{-191}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{-54}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x < -2.10000000000000002e-130 or 2.50000000000000008e-54 < x Initial program 55.4%
Taylor expanded in b around 0 55.4%
mul-1-neg55.4%
+-commutative55.4%
associate-+l+55.4%
associate-/l*68.1%
+-commutative68.1%
associate-+r+68.1%
+-commutative68.1%
associate-+l+68.1%
sub-neg68.1%
div-sub68.1%
Simplified68.2%
Taylor expanded in x around inf 72.4%
if -2.10000000000000002e-130 < x < -4.4999999999999997e-283 or 4.39999999999999977e-262 < x < 1.6000000000000002e-191Initial program 67.9%
Taylor expanded in x around 0 63.7%
Taylor expanded in y around 0 72.0%
if -4.4999999999999997e-283 < x < 4.39999999999999977e-262 or 1.6000000000000002e-191 < x < 2.50000000000000008e-54Initial program 64.0%
Taylor expanded in y around inf 84.8%
Final simplification74.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (+ a (/ (+ (* z x) (* y (- z b))) t_1)))
(t_3 (+ z (* a (/ (+ t y) t_1)))))
(if (<= x -1.2e+81)
t_3
(if (<= x -1.25e-285)
t_2
(if (<= x 7e-273) (- (+ z a) b) (if (<= x 2.75e-33) 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 * x) + (y * (z - b))) / t_1);
double t_3 = z + (a * ((t + y) / t_1));
double tmp;
if (x <= -1.2e+81) {
tmp = t_3;
} else if (x <= -1.25e-285) {
tmp = t_2;
} else if (x <= 7e-273) {
tmp = (z + a) - b;
} else if (x <= 2.75e-33) {
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 * x) + (y * (z - b))) / t_1)
t_3 = z + (a * ((t + y) / t_1))
if (x <= (-1.2d+81)) then
tmp = t_3
else if (x <= (-1.25d-285)) then
tmp = t_2
else if (x <= 7d-273) then
tmp = (z + a) - b
else if (x <= 2.75d-33) 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 * x) + (y * (z - b))) / t_1);
double t_3 = z + (a * ((t + y) / t_1));
double tmp;
if (x <= -1.2e+81) {
tmp = t_3;
} else if (x <= -1.25e-285) {
tmp = t_2;
} else if (x <= 7e-273) {
tmp = (z + a) - b;
} else if (x <= 2.75e-33) {
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 * x) + (y * (z - b))) / t_1) t_3 = z + (a * ((t + y) / t_1)) tmp = 0 if x <= -1.2e+81: tmp = t_3 elif x <= -1.25e-285: tmp = t_2 elif x <= 7e-273: tmp = (z + a) - b elif x <= 2.75e-33: 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(Float64(Float64(z * x) + Float64(y * Float64(z - b))) / t_1)) t_3 = Float64(z + Float64(a * Float64(Float64(t + y) / t_1))) tmp = 0.0 if (x <= -1.2e+81) tmp = t_3; elseif (x <= -1.25e-285) tmp = t_2; elseif (x <= 7e-273) tmp = Float64(Float64(z + a) - b); elseif (x <= 2.75e-33) 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 * x) + (y * (z - b))) / t_1); t_3 = z + (a * ((t + y) / t_1)); tmp = 0.0; if (x <= -1.2e+81) tmp = t_3; elseif (x <= -1.25e-285) tmp = t_2; elseif (x <= 7e-273) tmp = (z + a) - b; elseif (x <= 2.75e-33) 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[(N[(N[(z * x), $MachinePrecision] + N[(y * N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z + N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.2e+81], t$95$3, If[LessEqual[x, -1.25e-285], t$95$2, If[LessEqual[x, 7e-273], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[x, 2.75e-33], t$95$2, t$95$3]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := a + \frac{z \cdot x + y \cdot \left(z - b\right)}{t\_1}\\
t_3 := z + a \cdot \frac{t + y}{t\_1}\\
\mathbf{if}\;x \leq -1.2 \cdot 10^{+81}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;x \leq -1.25 \cdot 10^{-285}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq 7 \cdot 10^{-273}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;x \leq 2.75 \cdot 10^{-33}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_3\\
\end{array}
\end{array}
if x < -1.19999999999999995e81 or 2.75e-33 < x Initial program 50.7%
Taylor expanded in b around 0 50.7%
mul-1-neg50.7%
+-commutative50.7%
associate-+l+50.7%
associate-/l*61.6%
+-commutative61.6%
associate-+r+61.6%
+-commutative61.6%
associate-+l+61.6%
sub-neg61.6%
div-sub61.6%
Simplified61.7%
Taylor expanded in x around inf 76.3%
if -1.19999999999999995e81 < x < -1.25000000000000005e-285 or 6.99999999999999984e-273 < x < 2.75e-33Initial program 68.5%
Taylor expanded in b around 0 68.6%
mul-1-neg68.6%
+-commutative68.6%
associate-+l+68.6%
associate-/l*84.6%
+-commutative84.6%
associate-+r+84.6%
+-commutative84.6%
associate-+l+84.6%
sub-neg84.6%
div-sub84.6%
Simplified84.7%
Taylor expanded in t around inf 82.4%
if -1.25000000000000005e-285 < x < 6.99999999999999984e-273Initial program 47.6%
Taylor expanded in y around inf 93.8%
Final simplification80.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))))
(if (or (<= a -23000000.0)
(not
(or (<= a -4.4e-17) (and (not (<= a -9e-116)) (<= a 1.12e-54)))))
(+ z (* a (/ (+ t y) t_1)))
(/ (- (* z (+ x y)) (* y b)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if ((a <= -23000000.0) || !((a <= -4.4e-17) || (!(a <= -9e-116) && (a <= 1.12e-54)))) {
tmp = z + (a * ((t + y) / t_1));
} else {
tmp = ((z * (x + y)) - (y * b)) / t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y + (x + t)
if ((a <= (-23000000.0d0)) .or. (.not. (a <= (-4.4d-17)) .or. (.not. (a <= (-9d-116))) .and. (a <= 1.12d-54))) then
tmp = z + (a * ((t + y) / t_1))
else
tmp = ((z * (x + y)) - (y * b)) / t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if ((a <= -23000000.0) || !((a <= -4.4e-17) || (!(a <= -9e-116) && (a <= 1.12e-54)))) {
tmp = z + (a * ((t + y) / t_1));
} else {
tmp = ((z * (x + y)) - (y * b)) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) tmp = 0 if (a <= -23000000.0) or not ((a <= -4.4e-17) or (not (a <= -9e-116) and (a <= 1.12e-54))): tmp = z + (a * ((t + y) / t_1)) else: tmp = ((z * (x + y)) - (y * b)) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) tmp = 0.0 if ((a <= -23000000.0) || !((a <= -4.4e-17) || (!(a <= -9e-116) && (a <= 1.12e-54)))) tmp = Float64(z + Float64(a * Float64(Float64(t + y) / t_1))); else tmp = Float64(Float64(Float64(z * Float64(x + y)) - Float64(y * b)) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); tmp = 0.0; if ((a <= -23000000.0) || ~(((a <= -4.4e-17) || (~((a <= -9e-116)) && (a <= 1.12e-54))))) tmp = z + (a * ((t + y) / t_1)); else tmp = ((z * (x + y)) - (y * b)) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[a, -23000000.0], N[Not[Or[LessEqual[a, -4.4e-17], And[N[Not[LessEqual[a, -9e-116]], $MachinePrecision], LessEqual[a, 1.12e-54]]]], $MachinePrecision]], N[(z + N[(a * N[(N[(t + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;a \leq -23000000 \lor \neg \left(a \leq -4.4 \cdot 10^{-17} \lor \neg \left(a \leq -9 \cdot 10^{-116}\right) \land a \leq 1.12 \cdot 10^{-54}\right):\\
\;\;\;\;z + a \cdot \frac{t + y}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right) - y \cdot b}{t\_1}\\
\end{array}
\end{array}
if a < -2.3e7 or -4.4e-17 < a < -9.00000000000000023e-116 or 1.11999999999999994e-54 < a Initial program 47.5%
Taylor expanded in b around 0 47.5%
mul-1-neg47.5%
+-commutative47.5%
associate-+l+47.5%
associate-/l*70.5%
+-commutative70.5%
associate-+r+70.5%
+-commutative70.5%
associate-+l+70.5%
sub-neg70.5%
div-sub70.5%
Simplified70.5%
Taylor expanded in x around inf 80.7%
if -2.3e7 < a < -4.4e-17 or -9.00000000000000023e-116 < a < 1.11999999999999994e-54Initial program 76.7%
Taylor expanded in a around 0 70.7%
+-commutative70.7%
*-commutative70.7%
Simplified70.7%
Final simplification76.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (* a (/ (+ t y) (+ y (+ x t))))))
(if (<= a -8e+71)
t_2
(if (<= a 2.85e-210)
t_1
(if (<= a 3.1e-86)
(* z (/ x (+ x (+ t y))))
(if (<= a 3.8e+80) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = a * ((t + y) / (y + (x + t)));
double tmp;
if (a <= -8e+71) {
tmp = t_2;
} else if (a <= 2.85e-210) {
tmp = t_1;
} else if (a <= 3.1e-86) {
tmp = z * (x / (x + (t + y)));
} else if (a <= 3.8e+80) {
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 = (z + a) - b
t_2 = a * ((t + y) / (y + (x + t)))
if (a <= (-8d+71)) then
tmp = t_2
else if (a <= 2.85d-210) then
tmp = t_1
else if (a <= 3.1d-86) then
tmp = z * (x / (x + (t + y)))
else if (a <= 3.8d+80) 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 = (z + a) - b;
double t_2 = a * ((t + y) / (y + (x + t)));
double tmp;
if (a <= -8e+71) {
tmp = t_2;
} else if (a <= 2.85e-210) {
tmp = t_1;
} else if (a <= 3.1e-86) {
tmp = z * (x / (x + (t + y)));
} else if (a <= 3.8e+80) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = a * ((t + y) / (y + (x + t))) tmp = 0 if a <= -8e+71: tmp = t_2 elif a <= 2.85e-210: tmp = t_1 elif a <= 3.1e-86: tmp = z * (x / (x + (t + y))) elif a <= 3.8e+80: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(a * Float64(Float64(t + y) / Float64(y + Float64(x + t)))) tmp = 0.0 if (a <= -8e+71) tmp = t_2; elseif (a <= 2.85e-210) tmp = t_1; elseif (a <= 3.1e-86) tmp = Float64(z * Float64(x / Float64(x + Float64(t + y)))); elseif (a <= 3.8e+80) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = a * ((t + y) / (y + (x + t))); tmp = 0.0; if (a <= -8e+71) tmp = t_2; elseif (a <= 2.85e-210) tmp = t_1; elseif (a <= 3.1e-86) tmp = z * (x / (x + (t + y))); elseif (a <= 3.8e+80) tmp = t_1; else tmp = t_2; 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[(a * N[(N[(t + y), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -8e+71], t$95$2, If[LessEqual[a, 2.85e-210], t$95$1, If[LessEqual[a, 3.1e-86], N[(z * N[(x / N[(x + N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.8e+80], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := a \cdot \frac{t + y}{y + \left(x + t\right)}\\
\mathbf{if}\;a \leq -8 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq 2.85 \cdot 10^{-210}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 3.1 \cdot 10^{-86}:\\
\;\;\;\;z \cdot \frac{x}{x + \left(t + y\right)}\\
\mathbf{elif}\;a \leq 3.8 \cdot 10^{+80}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -8.0000000000000003e71 or 3.79999999999999997e80 < a Initial program 40.1%
Taylor expanded in a around inf 34.1%
associate-/l*75.5%
+-commutative75.5%
associate-+r+75.5%
+-commutative75.5%
associate-+l+75.5%
Simplified75.5%
if -8.0000000000000003e71 < a < 2.84999999999999985e-210 or 3.09999999999999989e-86 < a < 3.79999999999999997e80Initial program 70.4%
Taylor expanded in y around inf 58.2%
if 2.84999999999999985e-210 < a < 3.09999999999999989e-86Initial program 76.5%
Taylor expanded in x around inf 50.0%
*-commutative50.0%
Simplified50.0%
associate-/l*57.6%
associate-+l+57.6%
+-commutative57.6%
Applied egg-rr57.6%
Final simplification64.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (* z (/ (+ x y) (+ y (+ x t))))))
(if (<= x -1.65e+77)
t_2
(if (<= x -4e-151)
t_1
(if (<= x -3.8e-234)
(- a (* b (/ y t)))
(if (<= x 1.02e+27) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = z * ((x + y) / (y + (x + t)));
double tmp;
if (x <= -1.65e+77) {
tmp = t_2;
} else if (x <= -4e-151) {
tmp = t_1;
} else if (x <= -3.8e-234) {
tmp = a - (b * (y / t));
} else if (x <= 1.02e+27) {
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 = (z + a) - b
t_2 = z * ((x + y) / (y + (x + t)))
if (x <= (-1.65d+77)) then
tmp = t_2
else if (x <= (-4d-151)) then
tmp = t_1
else if (x <= (-3.8d-234)) then
tmp = a - (b * (y / t))
else if (x <= 1.02d+27) 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 = (z + a) - b;
double t_2 = z * ((x + y) / (y + (x + t)));
double tmp;
if (x <= -1.65e+77) {
tmp = t_2;
} else if (x <= -4e-151) {
tmp = t_1;
} else if (x <= -3.8e-234) {
tmp = a - (b * (y / t));
} else if (x <= 1.02e+27) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = z * ((x + y) / (y + (x + t))) tmp = 0 if x <= -1.65e+77: tmp = t_2 elif x <= -4e-151: tmp = t_1 elif x <= -3.8e-234: tmp = a - (b * (y / t)) elif x <= 1.02e+27: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(z * Float64(Float64(x + y) / Float64(y + Float64(x + t)))) tmp = 0.0 if (x <= -1.65e+77) tmp = t_2; elseif (x <= -4e-151) tmp = t_1; elseif (x <= -3.8e-234) tmp = Float64(a - Float64(b * Float64(y / t))); elseif (x <= 1.02e+27) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = z * ((x + y) / (y + (x + t))); tmp = 0.0; if (x <= -1.65e+77) tmp = t_2; elseif (x <= -4e-151) tmp = t_1; elseif (x <= -3.8e-234) tmp = a - (b * (y / t)); elseif (x <= 1.02e+27) tmp = t_1; else tmp = t_2; 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[(z * N[(N[(x + y), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.65e+77], t$95$2, If[LessEqual[x, -4e-151], t$95$1, If[LessEqual[x, -3.8e-234], N[(a - N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.02e+27], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := z \cdot \frac{x + y}{y + \left(x + t\right)}\\
\mathbf{if}\;x \leq -1.65 \cdot 10^{+77}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;x \leq -4 \cdot 10^{-151}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;x \leq -3.8 \cdot 10^{-234}:\\
\;\;\;\;a - b \cdot \frac{y}{t}\\
\mathbf{elif}\;x \leq 1.02 \cdot 10^{+27}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if x < -1.6499999999999999e77 or 1.0199999999999999e27 < x Initial program 50.0%
Taylor expanded in z around inf 29.8%
associate-/l*60.0%
+-commutative60.0%
+-commutative60.0%
associate-+r+60.0%
+-commutative60.0%
associate-+l+60.0%
Simplified60.0%
if -1.6499999999999999e77 < x < -3.9999999999999998e-151 or -3.79999999999999984e-234 < x < 1.0199999999999999e27Initial program 65.2%
Taylor expanded in y around inf 68.8%
if -3.9999999999999998e-151 < x < -3.79999999999999984e-234Initial program 66.7%
Taylor expanded in x around 0 60.1%
Taylor expanded in z around 0 58.2%
*-commutative58.2%
+-commutative58.2%
+-commutative58.2%
Simplified58.2%
Taylor expanded in y around 0 77.9%
mul-1-neg77.9%
unsub-neg77.9%
associate-/l*78.5%
Simplified78.5%
Final simplification65.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (- a (* b (/ y t)))))
(if (<= t -5e+129)
t_2
(if (<= t 1.5e+133)
t_1
(if (<= t 1.6e+154)
(* z (/ (+ x y) t))
(if (<= t 9.8e+163) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = a - (b * (y / t));
double tmp;
if (t <= -5e+129) {
tmp = t_2;
} else if (t <= 1.5e+133) {
tmp = t_1;
} else if (t <= 1.6e+154) {
tmp = z * ((x + y) / t);
} else if (t <= 9.8e+163) {
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 = (z + a) - b
t_2 = a - (b * (y / t))
if (t <= (-5d+129)) then
tmp = t_2
else if (t <= 1.5d+133) then
tmp = t_1
else if (t <= 1.6d+154) then
tmp = z * ((x + y) / t)
else if (t <= 9.8d+163) 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 = (z + a) - b;
double t_2 = a - (b * (y / t));
double tmp;
if (t <= -5e+129) {
tmp = t_2;
} else if (t <= 1.5e+133) {
tmp = t_1;
} else if (t <= 1.6e+154) {
tmp = z * ((x + y) / t);
} else if (t <= 9.8e+163) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = a - (b * (y / t)) tmp = 0 if t <= -5e+129: tmp = t_2 elif t <= 1.5e+133: tmp = t_1 elif t <= 1.6e+154: tmp = z * ((x + y) / t) elif t <= 9.8e+163: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(a - Float64(b * Float64(y / t))) tmp = 0.0 if (t <= -5e+129) tmp = t_2; elseif (t <= 1.5e+133) tmp = t_1; elseif (t <= 1.6e+154) tmp = Float64(z * Float64(Float64(x + y) / t)); elseif (t <= 9.8e+163) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = a - (b * (y / t)); tmp = 0.0; if (t <= -5e+129) tmp = t_2; elseif (t <= 1.5e+133) tmp = t_1; elseif (t <= 1.6e+154) tmp = z * ((x + y) / t); elseif (t <= 9.8e+163) tmp = t_1; else tmp = t_2; 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[(a - N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -5e+129], t$95$2, If[LessEqual[t, 1.5e+133], t$95$1, If[LessEqual[t, 1.6e+154], N[(z * N[(N[(x + y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9.8e+163], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := a - b \cdot \frac{y}{t}\\
\mathbf{if}\;t \leq -5 \cdot 10^{+129}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+154}:\\
\;\;\;\;z \cdot \frac{x + y}{t}\\
\mathbf{elif}\;t \leq 9.8 \cdot 10^{+163}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -5.0000000000000003e129 or 9.8e163 < t Initial program 46.1%
Taylor expanded in x around 0 30.6%
Taylor expanded in z around 0 28.6%
*-commutative28.6%
+-commutative28.6%
+-commutative28.6%
Simplified28.6%
Taylor expanded in y around 0 58.1%
mul-1-neg58.1%
unsub-neg58.1%
associate-/l*56.4%
Simplified56.4%
if -5.0000000000000003e129 < t < 1.50000000000000003e133 or 1.6e154 < t < 9.8e163Initial program 61.8%
Taylor expanded in y around inf 66.9%
if 1.50000000000000003e133 < t < 1.6e154Initial program 99.6%
Taylor expanded in z around inf 63.8%
+-commutative63.8%
Simplified63.8%
Taylor expanded in t around inf 63.5%
associate-/l*63.3%
+-commutative63.3%
Simplified63.3%
Final simplification64.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (- a (* b (/ y t)))))
(if (<= t -3.7e+130)
t_2
(if (<= t 1.5e+133)
t_1
(if (<= t 1.6e+154) (/ (* z (+ x y)) t) (if (<= t 3e+162) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = a - (b * (y / t));
double tmp;
if (t <= -3.7e+130) {
tmp = t_2;
} else if (t <= 1.5e+133) {
tmp = t_1;
} else if (t <= 1.6e+154) {
tmp = (z * (x + y)) / t;
} else if (t <= 3e+162) {
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 = (z + a) - b
t_2 = a - (b * (y / t))
if (t <= (-3.7d+130)) then
tmp = t_2
else if (t <= 1.5d+133) then
tmp = t_1
else if (t <= 1.6d+154) then
tmp = (z * (x + y)) / t
else if (t <= 3d+162) 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 = (z + a) - b;
double t_2 = a - (b * (y / t));
double tmp;
if (t <= -3.7e+130) {
tmp = t_2;
} else if (t <= 1.5e+133) {
tmp = t_1;
} else if (t <= 1.6e+154) {
tmp = (z * (x + y)) / t;
} else if (t <= 3e+162) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = a - (b * (y / t)) tmp = 0 if t <= -3.7e+130: tmp = t_2 elif t <= 1.5e+133: tmp = t_1 elif t <= 1.6e+154: tmp = (z * (x + y)) / t elif t <= 3e+162: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(a - Float64(b * Float64(y / t))) tmp = 0.0 if (t <= -3.7e+130) tmp = t_2; elseif (t <= 1.5e+133) tmp = t_1; elseif (t <= 1.6e+154) tmp = Float64(Float64(z * Float64(x + y)) / t); elseif (t <= 3e+162) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = a - (b * (y / t)); tmp = 0.0; if (t <= -3.7e+130) tmp = t_2; elseif (t <= 1.5e+133) tmp = t_1; elseif (t <= 1.6e+154) tmp = (z * (x + y)) / t; elseif (t <= 3e+162) tmp = t_1; else tmp = t_2; 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[(a - N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.7e+130], t$95$2, If[LessEqual[t, 1.5e+133], t$95$1, If[LessEqual[t, 1.6e+154], N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 3e+162], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := a - b \cdot \frac{y}{t}\\
\mathbf{if}\;t \leq -3.7 \cdot 10^{+130}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+154}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right)}{t}\\
\mathbf{elif}\;t \leq 3 \cdot 10^{+162}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -3.7000000000000001e130 or 2.9999999999999998e162 < t Initial program 46.1%
Taylor expanded in x around 0 30.6%
Taylor expanded in z around 0 28.6%
*-commutative28.6%
+-commutative28.6%
+-commutative28.6%
Simplified28.6%
Taylor expanded in y around 0 58.1%
mul-1-neg58.1%
unsub-neg58.1%
associate-/l*56.4%
Simplified56.4%
if -3.7000000000000001e130 < t < 1.50000000000000003e133 or 1.6e154 < t < 2.9999999999999998e162Initial program 61.8%
Taylor expanded in y around inf 66.9%
if 1.50000000000000003e133 < t < 1.6e154Initial program 99.6%
Taylor expanded in z around inf 63.8%
+-commutative63.8%
Simplified63.8%
Taylor expanded in t around inf 63.5%
Final simplification64.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (- a (/ (* y b) t))))
(if (<= t -1.7e+130)
t_2
(if (<= t 1.5e+133)
t_1
(if (<= t 1.6e+154)
(/ (* z (+ x y)) t)
(if (<= t 8.8e+163) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = a - ((y * b) / t);
double tmp;
if (t <= -1.7e+130) {
tmp = t_2;
} else if (t <= 1.5e+133) {
tmp = t_1;
} else if (t <= 1.6e+154) {
tmp = (z * (x + y)) / t;
} else if (t <= 8.8e+163) {
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 = (z + a) - b
t_2 = a - ((y * b) / t)
if (t <= (-1.7d+130)) then
tmp = t_2
else if (t <= 1.5d+133) then
tmp = t_1
else if (t <= 1.6d+154) then
tmp = (z * (x + y)) / t
else if (t <= 8.8d+163) 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 = (z + a) - b;
double t_2 = a - ((y * b) / t);
double tmp;
if (t <= -1.7e+130) {
tmp = t_2;
} else if (t <= 1.5e+133) {
tmp = t_1;
} else if (t <= 1.6e+154) {
tmp = (z * (x + y)) / t;
} else if (t <= 8.8e+163) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = a - ((y * b) / t) tmp = 0 if t <= -1.7e+130: tmp = t_2 elif t <= 1.5e+133: tmp = t_1 elif t <= 1.6e+154: tmp = (z * (x + y)) / t elif t <= 8.8e+163: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(a - Float64(Float64(y * b) / t)) tmp = 0.0 if (t <= -1.7e+130) tmp = t_2; elseif (t <= 1.5e+133) tmp = t_1; elseif (t <= 1.6e+154) tmp = Float64(Float64(z * Float64(x + y)) / t); elseif (t <= 8.8e+163) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = a - ((y * b) / t); tmp = 0.0; if (t <= -1.7e+130) tmp = t_2; elseif (t <= 1.5e+133) tmp = t_1; elseif (t <= 1.6e+154) tmp = (z * (x + y)) / t; elseif (t <= 8.8e+163) tmp = t_1; else tmp = t_2; 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[(a - N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.7e+130], t$95$2, If[LessEqual[t, 1.5e+133], t$95$1, If[LessEqual[t, 1.6e+154], N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[t, 8.8e+163], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := a - \frac{y \cdot b}{t}\\
\mathbf{if}\;t \leq -1.7 \cdot 10^{+130}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq 1.5 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{+154}:\\
\;\;\;\;\frac{z \cdot \left(x + y\right)}{t}\\
\mathbf{elif}\;t \leq 8.8 \cdot 10^{+163}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.7e130 or 8.79999999999999945e163 < t Initial program 46.1%
Taylor expanded in x around 0 30.6%
Taylor expanded in z around 0 28.6%
*-commutative28.6%
+-commutative28.6%
+-commutative28.6%
Simplified28.6%
Taylor expanded in y around 0 58.1%
associate-*r/58.1%
neg-mul-158.1%
distribute-rgt-neg-in58.1%
Simplified58.1%
if -1.7e130 < t < 1.50000000000000003e133 or 1.6e154 < t < 8.79999999999999945e163Initial program 61.8%
Taylor expanded in y around inf 66.9%
if 1.50000000000000003e133 < t < 1.6e154Initial program 99.6%
Taylor expanded in z around inf 63.8%
+-commutative63.8%
Simplified63.8%
Taylor expanded in t around inf 63.5%
Final simplification64.7%
(FPCore (x y z t a b)
:precision binary64
(if (<= x -8.5e+154)
z
(if (or (<= x -5.2e-151) (not (<= x -1.5e-233)))
(- (+ z a) b)
(* a (/ t (+ x t))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -8.5e+154) {
tmp = z;
} else if ((x <= -5.2e-151) || !(x <= -1.5e-233)) {
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 (x <= (-8.5d+154)) then
tmp = z
else if ((x <= (-5.2d-151)) .or. (.not. (x <= (-1.5d-233)))) 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 (x <= -8.5e+154) {
tmp = z;
} else if ((x <= -5.2e-151) || !(x <= -1.5e-233)) {
tmp = (z + a) - b;
} else {
tmp = a * (t / (x + t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -8.5e+154: tmp = z elif (x <= -5.2e-151) or not (x <= -1.5e-233): tmp = (z + a) - b else: tmp = a * (t / (x + t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -8.5e+154) tmp = z; elseif ((x <= -5.2e-151) || !(x <= -1.5e-233)) 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 (x <= -8.5e+154) tmp = z; elseif ((x <= -5.2e-151) || ~((x <= -1.5e-233))) tmp = (z + a) - b; else tmp = a * (t / (x + t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -8.5e+154], z, If[Or[LessEqual[x, -5.2e-151], N[Not[LessEqual[x, -1.5e-233]], $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}\;x \leq -8.5 \cdot 10^{+154}:\\
\;\;\;\;z\\
\mathbf{elif}\;x \leq -5.2 \cdot 10^{-151} \lor \neg \left(x \leq -1.5 \cdot 10^{-233}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{t}{x + t}\\
\end{array}
\end{array}
if x < -8.5000000000000002e154Initial program 42.7%
Taylor expanded in x around inf 71.9%
if -8.5000000000000002e154 < x < -5.2000000000000001e-151 or -1.49999999999999999e-233 < x Initial program 60.6%
Taylor expanded in y around inf 60.1%
if -5.2000000000000001e-151 < x < -1.49999999999999999e-233Initial program 66.7%
Taylor expanded in y around 0 50.1%
Taylor expanded in a around inf 50.4%
associate-/l*70.6%
+-commutative70.6%
Simplified70.6%
Final simplification61.8%
(FPCore (x y z t a b) :precision binary64 (if (<= a -6.4e+32) a (if (<= a 9e+86) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -6.4e+32) {
tmp = a;
} else if (a <= 9e+86) {
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 <= (-6.4d+32)) then
tmp = a
else if (a <= 9d+86) 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 <= -6.4e+32) {
tmp = a;
} else if (a <= 9e+86) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -6.4e+32: tmp = a elif a <= 9e+86: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -6.4e+32) tmp = a; elseif (a <= 9e+86) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -6.4e+32) tmp = a; elseif (a <= 9e+86) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -6.4e+32], a, If[LessEqual[a, 9e+86], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.4 \cdot 10^{+32}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 9 \cdot 10^{+86}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -6.3999999999999998e32 or 8.99999999999999986e86 < a Initial program 41.1%
Taylor expanded in t around inf 57.8%
if -6.3999999999999998e32 < a < 8.99999999999999986e86Initial program 71.7%
Taylor expanded in x around inf 43.9%
Final simplification49.6%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.22e+17) (- a b) (if (<= a 7.8e+84) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.22e+17) {
tmp = a - b;
} else if (a <= 7.8e+84) {
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 <= (-1.22d+17)) then
tmp = a - b
else if (a <= 7.8d+84) 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 <= -1.22e+17) {
tmp = a - b;
} else if (a <= 7.8e+84) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.22e+17: tmp = a - b elif a <= 7.8e+84: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.22e+17) tmp = Float64(a - b); elseif (a <= 7.8e+84) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -1.22e+17) tmp = a - b; elseif (a <= 7.8e+84) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.22e+17], N[(a - b), $MachinePrecision], If[LessEqual[a, 7.8e+84], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.22 \cdot 10^{+17}:\\
\;\;\;\;a - b\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{+84}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -1.22e17Initial program 42.6%
Taylor expanded in x around 0 28.1%
Taylor expanded in z around 0 23.0%
*-commutative23.0%
+-commutative23.0%
+-commutative23.0%
Simplified23.0%
Taylor expanded in y around inf 54.8%
if -1.22e17 < a < 7.80000000000000032e84Initial program 71.4%
Taylor expanded in x around inf 44.6%
if 7.80000000000000032e84 < a Initial program 44.7%
Taylor expanded in t around inf 62.1%
Final simplification50.6%
(FPCore (x y z t a b) :precision binary64 (if (<= t 3.8e+162) (- (+ z a) b) a))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 3.8e+162) {
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 <= 3.8d+162) 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 <= 3.8e+162) {
tmp = (z + a) - b;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= 3.8e+162: tmp = (z + a) - b else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 3.8e+162) 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 <= 3.8e+162) tmp = (z + a) - b; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 3.8e+162], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], a]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.8 \cdot 10^{+162}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < 3.80000000000000024e162Initial program 61.0%
Taylor expanded in y around inf 60.1%
if 3.80000000000000024e162 < t Initial program 46.1%
Taylor expanded in t around inf 57.7%
Final simplification59.8%
(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.1%
Taylor expanded in t around inf 31.3%
Final simplification31.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x t) y))
(t_2 (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))
(t_3 (/ t_2 t_1))
(t_4 (- (+ z a) b)))
(if (< t_3 -3.5813117084150564e+153)
t_4
(if (< t_3 1.2285964308315609e+82) (/ 1.0 (/ t_1 t_2)) t_4))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (x + t) + y
t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
t_3 = t_2 / t_1
t_4 = (z + a) - b
if (t_3 < (-3.5813117084150564d+153)) then
tmp = t_4
else if (t_3 < 1.2285964308315609d+82) then
tmp = 1.0d0 / (t_1 / t_2)
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + t) + y t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b) t_3 = t_2 / t_1 t_4 = (z + a) - b tmp = 0 if t_3 < -3.5813117084150564e+153: tmp = t_4 elif t_3 < 1.2285964308315609e+82: tmp = 1.0 / (t_1 / t_2) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + t) + y) t_2 = Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) t_3 = Float64(t_2 / t_1) t_4 = Float64(Float64(z + a) - b) tmp = 0.0 if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = Float64(1.0 / Float64(t_1 / t_2)); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + t) + y; t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b); t_3 = t_2 / t_1; t_4 = (z + a) - b; tmp = 0.0; if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = 1.0 / (t_1 / t_2); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[Less[t$95$3, -3.5813117084150564e+153], t$95$4, If[Less[t$95$3, 1.2285964308315609e+82], N[(1.0 / N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\
t_3 := \frac{t\_2}{t\_1}\\
t_4 := \left(z + a\right) - b\\
\mathbf{if}\;t\_3 < -3.5813117084150564 \cdot 10^{+153}:\\
\;\;\;\;t\_4\\
\mathbf{elif}\;t\_3 < 1.2285964308315609 \cdot 10^{+82}:\\
\;\;\;\;\frac{1}{\frac{t\_1}{t\_2}}\\
\mathbf{else}:\\
\;\;\;\;t\_4\\
\end{array}
\end{array}
herbie shell --seed 2024050
(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)))