
(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 13 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)))
(t_3 (/ (- (+ (* z (+ x y)) (* a (+ y t))) (* y b)) t_2)))
(if (or (<= t_3 -5e+236) (not (<= t_3 1e+306)))
(*
a
(+
(/ t t_1)
(- (+ (/ y t_1) (* (/ z a) (/ (+ x y) t_1))) (* b (/ y (* a t_1))))))
(/ (+ (* t a) (+ (* x z) (* y (- (+ z a) b)))) 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 t_3 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / t_2;
double tmp;
if ((t_3 <= -5e+236) || !(t_3 <= 1e+306)) {
tmp = a * ((t / t_1) + (((y / t_1) + ((z / a) * ((x + y) / t_1))) - (b * (y / (a * t_1)))));
} else {
tmp = ((t * a) + ((x * z) + (y * ((z + a) - b)))) / 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 = t + (x + y)
t_2 = y + (x + t)
t_3 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / t_2
if ((t_3 <= (-5d+236)) .or. (.not. (t_3 <= 1d+306))) then
tmp = a * ((t / t_1) + (((y / t_1) + ((z / a) * ((x + y) / t_1))) - (b * (y / (a * t_1)))))
else
tmp = ((t * a) + ((x * z) + (y * ((z + a) - b)))) / 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 t_3 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / t_2;
double tmp;
if ((t_3 <= -5e+236) || !(t_3 <= 1e+306)) {
tmp = a * ((t / t_1) + (((y / t_1) + ((z / a) * ((x + y) / t_1))) - (b * (y / (a * t_1)))));
} else {
tmp = ((t * a) + ((x * z) + (y * ((z + a) - b)))) / t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t + (x + y) t_2 = y + (x + t) t_3 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / t_2 tmp = 0 if (t_3 <= -5e+236) or not (t_3 <= 1e+306): tmp = a * ((t / t_1) + (((y / t_1) + ((z / a) * ((x + y) / t_1))) - (b * (y / (a * t_1))))) else: tmp = ((t * a) + ((x * z) + (y * ((z + a) - b)))) / 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)) t_3 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + Float64(a * Float64(y + t))) - Float64(y * b)) / t_2) tmp = 0.0 if ((t_3 <= -5e+236) || !(t_3 <= 1e+306)) tmp = Float64(a * Float64(Float64(t / t_1) + Float64(Float64(Float64(y / t_1) + Float64(Float64(z / a) * Float64(Float64(x + y) / t_1))) - Float64(b * Float64(y / Float64(a * t_1)))))); else tmp = Float64(Float64(Float64(t * a) + Float64(Float64(x * z) + Float64(y * Float64(Float64(z + a) - b)))) / 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); t_3 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / t_2; tmp = 0.0; if ((t_3 <= -5e+236) || ~((t_3 <= 1e+306))) tmp = a * ((t / t_1) + (((y / t_1) + ((z / a) * ((x + y) / t_1))) - (b * (y / (a * t_1))))); else tmp = ((t * a) + ((x * z) + (y * ((z + a) - b)))) / 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]}, Block[{t$95$3 = N[(N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, If[Or[LessEqual[t$95$3, -5e+236], N[Not[LessEqual[t$95$3, 1e+306]], $MachinePrecision]], N[(a * N[(N[(t / t$95$1), $MachinePrecision] + N[(N[(N[(y / t$95$1), $MachinePrecision] + N[(N[(z / a), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / N[(a * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] + N[(N[(x * z), $MachinePrecision] + N[(y * N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t + \left(x + y\right)\\
t_2 := y + \left(x + t\right)\\
t_3 := \frac{\left(z \cdot \left(x + y\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{t\_2}\\
\mathbf{if}\;t\_3 \leq -5 \cdot 10^{+236} \lor \neg \left(t\_3 \leq 10^{+306}\right):\\
\;\;\;\;a \cdot \left(\frac{t}{t\_1} + \left(\left(\frac{y}{t\_1} + \frac{z}{a} \cdot \frac{x + y}{t\_1}\right) - b \cdot \frac{y}{a \cdot t\_1}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot a + \left(x \cdot z + y \cdot \left(\left(z + a\right) - b\right)\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)) < -4.9999999999999997e236 or 1.00000000000000002e306 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 13.1%
Taylor expanded in a around inf 40.0%
associate--l+40.0%
+-commutative40.0%
+-commutative40.0%
times-frac63.9%
+-commutative63.9%
+-commutative63.9%
associate-/l*80.3%
+-commutative80.3%
Simplified80.3%
if -4.9999999999999997e236 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.00000000000000002e306Initial program 99.7%
Taylor expanded in y around 0 99.7%
Final simplification91.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ (- (+ (* z (+ x y)) (* a (+ y t))) (* y b)) t_1))
(t_3 (- (+ z a) b)))
(if (or (<= t_2 (- INFINITY)) (not (<= t_2 1e+306)))
t_3
(/ (+ (* t a) (+ (* x z) (* y t_3))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / t_1;
double t_3 = (z + a) - b;
double tmp;
if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 1e+306)) {
tmp = t_3;
} else {
tmp = ((t * a) + ((x * z) + (y * t_3))) / t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / t_1;
double t_3 = (z + a) - b;
double tmp;
if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 1e+306)) {
tmp = t_3;
} else {
tmp = ((t * a) + ((x * z) + (y * t_3))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / t_1 t_3 = (z + a) - b tmp = 0 if (t_2 <= -math.inf) or not (t_2 <= 1e+306): tmp = t_3 else: tmp = ((t * a) + ((x * z) + (y * t_3))) / 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(z * Float64(x + y)) + Float64(a * Float64(y + t))) - Float64(y * b)) / t_1) t_3 = Float64(Float64(z + a) - b) tmp = 0.0 if ((t_2 <= Float64(-Inf)) || !(t_2 <= 1e+306)) tmp = t_3; else tmp = Float64(Float64(Float64(t * a) + Float64(Float64(x * z) + Float64(y * t_3))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / t_1; t_3 = (z + a) - b; tmp = 0.0; if ((t_2 <= -Inf) || ~((t_2 <= 1e+306))) tmp = t_3; else tmp = ((t * a) + ((x * z) + (y * t_3))) / 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[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 1e+306]], $MachinePrecision]], t$95$3, N[(N[(N[(t * a), $MachinePrecision] + N[(N[(x * z), $MachinePrecision] + N[(y * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{\left(z \cdot \left(x + y\right) + a \cdot \left(y + t\right)\right) - y \cdot b}{t\_1}\\
t_3 := \left(z + a\right) - b\\
\mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 10^{+306}\right):\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot a + \left(x \cdot z + y \cdot t\_3\right)}{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.00000000000000002e306 < (/.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 y around inf 71.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)) < 1.00000000000000002e306Initial program 99.7%
Taylor expanded in y around 0 99.7%
Final simplification88.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (* t (/ (+ a (* x (/ z t))) (+ x t)))))
(if (<= t -1.3e+25)
t_2
(if (<= t -5.5e-290)
t_1
(if (<= t 2.4e-292)
(- z (/ (* y b) (+ x y)))
(if (<= t 1.3e-93)
t_1
(if (<= t 9e-14)
(/ (- (* x z) (* y b)) (+ y (+ x t)))
(if (<= t 1.15e+15) 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 = t * ((a + (x * (z / t))) / (x + t));
double tmp;
if (t <= -1.3e+25) {
tmp = t_2;
} else if (t <= -5.5e-290) {
tmp = t_1;
} else if (t <= 2.4e-292) {
tmp = z - ((y * b) / (x + y));
} else if (t <= 1.3e-93) {
tmp = t_1;
} else if (t <= 9e-14) {
tmp = ((x * z) - (y * b)) / (y + (x + t));
} else if (t <= 1.15e+15) {
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 = t * ((a + (x * (z / t))) / (x + t))
if (t <= (-1.3d+25)) then
tmp = t_2
else if (t <= (-5.5d-290)) then
tmp = t_1
else if (t <= 2.4d-292) then
tmp = z - ((y * b) / (x + y))
else if (t <= 1.3d-93) then
tmp = t_1
else if (t <= 9d-14) then
tmp = ((x * z) - (y * b)) / (y + (x + t))
else if (t <= 1.15d+15) 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 = t * ((a + (x * (z / t))) / (x + t));
double tmp;
if (t <= -1.3e+25) {
tmp = t_2;
} else if (t <= -5.5e-290) {
tmp = t_1;
} else if (t <= 2.4e-292) {
tmp = z - ((y * b) / (x + y));
} else if (t <= 1.3e-93) {
tmp = t_1;
} else if (t <= 9e-14) {
tmp = ((x * z) - (y * b)) / (y + (x + t));
} else if (t <= 1.15e+15) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = t * ((a + (x * (z / t))) / (x + t)) tmp = 0 if t <= -1.3e+25: tmp = t_2 elif t <= -5.5e-290: tmp = t_1 elif t <= 2.4e-292: tmp = z - ((y * b) / (x + y)) elif t <= 1.3e-93: tmp = t_1 elif t <= 9e-14: tmp = ((x * z) - (y * b)) / (y + (x + t)) elif t <= 1.15e+15: 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(t * Float64(Float64(a + Float64(x * Float64(z / t))) / Float64(x + t))) tmp = 0.0 if (t <= -1.3e+25) tmp = t_2; elseif (t <= -5.5e-290) tmp = t_1; elseif (t <= 2.4e-292) tmp = Float64(z - Float64(Float64(y * b) / Float64(x + y))); elseif (t <= 1.3e-93) tmp = t_1; elseif (t <= 9e-14) tmp = Float64(Float64(Float64(x * z) - Float64(y * b)) / Float64(y + Float64(x + t))); elseif (t <= 1.15e+15) 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 = t * ((a + (x * (z / t))) / (x + t)); tmp = 0.0; if (t <= -1.3e+25) tmp = t_2; elseif (t <= -5.5e-290) tmp = t_1; elseif (t <= 2.4e-292) tmp = z - ((y * b) / (x + y)); elseif (t <= 1.3e-93) tmp = t_1; elseif (t <= 9e-14) tmp = ((x * z) - (y * b)) / (y + (x + t)); elseif (t <= 1.15e+15) 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[(t * N[(N[(a + N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.3e+25], t$95$2, If[LessEqual[t, -5.5e-290], t$95$1, If[LessEqual[t, 2.4e-292], N[(z - N[(N[(y * b), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.3e-93], t$95$1, If[LessEqual[t, 9e-14], N[(N[(N[(x * z), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.15e+15], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := t \cdot \frac{a + x \cdot \frac{z}{t}}{x + t}\\
\mathbf{if}\;t \leq -1.3 \cdot 10^{+25}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -5.5 \cdot 10^{-290}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-292}:\\
\;\;\;\;z - \frac{y \cdot b}{x + y}\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-93}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 9 \cdot 10^{-14}:\\
\;\;\;\;\frac{x \cdot z - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+15}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -1.2999999999999999e25 or 1.15e15 < t Initial program 55.6%
Taylor expanded in t around inf 55.4%
associate-/l*55.6%
associate-/l*54.9%
+-commutative54.9%
Simplified54.9%
Taylor expanded in y around 0 42.9%
associate-/l*56.5%
associate-/l*63.7%
Simplified63.7%
if -1.2999999999999999e25 < t < -5.5e-290 or 2.4000000000000001e-292 < t < 1.2999999999999999e-93 or 8.9999999999999995e-14 < t < 1.15e15Initial program 66.0%
Taylor expanded in y around inf 68.0%
if -5.5e-290 < t < 2.4000000000000001e-292Initial program 76.1%
Taylor expanded in a around inf 35.7%
associate--l+35.7%
+-commutative35.7%
+-commutative35.7%
times-frac51.8%
+-commutative51.8%
+-commutative51.8%
associate-/l*52.0%
+-commutative52.0%
Simplified52.0%
Taylor expanded in t around 0 51.8%
+-commutative51.8%
associate-/l*52.0%
associate-/r*52.5%
+-commutative52.5%
Simplified52.5%
Taylor expanded in a around 0 92.1%
+-commutative92.1%
Simplified92.1%
if 1.2999999999999999e-93 < t < 8.9999999999999995e-14Initial program 86.3%
Taylor expanded in t around inf 72.6%
associate-/l*72.6%
associate-/l*72.3%
+-commutative72.3%
Simplified72.3%
Taylor expanded in x around inf 65.6%
Final simplification67.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ 1.0 (/ (/ (+ x (+ y t)) y) (+ a (- z b)))))
(t_2 (* a (- (+ (/ z a) (/ y (+ x y))) (* b (/ (/ y a) (+ x y)))))))
(if (<= y -3.5e+133)
t_1
(if (<= y -3.25e-31)
t_2
(if (<= y -1.5e-60)
(/ (- (* t a) (* y b)) (+ y (+ x t)))
(if (<= y -3.25e-146)
t_2
(if (<= y 1.3e+31) (/ (+ (* t a) (* x z)) (+ x t)) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 / (((x + (y + t)) / y) / (a + (z - b)));
double t_2 = a * (((z / a) + (y / (x + y))) - (b * ((y / a) / (x + y))));
double tmp;
if (y <= -3.5e+133) {
tmp = t_1;
} else if (y <= -3.25e-31) {
tmp = t_2;
} else if (y <= -1.5e-60) {
tmp = ((t * a) - (y * b)) / (y + (x + t));
} else if (y <= -3.25e-146) {
tmp = t_2;
} else if (y <= 1.3e+31) {
tmp = ((t * a) + (x * z)) / (x + t);
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 1.0d0 / (((x + (y + t)) / y) / (a + (z - b)))
t_2 = a * (((z / a) + (y / (x + y))) - (b * ((y / a) / (x + y))))
if (y <= (-3.5d+133)) then
tmp = t_1
else if (y <= (-3.25d-31)) then
tmp = t_2
else if (y <= (-1.5d-60)) then
tmp = ((t * a) - (y * b)) / (y + (x + t))
else if (y <= (-3.25d-146)) then
tmp = t_2
else if (y <= 1.3d+31) then
tmp = ((t * a) + (x * z)) / (x + t)
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 / (((x + (y + t)) / y) / (a + (z - b)));
double t_2 = a * (((z / a) + (y / (x + y))) - (b * ((y / a) / (x + y))));
double tmp;
if (y <= -3.5e+133) {
tmp = t_1;
} else if (y <= -3.25e-31) {
tmp = t_2;
} else if (y <= -1.5e-60) {
tmp = ((t * a) - (y * b)) / (y + (x + t));
} else if (y <= -3.25e-146) {
tmp = t_2;
} else if (y <= 1.3e+31) {
tmp = ((t * a) + (x * z)) / (x + t);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 / (((x + (y + t)) / y) / (a + (z - b))) t_2 = a * (((z / a) + (y / (x + y))) - (b * ((y / a) / (x + y)))) tmp = 0 if y <= -3.5e+133: tmp = t_1 elif y <= -3.25e-31: tmp = t_2 elif y <= -1.5e-60: tmp = ((t * a) - (y * b)) / (y + (x + t)) elif y <= -3.25e-146: tmp = t_2 elif y <= 1.3e+31: tmp = ((t * a) + (x * z)) / (x + t) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 / Float64(Float64(Float64(x + Float64(y + t)) / y) / Float64(a + Float64(z - b)))) t_2 = Float64(a * Float64(Float64(Float64(z / a) + Float64(y / Float64(x + y))) - Float64(b * Float64(Float64(y / a) / Float64(x + y))))) tmp = 0.0 if (y <= -3.5e+133) tmp = t_1; elseif (y <= -3.25e-31) tmp = t_2; elseif (y <= -1.5e-60) tmp = Float64(Float64(Float64(t * a) - Float64(y * b)) / Float64(y + Float64(x + t))); elseif (y <= -3.25e-146) tmp = t_2; elseif (y <= 1.3e+31) tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 / (((x + (y + t)) / y) / (a + (z - b))); t_2 = a * (((z / a) + (y / (x + y))) - (b * ((y / a) / (x + y)))); tmp = 0.0; if (y <= -3.5e+133) tmp = t_1; elseif (y <= -3.25e-31) tmp = t_2; elseif (y <= -1.5e-60) tmp = ((t * a) - (y * b)) / (y + (x + t)); elseif (y <= -3.25e-146) tmp = t_2; elseif (y <= 1.3e+31) tmp = ((t * a) + (x * z)) / (x + t); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 / N[(N[(N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / N[(a + N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(N[(N[(z / a), $MachinePrecision] + N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(N[(y / a), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.5e+133], t$95$1, If[LessEqual[y, -3.25e-31], t$95$2, If[LessEqual[y, -1.5e-60], N[(N[(N[(t * a), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.25e-146], t$95$2, If[LessEqual[y, 1.3e+31], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{\frac{\frac{x + \left(y + t\right)}{y}}{a + \left(z - b\right)}}\\
t_2 := a \cdot \left(\left(\frac{z}{a} + \frac{y}{x + y}\right) - b \cdot \frac{\frac{y}{a}}{x + y}\right)\\
\mathbf{if}\;y \leq -3.5 \cdot 10^{+133}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.25 \cdot 10^{-31}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -1.5 \cdot 10^{-60}:\\
\;\;\;\;\frac{t \cdot a - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{elif}\;y \leq -3.25 \cdot 10^{-146}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+31}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.4999999999999998e133 or 1.3e31 < y Initial program 38.8%
Taylor expanded in y around inf 34.4%
clear-num34.4%
inv-pow34.4%
+-commutative34.4%
+-commutative34.4%
associate--l+34.4%
Applied egg-rr34.4%
unpow-134.4%
associate-+r-34.4%
associate-/r*84.5%
associate-+r+84.5%
+-commutative84.5%
+-commutative84.5%
+-commutative84.5%
associate-+r-84.5%
Simplified84.5%
if -3.4999999999999998e133 < y < -3.24999999999999983e-31 or -1.50000000000000009e-60 < y < -3.2499999999999999e-146Initial program 71.5%
Taylor expanded in a around inf 78.2%
associate--l+78.2%
+-commutative78.2%
+-commutative78.2%
times-frac95.8%
+-commutative95.8%
+-commutative95.8%
associate-/l*95.8%
+-commutative95.8%
Simplified95.8%
Taylor expanded in t around 0 77.8%
+-commutative77.8%
associate-/l*77.8%
associate-/r*77.8%
+-commutative77.8%
Simplified77.8%
if -3.24999999999999983e-31 < y < -1.50000000000000009e-60Initial program 87.4%
Taylor expanded in t around inf 75.1%
associate-/l*75.1%
associate-/l*75.1%
+-commutative75.1%
Simplified75.1%
Taylor expanded in t around inf 82.1%
if -3.2499999999999999e-146 < y < 1.3e31Initial program 76.6%
Taylor expanded in y around 0 58.1%
Final simplification71.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ 1.0 (/ (/ (+ x (+ y t)) y) (+ a (- z b)))))
(t_2 (* t (/ (+ a (* x (/ z t))) (+ x t)))))
(if (<= t -1e+24)
t_2
(if (<= t -1.12e-268)
t_1
(if (<= t 3.9e-275)
(- z (/ (* y b) (+ x y)))
(if (<= t 1050000000000.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 / (((x + (y + t)) / y) / (a + (z - b)));
double t_2 = t * ((a + (x * (z / t))) / (x + t));
double tmp;
if (t <= -1e+24) {
tmp = t_2;
} else if (t <= -1.12e-268) {
tmp = t_1;
} else if (t <= 3.9e-275) {
tmp = z - ((y * b) / (x + y));
} else if (t <= 1050000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = 1.0d0 / (((x + (y + t)) / y) / (a + (z - b)))
t_2 = t * ((a + (x * (z / t))) / (x + t))
if (t <= (-1d+24)) then
tmp = t_2
else if (t <= (-1.12d-268)) then
tmp = t_1
else if (t <= 3.9d-275) then
tmp = z - ((y * b) / (x + y))
else if (t <= 1050000000000.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 1.0 / (((x + (y + t)) / y) / (a + (z - b)));
double t_2 = t * ((a + (x * (z / t))) / (x + t));
double tmp;
if (t <= -1e+24) {
tmp = t_2;
} else if (t <= -1.12e-268) {
tmp = t_1;
} else if (t <= 3.9e-275) {
tmp = z - ((y * b) / (x + y));
} else if (t <= 1050000000000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = 1.0 / (((x + (y + t)) / y) / (a + (z - b))) t_2 = t * ((a + (x * (z / t))) / (x + t)) tmp = 0 if t <= -1e+24: tmp = t_2 elif t <= -1.12e-268: tmp = t_1 elif t <= 3.9e-275: tmp = z - ((y * b) / (x + y)) elif t <= 1050000000000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(1.0 / Float64(Float64(Float64(x + Float64(y + t)) / y) / Float64(a + Float64(z - b)))) t_2 = Float64(t * Float64(Float64(a + Float64(x * Float64(z / t))) / Float64(x + t))) tmp = 0.0 if (t <= -1e+24) tmp = t_2; elseif (t <= -1.12e-268) tmp = t_1; elseif (t <= 3.9e-275) tmp = Float64(z - Float64(Float64(y * b) / Float64(x + y))); elseif (t <= 1050000000000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = 1.0 / (((x + (y + t)) / y) / (a + (z - b))); t_2 = t * ((a + (x * (z / t))) / (x + t)); tmp = 0.0; if (t <= -1e+24) tmp = t_2; elseif (t <= -1.12e-268) tmp = t_1; elseif (t <= 3.9e-275) tmp = z - ((y * b) / (x + y)); elseif (t <= 1050000000000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 / N[(N[(N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] / N[(a + N[(z - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(N[(a + N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1e+24], t$95$2, If[LessEqual[t, -1.12e-268], t$95$1, If[LessEqual[t, 3.9e-275], N[(z - N[(N[(y * b), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1050000000000.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{1}{\frac{\frac{x + \left(y + t\right)}{y}}{a + \left(z - b\right)}}\\
t_2 := t \cdot \frac{a + x \cdot \frac{z}{t}}{x + t}\\
\mathbf{if}\;t \leq -1 \cdot 10^{+24}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -1.12 \cdot 10^{-268}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 3.9 \cdot 10^{-275}:\\
\;\;\;\;z - \frac{y \cdot b}{x + y}\\
\mathbf{elif}\;t \leq 1050000000000:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -9.9999999999999998e23 or 1.05e12 < t Initial program 54.8%
Taylor expanded in t around inf 54.6%
associate-/l*54.8%
associate-/l*54.0%
+-commutative54.0%
Simplified54.0%
Taylor expanded in y around 0 42.3%
associate-/l*56.4%
associate-/l*63.6%
Simplified63.6%
if -9.9999999999999998e23 < t < -1.11999999999999998e-268 or 3.89999999999999973e-275 < t < 1.05e12Initial program 68.5%
Taylor expanded in y around inf 44.4%
clear-num44.3%
inv-pow44.3%
+-commutative44.3%
+-commutative44.3%
associate--l+44.3%
Applied egg-rr44.3%
unpow-144.3%
associate-+r-44.3%
associate-/r*69.0%
associate-+r+69.0%
+-commutative69.0%
+-commutative69.0%
+-commutative69.0%
associate-+r-69.0%
Simplified69.0%
if -1.11999999999999998e-268 < t < 3.89999999999999973e-275Initial program 78.7%
Taylor expanded in a around inf 46.3%
associate--l+46.3%
+-commutative46.3%
+-commutative46.3%
times-frac57.0%
+-commutative57.0%
+-commutative57.0%
associate-/l*57.2%
+-commutative57.2%
Simplified57.2%
Taylor expanded in t around 0 57.0%
+-commutative57.0%
associate-/l*57.2%
associate-/r*52.0%
+-commutative52.0%
Simplified52.0%
Taylor expanded in a around 0 89.3%
+-commutative89.3%
Simplified89.3%
Final simplification67.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (* t (/ (+ a (* x (/ z t))) (+ x t)))))
(if (<= t -2.1e+26)
t_2
(if (<= t -6e-287)
t_1
(if (<= t 2.15e-291)
(- z (/ (* y b) (+ x y)))
(if (<= t 2.25e+14) 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 = t * ((a + (x * (z / t))) / (x + t));
double tmp;
if (t <= -2.1e+26) {
tmp = t_2;
} else if (t <= -6e-287) {
tmp = t_1;
} else if (t <= 2.15e-291) {
tmp = z - ((y * b) / (x + y));
} else if (t <= 2.25e+14) {
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 = t * ((a + (x * (z / t))) / (x + t))
if (t <= (-2.1d+26)) then
tmp = t_2
else if (t <= (-6d-287)) then
tmp = t_1
else if (t <= 2.15d-291) then
tmp = z - ((y * b) / (x + y))
else if (t <= 2.25d+14) 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 = t * ((a + (x * (z / t))) / (x + t));
double tmp;
if (t <= -2.1e+26) {
tmp = t_2;
} else if (t <= -6e-287) {
tmp = t_1;
} else if (t <= 2.15e-291) {
tmp = z - ((y * b) / (x + y));
} else if (t <= 2.25e+14) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = t * ((a + (x * (z / t))) / (x + t)) tmp = 0 if t <= -2.1e+26: tmp = t_2 elif t <= -6e-287: tmp = t_1 elif t <= 2.15e-291: tmp = z - ((y * b) / (x + y)) elif t <= 2.25e+14: 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(t * Float64(Float64(a + Float64(x * Float64(z / t))) / Float64(x + t))) tmp = 0.0 if (t <= -2.1e+26) tmp = t_2; elseif (t <= -6e-287) tmp = t_1; elseif (t <= 2.15e-291) tmp = Float64(z - Float64(Float64(y * b) / Float64(x + y))); elseif (t <= 2.25e+14) 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 = t * ((a + (x * (z / t))) / (x + t)); tmp = 0.0; if (t <= -2.1e+26) tmp = t_2; elseif (t <= -6e-287) tmp = t_1; elseif (t <= 2.15e-291) tmp = z - ((y * b) / (x + y)); elseif (t <= 2.25e+14) 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[(t * N[(N[(a + N[(x * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.1e+26], t$95$2, If[LessEqual[t, -6e-287], t$95$1, If[LessEqual[t, 2.15e-291], N[(z - N[(N[(y * b), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.25e+14], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := t \cdot \frac{a + x \cdot \frac{z}{t}}{x + t}\\
\mathbf{if}\;t \leq -2.1 \cdot 10^{+26}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -6 \cdot 10^{-287}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 2.15 \cdot 10^{-291}:\\
\;\;\;\;z - \frac{y \cdot b}{x + y}\\
\mathbf{elif}\;t \leq 2.25 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -2.1000000000000001e26 or 2.25e14 < t Initial program 55.6%
Taylor expanded in t around inf 55.4%
associate-/l*55.6%
associate-/l*54.9%
+-commutative54.9%
Simplified54.9%
Taylor expanded in y around 0 42.9%
associate-/l*56.5%
associate-/l*63.7%
Simplified63.7%
if -2.1000000000000001e26 < t < -5.99999999999999984e-287 or 2.15000000000000018e-291 < t < 2.25e14Initial program 68.2%
Taylor expanded in y around inf 63.9%
if -5.99999999999999984e-287 < t < 2.15000000000000018e-291Initial program 76.1%
Taylor expanded in a around inf 35.7%
associate--l+35.7%
+-commutative35.7%
+-commutative35.7%
times-frac51.8%
+-commutative51.8%
+-commutative51.8%
associate-/l*52.0%
+-commutative52.0%
Simplified52.0%
Taylor expanded in t around 0 51.8%
+-commutative51.8%
associate-/l*52.0%
associate-/r*52.5%
+-commutative52.5%
Simplified52.5%
Taylor expanded in a around 0 92.1%
+-commutative92.1%
Simplified92.1%
Final simplification65.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (* a (/ (+ y t) (+ y (+ x t))))))
(if (<= a -6.2e+162)
t_2
(if (<= a -0.035)
t_1
(if (<= a 1.8e-255)
(- z (/ (* y b) (+ x y)))
(if (<= a 2.5e+83) 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 + t) / (y + (x + t)));
double tmp;
if (a <= -6.2e+162) {
tmp = t_2;
} else if (a <= -0.035) {
tmp = t_1;
} else if (a <= 1.8e-255) {
tmp = z - ((y * b) / (x + y));
} else if (a <= 2.5e+83) {
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 + t) / (y + (x + t)))
if (a <= (-6.2d+162)) then
tmp = t_2
else if (a <= (-0.035d0)) then
tmp = t_1
else if (a <= 1.8d-255) then
tmp = z - ((y * b) / (x + y))
else if (a <= 2.5d+83) 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 + t) / (y + (x + t)));
double tmp;
if (a <= -6.2e+162) {
tmp = t_2;
} else if (a <= -0.035) {
tmp = t_1;
} else if (a <= 1.8e-255) {
tmp = z - ((y * b) / (x + y));
} else if (a <= 2.5e+83) {
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 + t) / (y + (x + t))) tmp = 0 if a <= -6.2e+162: tmp = t_2 elif a <= -0.035: tmp = t_1 elif a <= 1.8e-255: tmp = z - ((y * b) / (x + y)) elif a <= 2.5e+83: 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 + t) / Float64(y + Float64(x + t)))) tmp = 0.0 if (a <= -6.2e+162) tmp = t_2; elseif (a <= -0.035) tmp = t_1; elseif (a <= 1.8e-255) tmp = Float64(z - Float64(Float64(y * b) / Float64(x + y))); elseif (a <= 2.5e+83) 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 + t) / (y + (x + t))); tmp = 0.0; if (a <= -6.2e+162) tmp = t_2; elseif (a <= -0.035) tmp = t_1; elseif (a <= 1.8e-255) tmp = z - ((y * b) / (x + y)); elseif (a <= 2.5e+83) 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 + t), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -6.2e+162], t$95$2, If[LessEqual[a, -0.035], t$95$1, If[LessEqual[a, 1.8e-255], N[(z - N[(N[(y * b), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.5e+83], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := a \cdot \frac{y + t}{y + \left(x + t\right)}\\
\mathbf{if}\;a \leq -6.2 \cdot 10^{+162}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -0.035:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{-255}:\\
\;\;\;\;z - \frac{y \cdot b}{x + y}\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{+83}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -6.1999999999999999e162 or 2.50000000000000014e83 < a Initial program 46.9%
Taylor expanded in a around inf 31.6%
associate-/l*75.7%
associate-+r+75.7%
Simplified75.7%
if -6.1999999999999999e162 < a < -0.035000000000000003 or 1.8000000000000001e-255 < a < 2.50000000000000014e83Initial program 64.3%
Taylor expanded in y around inf 64.0%
if -0.035000000000000003 < a < 1.8000000000000001e-255Initial program 77.9%
Taylor expanded in a around inf 58.9%
associate--l+58.9%
+-commutative58.9%
+-commutative58.9%
times-frac60.2%
+-commutative60.2%
+-commutative60.2%
associate-/l*63.1%
+-commutative63.1%
Simplified63.1%
Taylor expanded in t around 0 40.6%
+-commutative40.6%
associate-/l*40.7%
associate-/r*40.1%
+-commutative40.1%
Simplified40.1%
Taylor expanded in a around 0 56.8%
+-commutative56.8%
Simplified56.8%
Final simplification65.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= t -8e+230)
a
(if (<= t -8.5e-289)
t_1
(if (<= t 1.8e-292)
(- z (/ (* y b) (+ x y)))
(if (<= t 4.8e+106) t_1 a))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (t <= -8e+230) {
tmp = a;
} else if (t <= -8.5e-289) {
tmp = t_1;
} else if (t <= 1.8e-292) {
tmp = z - ((y * b) / (x + y));
} else if (t <= 4.8e+106) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (t <= (-8d+230)) then
tmp = a
else if (t <= (-8.5d-289)) then
tmp = t_1
else if (t <= 1.8d-292) then
tmp = z - ((y * b) / (x + y))
else if (t <= 4.8d+106) then
tmp = t_1
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 t_1 = (z + a) - b;
double tmp;
if (t <= -8e+230) {
tmp = a;
} else if (t <= -8.5e-289) {
tmp = t_1;
} else if (t <= 1.8e-292) {
tmp = z - ((y * b) / (x + y));
} else if (t <= 4.8e+106) {
tmp = t_1;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if t <= -8e+230: tmp = a elif t <= -8.5e-289: tmp = t_1 elif t <= 1.8e-292: tmp = z - ((y * b) / (x + y)) elif t <= 4.8e+106: tmp = t_1 else: tmp = a return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (t <= -8e+230) tmp = a; elseif (t <= -8.5e-289) tmp = t_1; elseif (t <= 1.8e-292) tmp = Float64(z - Float64(Float64(y * b) / Float64(x + y))); elseif (t <= 4.8e+106) tmp = t_1; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (t <= -8e+230) tmp = a; elseif (t <= -8.5e-289) tmp = t_1; elseif (t <= 1.8e-292) tmp = z - ((y * b) / (x + y)); elseif (t <= 4.8e+106) tmp = t_1; else tmp = a; 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[t, -8e+230], a, If[LessEqual[t, -8.5e-289], t$95$1, If[LessEqual[t, 1.8e-292], N[(z - N[(N[(y * b), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.8e+106], t$95$1, a]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;t \leq -8 \cdot 10^{+230}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq -8.5 \cdot 10^{-289}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{-292}:\\
\;\;\;\;z - \frac{y \cdot b}{x + y}\\
\mathbf{elif}\;t \leq 4.8 \cdot 10^{+106}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -8.0000000000000008e230 or 4.8000000000000001e106 < t Initial program 52.4%
Taylor expanded in t around inf 63.3%
if -8.0000000000000008e230 < t < -8.49999999999999931e-289 or 1.8000000000000001e-292 < t < 4.8000000000000001e106Initial program 65.1%
Taylor expanded in y around inf 59.8%
if -8.49999999999999931e-289 < t < 1.8000000000000001e-292Initial program 76.1%
Taylor expanded in a around inf 35.7%
associate--l+35.7%
+-commutative35.7%
+-commutative35.7%
times-frac51.8%
+-commutative51.8%
+-commutative51.8%
associate-/l*52.0%
+-commutative52.0%
Simplified52.0%
Taylor expanded in t around 0 51.8%
+-commutative51.8%
associate-/l*52.0%
associate-/r*52.5%
+-commutative52.5%
Simplified52.5%
Taylor expanded in a around 0 92.1%
+-commutative92.1%
Simplified92.1%
Final simplification62.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.35e-72) (not (<= y 3.2e-24))) (- (+ z a) b) (/ (+ (* t a) (* x z)) (+ x t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.35e-72) || !(y <= 3.2e-24)) {
tmp = (z + a) - b;
} else {
tmp = ((t * a) + (x * z)) / (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.35d-72)) .or. (.not. (y <= 3.2d-24))) then
tmp = (z + a) - b
else
tmp = ((t * a) + (x * z)) / (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.35e-72) || !(y <= 3.2e-24)) {
tmp = (z + a) - b;
} else {
tmp = ((t * a) + (x * z)) / (x + t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.35e-72) or not (y <= 3.2e-24): tmp = (z + a) - b else: tmp = ((t * a) + (x * z)) / (x + t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.35e-72) || !(y <= 3.2e-24)) tmp = Float64(Float64(z + a) - b); else tmp = Float64(Float64(Float64(t * a) + Float64(x * z)) / Float64(x + t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.35e-72) || ~((y <= 3.2e-24))) tmp = (z + a) - b; else tmp = ((t * a) + (x * z)) / (x + t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.35e-72], N[Not[LessEqual[y, 3.2e-24]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.35 \cdot 10^{-72} \lor \neg \left(y \leq 3.2 \cdot 10^{-24}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot a + x \cdot z}{x + t}\\
\end{array}
\end{array}
if y < -1.35e-72 or 3.20000000000000012e-24 < y Initial program 51.3%
Taylor expanded in y around inf 67.2%
if -1.35e-72 < y < 3.20000000000000012e-24Initial program 77.4%
Taylor expanded in y around 0 57.5%
Final simplification62.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -9e+155) (not (<= b 6.5e+143))) (* b (/ y (- (- y) (+ x t)))) (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -9e+155) || !(b <= 6.5e+143)) {
tmp = b * (y / (-y - (x + t)));
} else {
tmp = (z + a) - b;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-9d+155)) .or. (.not. (b <= 6.5d+143))) then
tmp = b * (y / (-y - (x + t)))
else
tmp = (z + a) - b
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -9e+155) || !(b <= 6.5e+143)) {
tmp = b * (y / (-y - (x + t)));
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -9e+155) or not (b <= 6.5e+143): tmp = b * (y / (-y - (x + t))) else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -9e+155) || !(b <= 6.5e+143)) tmp = Float64(b * Float64(y / Float64(Float64(-y) - Float64(x + t)))); else tmp = Float64(Float64(z + a) - b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -9e+155) || ~((b <= 6.5e+143))) tmp = b * (y / (-y - (x + t))); else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -9e+155], N[Not[LessEqual[b, 6.5e+143]], $MachinePrecision]], N[(b * N[(y / N[((-y) - N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -9 \cdot 10^{+155} \lor \neg \left(b \leq 6.5 \cdot 10^{+143}\right):\\
\;\;\;\;b \cdot \frac{y}{\left(-y\right) - \left(x + t\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if b < -8.99999999999999947e155 or 6.4999999999999997e143 < b Initial program 61.4%
Taylor expanded in b around inf 34.2%
mul-1-neg34.2%
associate-/l*55.5%
distribute-rgt-neg-in55.5%
mul-1-neg55.5%
associate-*r/55.5%
neg-mul-155.5%
associate-+r+55.5%
Simplified55.5%
if -8.99999999999999947e155 < b < 6.4999999999999997e143Initial program 63.4%
Taylor expanded in y around inf 63.4%
Final simplification61.1%
(FPCore (x y z t a b) :precision binary64 (if (<= t -7.6e+230) a (if (<= t 1e+109) (- (+ z a) b) a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -7.6e+230) {
tmp = a;
} else if (t <= 1e+109) {
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 <= (-7.6d+230)) then
tmp = a
else if (t <= 1d+109) 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 <= -7.6e+230) {
tmp = a;
} else if (t <= 1e+109) {
tmp = (z + a) - b;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -7.6e+230: tmp = a elif t <= 1e+109: tmp = (z + a) - b else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -7.6e+230) tmp = a; elseif (t <= 1e+109) 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 <= -7.6e+230) tmp = a; elseif (t <= 1e+109) tmp = (z + a) - b; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7.6e+230], a, If[LessEqual[t, 1e+109], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.6 \cdot 10^{+230}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq 10^{+109}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -7.6e230 or 9.99999999999999982e108 < t Initial program 52.4%
Taylor expanded in t around inf 63.3%
if -7.6e230 < t < 9.99999999999999982e108Initial program 65.7%
Taylor expanded in y around inf 59.3%
Final simplification60.2%
(FPCore (x y z t a b) :precision binary64 (if (<= a -8.6e+148) a (if (<= a 5.2e+40) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -8.6e+148) {
tmp = a;
} else if (a <= 5.2e+40) {
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 <= (-8.6d+148)) then
tmp = a
else if (a <= 5.2d+40) 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 <= -8.6e+148) {
tmp = a;
} else if (a <= 5.2e+40) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -8.6e+148: tmp = a elif a <= 5.2e+40: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -8.6e+148) tmp = a; elseif (a <= 5.2e+40) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -8.6e+148) tmp = a; elseif (a <= 5.2e+40) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -8.6e+148], a, If[LessEqual[a, 5.2e+40], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.6 \cdot 10^{+148}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 5.2 \cdot 10^{+40}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -8.6000000000000003e148 or 5.2000000000000001e40 < a Initial program 46.8%
Taylor expanded in t around inf 52.2%
if -8.6000000000000003e148 < a < 5.2000000000000001e40Initial program 70.6%
Taylor expanded in x around inf 42.4%
Final simplification45.6%
(FPCore (x y z t a b) :precision binary64 a)
double code(double x, double y, double z, double t, double a, double b) {
return a;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return a;
}
def code(x, y, z, t, a, b): return a
function code(x, y, z, t, a, b) return a end
function tmp = code(x, y, z, t, a, b) tmp = a; end
code[x_, y_, z_, t_, a_, b_] := a
\begin{array}{l}
\\
a
\end{array}
Initial program 62.8%
Taylor expanded in t around inf 30.3%
Final simplification30.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 2024072
(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)))