
(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 19 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 (+ (+ x t) y)) (t_2 (/ y t_1))) (+ (* z (+ (/ x t_1) t_2)) (- (/ a (/ t_1 (+ t y))) (* 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 / t_1;
return (z * ((x / t_1) + t_2)) + ((a / (t_1 / (t + y))) - (b * t_2));
}
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
t_1 = (x + t) + y
t_2 = y / t_1
code = (z * ((x / t_1) + t_2)) + ((a / (t_1 / (t + y))) - (b * t_2))
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 = y / t_1;
return (z * ((x / t_1) + t_2)) + ((a / (t_1 / (t + y))) - (b * t_2));
}
def code(x, y, z, t, a, b): t_1 = (x + t) + y t_2 = y / t_1 return (z * ((x / t_1) + t_2)) + ((a / (t_1 / (t + y))) - (b * t_2))
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + t) + y) t_2 = Float64(y / t_1) return Float64(Float64(z * Float64(Float64(x / t_1) + t_2)) + Float64(Float64(a / Float64(t_1 / Float64(t + y))) - Float64(b * t_2))) end
function tmp = code(x, y, z, t, a, b) t_1 = (x + t) + y; t_2 = y / t_1; tmp = (z * ((x / t_1) + t_2)) + ((a / (t_1 / (t + y))) - (b * t_2)); end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(y / t$95$1), $MachinePrecision]}, N[(N[(z * N[(N[(x / t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(a / N[(t$95$1 / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \frac{y}{t_1}\\
z \cdot \left(\frac{x}{t_1} + t_2\right) + \left(\frac{a}{\frac{t_1}{t + y}} - b \cdot t_2\right)
\end{array}
\end{array}
Initial program 61.6%
Taylor expanded in z around 0 70.9%
associate--l+70.9%
associate-+r+70.9%
associate-+r+70.9%
+-commutative70.9%
+-commutative70.9%
associate-+r+70.9%
*-commutative70.9%
+-commutative70.9%
associate-+r+70.9%
div-sub70.9%
Simplified70.9%
div-sub70.9%
associate-/l*87.9%
+-commutative87.9%
add-sqr-sqrt51.6%
sqrt-unprod73.6%
sqr-neg73.6%
*-commutative73.6%
distribute-lft-neg-out73.6%
*-commutative73.6%
distribute-lft-neg-out73.6%
sqrt-unprod43.0%
add-sqr-sqrt78.3%
div-inv78.3%
associate-*l*83.0%
Applied egg-rr99.7%
Final simplification99.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (+ t y)))
(t_2 (+ (+ x t) y))
(t_3 (/ (- (+ (* z (+ x y)) t_1) (* y b)) t_2))
(t_4 (/ y t_2))
(t_5 (- (/ a (/ t_2 (+ t y))) (* b t_4))))
(if (<= t_3 -1e+290)
(+ t_5 (/ y (/ (+ t y) z)))
(if (<= t_3 1e+262)
(+ (* z (+ (/ x t_2) t_4)) (/ (- t_1 (* y b)) t_2))
(+ z t_5)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + y);
double t_2 = (x + t) + y;
double t_3 = (((z * (x + y)) + t_1) - (y * b)) / t_2;
double t_4 = y / t_2;
double t_5 = (a / (t_2 / (t + y))) - (b * t_4);
double tmp;
if (t_3 <= -1e+290) {
tmp = t_5 + (y / ((t + y) / z));
} else if (t_3 <= 1e+262) {
tmp = (z * ((x / t_2) + t_4)) + ((t_1 - (y * b)) / t_2);
} else {
tmp = z + t_5;
}
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) :: t_5
real(8) :: tmp
t_1 = a * (t + y)
t_2 = (x + t) + y
t_3 = (((z * (x + y)) + t_1) - (y * b)) / t_2
t_4 = y / t_2
t_5 = (a / (t_2 / (t + y))) - (b * t_4)
if (t_3 <= (-1d+290)) then
tmp = t_5 + (y / ((t + y) / z))
else if (t_3 <= 1d+262) then
tmp = (z * ((x / t_2) + t_4)) + ((t_1 - (y * b)) / t_2)
else
tmp = z + t_5
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (t + y);
double t_2 = (x + t) + y;
double t_3 = (((z * (x + y)) + t_1) - (y * b)) / t_2;
double t_4 = y / t_2;
double t_5 = (a / (t_2 / (t + y))) - (b * t_4);
double tmp;
if (t_3 <= -1e+290) {
tmp = t_5 + (y / ((t + y) / z));
} else if (t_3 <= 1e+262) {
tmp = (z * ((x / t_2) + t_4)) + ((t_1 - (y * b)) / t_2);
} else {
tmp = z + t_5;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (t + y) t_2 = (x + t) + y t_3 = (((z * (x + y)) + t_1) - (y * b)) / t_2 t_4 = y / t_2 t_5 = (a / (t_2 / (t + y))) - (b * t_4) tmp = 0 if t_3 <= -1e+290: tmp = t_5 + (y / ((t + y) / z)) elif t_3 <= 1e+262: tmp = (z * ((x / t_2) + t_4)) + ((t_1 - (y * b)) / t_2) else: tmp = z + t_5 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(t + y)) t_2 = Float64(Float64(x + t) + y) t_3 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + t_1) - Float64(y * b)) / t_2) t_4 = Float64(y / t_2) t_5 = Float64(Float64(a / Float64(t_2 / Float64(t + y))) - Float64(b * t_4)) tmp = 0.0 if (t_3 <= -1e+290) tmp = Float64(t_5 + Float64(y / Float64(Float64(t + y) / z))); elseif (t_3 <= 1e+262) tmp = Float64(Float64(z * Float64(Float64(x / t_2) + t_4)) + Float64(Float64(t_1 - Float64(y * b)) / t_2)); else tmp = Float64(z + t_5); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (t + y); t_2 = (x + t) + y; t_3 = (((z * (x + y)) + t_1) - (y * b)) / t_2; t_4 = y / t_2; t_5 = (a / (t_2 / (t + y))) - (b * t_4); tmp = 0.0; if (t_3 <= -1e+290) tmp = t_5 + (y / ((t + y) / z)); elseif (t_3 <= 1e+262) tmp = (z * ((x / t_2) + t_4)) + ((t_1 - (y * b)) / t_2); else tmp = z + t_5; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]}, Block[{t$95$4 = N[(y / t$95$2), $MachinePrecision]}, Block[{t$95$5 = N[(N[(a / N[(t$95$2 / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * t$95$4), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e+290], N[(t$95$5 + N[(y / N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 1e+262], N[(N[(z * N[(N[(x / t$95$2), $MachinePrecision] + t$95$4), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$1 - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], N[(z + t$95$5), $MachinePrecision]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(t + y\right)\\
t_2 := \left(x + t\right) + y\\
t_3 := \frac{\left(z \cdot \left(x + y\right) + t_1\right) - y \cdot b}{t_2}\\
t_4 := \frac{y}{t_2}\\
t_5 := \frac{a}{\frac{t_2}{t + y}} - b \cdot t_4\\
\mathbf{if}\;t_3 \leq -1 \cdot 10^{+290}:\\
\;\;\;\;t_5 + \frac{y}{\frac{t + y}{z}}\\
\mathbf{elif}\;t_3 \leq 10^{+262}:\\
\;\;\;\;z \cdot \left(\frac{x}{t_2} + t_4\right) + \frac{t_1 - y \cdot b}{t_2}\\
\mathbf{else}:\\
\;\;\;\;z + t_5\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -1.00000000000000006e290Initial program 7.7%
Taylor expanded in z around 0 31.8%
associate--l+31.8%
associate-+r+31.8%
associate-+r+31.8%
+-commutative31.8%
+-commutative31.8%
associate-+r+31.8%
*-commutative31.8%
+-commutative31.8%
associate-+r+31.8%
div-sub31.8%
Simplified31.8%
div-sub31.8%
associate-/l*80.3%
+-commutative80.3%
add-sqr-sqrt53.8%
sqrt-unprod61.4%
sqr-neg61.4%
*-commutative61.4%
distribute-lft-neg-out61.4%
*-commutative61.4%
distribute-lft-neg-out61.4%
sqrt-unprod30.3%
add-sqr-sqrt76.7%
div-inv76.7%
associate-*l*83.7%
Applied egg-rr99.9%
Taylor expanded in x around 0 71.3%
associate-/l*93.2%
+-commutative93.2%
Simplified93.2%
if -1.00000000000000006e290 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1e262Initial program 99.7%
Taylor expanded in z around 0 99.8%
associate--l+99.8%
associate-+r+99.8%
associate-+r+99.8%
+-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
*-commutative99.8%
+-commutative99.8%
associate-+r+99.8%
div-sub99.8%
Simplified99.8%
if 1e262 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 6.1%
Taylor expanded in z around 0 27.9%
associate--l+27.9%
associate-+r+27.9%
associate-+r+27.9%
+-commutative27.9%
+-commutative27.9%
associate-+r+27.9%
*-commutative27.9%
+-commutative27.9%
associate-+r+27.9%
div-sub27.9%
Simplified27.9%
div-sub27.9%
associate-/l*64.3%
+-commutative64.3%
add-sqr-sqrt28.2%
sqrt-unprod54.6%
sqr-neg54.6%
*-commutative54.6%
distribute-lft-neg-out54.6%
*-commutative54.6%
distribute-lft-neg-out54.6%
sqrt-unprod40.5%
add-sqr-sqrt63.7%
div-inv63.7%
associate-*l*78.2%
Applied egg-rr99.9%
Taylor expanded in x around inf 91.9%
Final simplification96.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x t) y))
(t_2 (/ (- (+ (* z (+ x y)) (* a (+ t y))) (* y b)) t_1)))
(if (or (<= t_2 -1e+290) (not (<= t_2 1e+262)))
(+ z (- (/ a (/ t_1 (+ t y))) (* b (/ y t_1))))
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 = (((z * (x + y)) + (a * (t + y))) - (y * b)) / t_1;
double tmp;
if ((t_2 <= -1e+290) || !(t_2 <= 1e+262)) {
tmp = z + ((a / (t_1 / (t + y))) - (b * (y / 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 = (x + t) + y
t_2 = (((z * (x + y)) + (a * (t + y))) - (y * b)) / t_1
if ((t_2 <= (-1d+290)) .or. (.not. (t_2 <= 1d+262))) then
tmp = z + ((a / (t_1 / (t + y))) - (b * (y / 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 = (x + t) + y;
double t_2 = (((z * (x + y)) + (a * (t + y))) - (y * b)) / t_1;
double tmp;
if ((t_2 <= -1e+290) || !(t_2 <= 1e+262)) {
tmp = z + ((a / (t_1 / (t + y))) - (b * (y / t_1)));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + t) + y t_2 = (((z * (x + y)) + (a * (t + y))) - (y * b)) / t_1 tmp = 0 if (t_2 <= -1e+290) or not (t_2 <= 1e+262): tmp = z + ((a / (t_1 / (t + y))) - (b * (y / t_1))) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + t) + y) t_2 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + Float64(a * Float64(t + y))) - Float64(y * b)) / t_1) tmp = 0.0 if ((t_2 <= -1e+290) || !(t_2 <= 1e+262)) tmp = Float64(z + Float64(Float64(a / Float64(t_1 / Float64(t + y))) - Float64(b * Float64(y / t_1)))); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + t) + y; t_2 = (((z * (x + y)) + (a * (t + y))) - (y * b)) / t_1; tmp = 0.0; if ((t_2 <= -1e+290) || ~((t_2 <= 1e+262))) tmp = z + ((a / (t_1 / (t + y))) - (b * (y / t_1))); else tmp = t_2; 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[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$2, -1e+290], N[Not[LessEqual[t$95$2, 1e+262]], $MachinePrecision]], N[(z + N[(N[(a / N[(t$95$1 / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \frac{\left(z \cdot \left(x + y\right) + a \cdot \left(t + y\right)\right) - y \cdot b}{t_1}\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{+290} \lor \neg \left(t_2 \leq 10^{+262}\right):\\
\;\;\;\;z + \left(\frac{a}{\frac{t_1}{t + y}} - b \cdot \frac{y}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -1.00000000000000006e290 or 1e262 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 6.8%
Taylor expanded in z around 0 29.5%
associate--l+29.5%
associate-+r+29.5%
associate-+r+29.5%
+-commutative29.5%
+-commutative29.5%
associate-+r+29.5%
*-commutative29.5%
+-commutative29.5%
associate-+r+29.5%
div-sub29.5%
Simplified29.5%
div-sub29.5%
associate-/l*70.9%
+-commutative70.9%
add-sqr-sqrt38.7%
sqrt-unprod57.4%
sqr-neg57.4%
*-commutative57.4%
distribute-lft-neg-out57.4%
*-commutative57.4%
distribute-lft-neg-out57.4%
sqrt-unprod36.3%
add-sqr-sqrt69.0%
div-inv69.0%
associate-*l*80.4%
Applied egg-rr99.9%
Taylor expanded in x around inf 90.6%
if -1.00000000000000006e290 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1e262Initial program 99.7%
Final simplification96.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x t) y))
(t_2 (/ (- (+ (* z (+ x y)) (* a (+ t y))) (* y b)) t_1))
(t_3 (- (/ a (/ t_1 (+ t y))) (* b (/ y t_1)))))
(if (<= t_2 -1e+290)
(+ t_3 (/ y (/ (+ t y) z)))
(if (<= t_2 1e+262) t_2 (+ z t_3)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((z * (x + y)) + (a * (t + y))) - (y * b)) / t_1;
double t_3 = (a / (t_1 / (t + y))) - (b * (y / t_1));
double tmp;
if (t_2 <= -1e+290) {
tmp = t_3 + (y / ((t + y) / z));
} else if (t_2 <= 1e+262) {
tmp = t_2;
} else {
tmp = z + 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 = (x + t) + y
t_2 = (((z * (x + y)) + (a * (t + y))) - (y * b)) / t_1
t_3 = (a / (t_1 / (t + y))) - (b * (y / t_1))
if (t_2 <= (-1d+290)) then
tmp = t_3 + (y / ((t + y) / z))
else if (t_2 <= 1d+262) then
tmp = t_2
else
tmp = z + 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 = (x + t) + y;
double t_2 = (((z * (x + y)) + (a * (t + y))) - (y * b)) / t_1;
double t_3 = (a / (t_1 / (t + y))) - (b * (y / t_1));
double tmp;
if (t_2 <= -1e+290) {
tmp = t_3 + (y / ((t + y) / z));
} else if (t_2 <= 1e+262) {
tmp = t_2;
} else {
tmp = z + t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + t) + y t_2 = (((z * (x + y)) + (a * (t + y))) - (y * b)) / t_1 t_3 = (a / (t_1 / (t + y))) - (b * (y / t_1)) tmp = 0 if t_2 <= -1e+290: tmp = t_3 + (y / ((t + y) / z)) elif t_2 <= 1e+262: tmp = t_2 else: tmp = z + t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + t) + y) t_2 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + Float64(a * Float64(t + y))) - Float64(y * b)) / t_1) t_3 = Float64(Float64(a / Float64(t_1 / Float64(t + y))) - Float64(b * Float64(y / t_1))) tmp = 0.0 if (t_2 <= -1e+290) tmp = Float64(t_3 + Float64(y / Float64(Float64(t + y) / z))); elseif (t_2 <= 1e+262) tmp = t_2; else tmp = Float64(z + t_3); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + t) + y; t_2 = (((z * (x + y)) + (a * (t + y))) - (y * b)) / t_1; t_3 = (a / (t_1 / (t + y))) - (b * (y / t_1)); tmp = 0.0; if (t_2 <= -1e+290) tmp = t_3 + (y / ((t + y) / z)); elseif (t_2 <= 1e+262) tmp = t_2; else tmp = z + t_3; 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[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(a / N[(t$95$1 / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+290], N[(t$95$3 + N[(y / N[(N[(t + y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+262], t$95$2, N[(z + t$95$3), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \frac{\left(z \cdot \left(x + y\right) + a \cdot \left(t + y\right)\right) - y \cdot b}{t_1}\\
t_3 := \frac{a}{\frac{t_1}{t + y}} - b \cdot \frac{y}{t_1}\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{+290}:\\
\;\;\;\;t_3 + \frac{y}{\frac{t + y}{z}}\\
\mathbf{elif}\;t_2 \leq 10^{+262}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;z + t_3\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -1.00000000000000006e290Initial program 7.7%
Taylor expanded in z around 0 31.8%
associate--l+31.8%
associate-+r+31.8%
associate-+r+31.8%
+-commutative31.8%
+-commutative31.8%
associate-+r+31.8%
*-commutative31.8%
+-commutative31.8%
associate-+r+31.8%
div-sub31.8%
Simplified31.8%
div-sub31.8%
associate-/l*80.3%
+-commutative80.3%
add-sqr-sqrt53.8%
sqrt-unprod61.4%
sqr-neg61.4%
*-commutative61.4%
distribute-lft-neg-out61.4%
*-commutative61.4%
distribute-lft-neg-out61.4%
sqrt-unprod30.3%
add-sqr-sqrt76.7%
div-inv76.7%
associate-*l*83.7%
Applied egg-rr99.9%
Taylor expanded in x around 0 71.3%
associate-/l*93.2%
+-commutative93.2%
Simplified93.2%
if -1.00000000000000006e290 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1e262Initial program 99.7%
if 1e262 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 6.1%
Taylor expanded in z around 0 27.9%
associate--l+27.9%
associate-+r+27.9%
associate-+r+27.9%
+-commutative27.9%
+-commutative27.9%
associate-+r+27.9%
*-commutative27.9%
+-commutative27.9%
associate-+r+27.9%
div-sub27.9%
Simplified27.9%
div-sub27.9%
associate-/l*64.3%
+-commutative64.3%
add-sqr-sqrt28.2%
sqrt-unprod54.6%
sqr-neg54.6%
*-commutative54.6%
distribute-lft-neg-out54.6%
*-commutative54.6%
distribute-lft-neg-out54.6%
sqrt-unprod40.5%
add-sqr-sqrt63.7%
div-inv63.7%
associate-*l*78.2%
Applied egg-rr99.9%
Taylor expanded in x around inf 91.9%
Final simplification96.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x t) y))
(t_2 (/ (- (+ (* z (+ x y)) (* a (+ t y))) (* y b)) t_1))
(t_3 (/ y t_1)))
(if (<= t_2 (- INFINITY))
(+ (* z (+ (/ x t_1) t_3)) a)
(if (<= t_2 1e+262) t_2 (+ z (- (/ a (+ 1.0 (/ x y))) (* b t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((z * (x + y)) + (a * (t + y))) - (y * b)) / t_1;
double t_3 = y / t_1;
double tmp;
if (t_2 <= -((double) INFINITY)) {
tmp = (z * ((x / t_1) + t_3)) + a;
} else if (t_2 <= 1e+262) {
tmp = t_2;
} else {
tmp = z + ((a / (1.0 + (x / y))) - (b * t_3));
}
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 = (((z * (x + y)) + (a * (t + y))) - (y * b)) / t_1;
double t_3 = y / t_1;
double tmp;
if (t_2 <= -Double.POSITIVE_INFINITY) {
tmp = (z * ((x / t_1) + t_3)) + a;
} else if (t_2 <= 1e+262) {
tmp = t_2;
} else {
tmp = z + ((a / (1.0 + (x / y))) - (b * t_3));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + t) + y t_2 = (((z * (x + y)) + (a * (t + y))) - (y * b)) / t_1 t_3 = y / t_1 tmp = 0 if t_2 <= -math.inf: tmp = (z * ((x / t_1) + t_3)) + a elif t_2 <= 1e+262: tmp = t_2 else: tmp = z + ((a / (1.0 + (x / y))) - (b * t_3)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + t) + y) t_2 = Float64(Float64(Float64(Float64(z * Float64(x + y)) + Float64(a * Float64(t + y))) - Float64(y * b)) / t_1) t_3 = Float64(y / t_1) tmp = 0.0 if (t_2 <= Float64(-Inf)) tmp = Float64(Float64(z * Float64(Float64(x / t_1) + t_3)) + a); elseif (t_2 <= 1e+262) tmp = t_2; else tmp = Float64(z + Float64(Float64(a / Float64(1.0 + Float64(x / y))) - Float64(b * t_3))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + t) + y; t_2 = (((z * (x + y)) + (a * (t + y))) - (y * b)) / t_1; t_3 = y / t_1; tmp = 0.0; if (t_2 <= -Inf) tmp = (z * ((x / t_1) + t_3)) + a; elseif (t_2 <= 1e+262) tmp = t_2; else tmp = z + ((a / (1.0 + (x / y))) - (b * t_3)); 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[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(a * N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(y / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(N[(z * N[(N[(x / t$95$1), $MachinePrecision] + t$95$3), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], If[LessEqual[t$95$2, 1e+262], t$95$2, N[(z + N[(N[(a / N[(1.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * t$95$3), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \frac{\left(z \cdot \left(x + y\right) + a \cdot \left(t + y\right)\right) - y \cdot b}{t_1}\\
t_3 := \frac{y}{t_1}\\
\mathbf{if}\;t_2 \leq -\infty:\\
\;\;\;\;z \cdot \left(\frac{x}{t_1} + t_3\right) + a\\
\mathbf{elif}\;t_2 \leq 10^{+262}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;z + \left(\frac{a}{1 + \frac{x}{y}} - b \cdot t_3\right)\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0Initial program 5.6%
Taylor expanded in z around 0 30.2%
associate--l+30.2%
associate-+r+30.2%
associate-+r+30.2%
+-commutative30.2%
+-commutative30.2%
associate-+r+30.2%
*-commutative30.2%
+-commutative30.2%
associate-+r+30.2%
div-sub30.2%
Simplified30.2%
Taylor expanded in t around inf 74.1%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1e262Initial program 99.7%
if 1e262 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 6.1%
Taylor expanded in z around 0 27.9%
associate--l+27.9%
associate-+r+27.9%
associate-+r+27.9%
+-commutative27.9%
+-commutative27.9%
associate-+r+27.9%
*-commutative27.9%
+-commutative27.9%
associate-+r+27.9%
div-sub27.9%
Simplified27.9%
div-sub27.9%
associate-/l*64.3%
+-commutative64.3%
add-sqr-sqrt28.2%
sqrt-unprod54.6%
sqr-neg54.6%
*-commutative54.6%
distribute-lft-neg-out54.6%
*-commutative54.6%
distribute-lft-neg-out54.6%
sqrt-unprod40.5%
add-sqr-sqrt63.7%
div-inv63.7%
associate-*l*78.2%
Applied egg-rr99.9%
Taylor expanded in x around inf 91.9%
Taylor expanded in y around inf 83.6%
Final simplification91.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x t) y)) (t_2 (/ y t_1)))
(if (or (<= t -3.9e+23) (not (<= t 1.8e+133)))
(+ (* z (+ (/ x t_1) t_2)) a)
(+ z (- (/ a (+ 1.0 (/ x y))) (* 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 / t_1;
double tmp;
if ((t <= -3.9e+23) || !(t <= 1.8e+133)) {
tmp = (z * ((x / t_1) + t_2)) + a;
} else {
tmp = z + ((a / (1.0 + (x / y))) - (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) :: tmp
t_1 = (x + t) + y
t_2 = y / t_1
if ((t <= (-3.9d+23)) .or. (.not. (t <= 1.8d+133))) then
tmp = (z * ((x / t_1) + t_2)) + a
else
tmp = z + ((a / (1.0d0 + (x / y))) - (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 = (x + t) + y;
double t_2 = y / t_1;
double tmp;
if ((t <= -3.9e+23) || !(t <= 1.8e+133)) {
tmp = (z * ((x / t_1) + t_2)) + a;
} else {
tmp = z + ((a / (1.0 + (x / y))) - (b * t_2));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + t) + y t_2 = y / t_1 tmp = 0 if (t <= -3.9e+23) or not (t <= 1.8e+133): tmp = (z * ((x / t_1) + t_2)) + a else: tmp = z + ((a / (1.0 + (x / y))) - (b * t_2)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + t) + y) t_2 = Float64(y / t_1) tmp = 0.0 if ((t <= -3.9e+23) || !(t <= 1.8e+133)) tmp = Float64(Float64(z * Float64(Float64(x / t_1) + t_2)) + a); else tmp = Float64(z + Float64(Float64(a / Float64(1.0 + Float64(x / y))) - Float64(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 / t_1; tmp = 0.0; if ((t <= -3.9e+23) || ~((t <= 1.8e+133))) tmp = (z * ((x / t_1) + t_2)) + a; else tmp = z + ((a / (1.0 + (x / y))) - (b * t_2)); 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[(y / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t, -3.9e+23], N[Not[LessEqual[t, 1.8e+133]], $MachinePrecision]], N[(N[(z * N[(N[(x / t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision]), $MachinePrecision] + a), $MachinePrecision], N[(z + N[(N[(a / N[(1.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \frac{y}{t_1}\\
\mathbf{if}\;t \leq -3.9 \cdot 10^{+23} \lor \neg \left(t \leq 1.8 \cdot 10^{+133}\right):\\
\;\;\;\;z \cdot \left(\frac{x}{t_1} + t_2\right) + a\\
\mathbf{else}:\\
\;\;\;\;z + \left(\frac{a}{1 + \frac{x}{y}} - b \cdot t_2\right)\\
\end{array}
\end{array}
if t < -3.9e23 or 1.79999999999999989e133 < t Initial program 52.0%
Taylor expanded in z around 0 61.7%
associate--l+61.7%
associate-+r+61.7%
associate-+r+61.7%
+-commutative61.7%
+-commutative61.7%
associate-+r+61.7%
*-commutative61.7%
+-commutative61.7%
associate-+r+61.7%
div-sub61.7%
Simplified61.7%
Taylor expanded in t around inf 80.3%
if -3.9e23 < t < 1.79999999999999989e133Initial program 67.7%
Taylor expanded in z around 0 76.9%
associate--l+76.9%
associate-+r+76.9%
associate-+r+76.9%
+-commutative76.9%
+-commutative76.9%
associate-+r+76.9%
*-commutative76.9%
+-commutative76.9%
associate-+r+76.9%
div-sub76.9%
Simplified76.9%
div-sub76.9%
associate-/l*87.6%
+-commutative87.6%
add-sqr-sqrt50.1%
sqrt-unprod70.0%
sqr-neg70.0%
*-commutative70.0%
distribute-lft-neg-out70.0%
*-commutative70.0%
distribute-lft-neg-out70.0%
sqrt-unprod41.7%
add-sqr-sqrt73.3%
div-inv73.3%
associate-*l*76.4%
Applied egg-rr99.6%
Taylor expanded in x around inf 94.1%
Taylor expanded in y around inf 86.9%
Final simplification84.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x t) y)))
(if (<= t -2.6e+134)
(+ a (* x (- (/ z t) (/ a t))))
(if (<= t 5e+135)
(+ z (- (/ a (+ 1.0 (/ x y))) (* b (/ y t_1))))
(/ a (/ t_1 (+ t y)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double tmp;
if (t <= -2.6e+134) {
tmp = a + (x * ((z / t) - (a / t)));
} else if (t <= 5e+135) {
tmp = z + ((a / (1.0 + (x / y))) - (b * (y / t_1)));
} else {
tmp = a / (t_1 / (t + y));
}
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 = (x + t) + y
if (t <= (-2.6d+134)) then
tmp = a + (x * ((z / t) - (a / t)))
else if (t <= 5d+135) then
tmp = z + ((a / (1.0d0 + (x / y))) - (b * (y / t_1)))
else
tmp = a / (t_1 / (t + y))
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 tmp;
if (t <= -2.6e+134) {
tmp = a + (x * ((z / t) - (a / t)));
} else if (t <= 5e+135) {
tmp = z + ((a / (1.0 + (x / y))) - (b * (y / t_1)));
} else {
tmp = a / (t_1 / (t + y));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + t) + y tmp = 0 if t <= -2.6e+134: tmp = a + (x * ((z / t) - (a / t))) elif t <= 5e+135: tmp = z + ((a / (1.0 + (x / y))) - (b * (y / t_1))) else: tmp = a / (t_1 / (t + y)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + t) + y) tmp = 0.0 if (t <= -2.6e+134) tmp = Float64(a + Float64(x * Float64(Float64(z / t) - Float64(a / t)))); elseif (t <= 5e+135) tmp = Float64(z + Float64(Float64(a / Float64(1.0 + Float64(x / y))) - Float64(b * Float64(y / t_1)))); else tmp = Float64(a / Float64(t_1 / Float64(t + y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + t) + y; tmp = 0.0; if (t <= -2.6e+134) tmp = a + (x * ((z / t) - (a / t))); elseif (t <= 5e+135) tmp = z + ((a / (1.0 + (x / y))) - (b * (y / t_1))); else tmp = a / (t_1 / (t + y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, If[LessEqual[t, -2.6e+134], N[(a + N[(x * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+135], N[(z + N[(N[(a / N[(1.0 + N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(b * N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a / N[(t$95$1 / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
\mathbf{if}\;t \leq -2.6 \cdot 10^{+134}:\\
\;\;\;\;a + x \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{elif}\;t \leq 5 \cdot 10^{+135}:\\
\;\;\;\;z + \left(\frac{a}{1 + \frac{x}{y}} - b \cdot \frac{y}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{a}{\frac{t_1}{t + y}}\\
\end{array}
\end{array}
if t < -2.6000000000000002e134Initial program 48.4%
Taylor expanded in y around 0 44.6%
Taylor expanded in x around 0 65.3%
if -2.6000000000000002e134 < t < 5.00000000000000029e135Initial program 67.1%
Taylor expanded in z around 0 76.2%
associate--l+76.2%
associate-+r+76.2%
associate-+r+76.2%
+-commutative76.2%
+-commutative76.2%
associate-+r+76.2%
*-commutative76.2%
+-commutative76.2%
associate-+r+76.2%
div-sub76.2%
Simplified76.2%
div-sub76.2%
associate-/l*88.7%
+-commutative88.7%
add-sqr-sqrt52.0%
sqrt-unprod70.0%
sqr-neg70.0%
*-commutative70.0%
distribute-lft-neg-out70.0%
*-commutative70.0%
distribute-lft-neg-out70.0%
sqrt-unprod41.4%
add-sqr-sqrt75.6%
div-inv75.6%
associate-*l*78.3%
Applied egg-rr99.7%
Taylor expanded in x around inf 92.7%
Taylor expanded in y around inf 83.1%
if 5.00000000000000029e135 < t Initial program 49.3%
Taylor expanded in a around inf 38.3%
+-commutative38.3%
+-commutative38.3%
associate-+r+38.3%
associate-/l*71.0%
associate-+r+71.0%
+-commutative71.0%
associate-+r+71.0%
+-commutative71.0%
Simplified71.0%
Final simplification78.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ z (* a (/ (+ t y) x)))) (t_2 (- (+ z a) b)))
(if (<= x -3.7e+33)
t_1
(if (<= x -4.6e-93)
a
(if (<= x -1.2e-129)
(/ (- b) (/ (+ t y) y))
(if (<= x 1.1e+86)
t_2
(if (<= x 8.2e+152)
(/ z (/ (+ x t) x))
(if (<= x 1.55e+226) t_2 t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z + (a * ((t + y) / x));
double t_2 = (z + a) - b;
double tmp;
if (x <= -3.7e+33) {
tmp = t_1;
} else if (x <= -4.6e-93) {
tmp = a;
} else if (x <= -1.2e-129) {
tmp = -b / ((t + y) / y);
} else if (x <= 1.1e+86) {
tmp = t_2;
} else if (x <= 8.2e+152) {
tmp = z / ((x + t) / x);
} else if (x <= 1.55e+226) {
tmp = t_2;
} 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 = z + (a * ((t + y) / x))
t_2 = (z + a) - b
if (x <= (-3.7d+33)) then
tmp = t_1
else if (x <= (-4.6d-93)) then
tmp = a
else if (x <= (-1.2d-129)) then
tmp = -b / ((t + y) / y)
else if (x <= 1.1d+86) then
tmp = t_2
else if (x <= 8.2d+152) then
tmp = z / ((x + t) / x)
else if (x <= 1.55d+226) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z + (a * ((t + y) / x));
double t_2 = (z + a) - b;
double tmp;
if (x <= -3.7e+33) {
tmp = t_1;
} else if (x <= -4.6e-93) {
tmp = a;
} else if (x <= -1.2e-129) {
tmp = -b / ((t + y) / y);
} else if (x <= 1.1e+86) {
tmp = t_2;
} else if (x <= 8.2e+152) {
tmp = z / ((x + t) / x);
} else if (x <= 1.55e+226) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z + (a * ((t + y) / x)) t_2 = (z + a) - b tmp = 0 if x <= -3.7e+33: tmp = t_1 elif x <= -4.6e-93: tmp = a elif x <= -1.2e-129: tmp = -b / ((t + y) / y) elif x <= 1.1e+86: tmp = t_2 elif x <= 8.2e+152: tmp = z / ((x + t) / x) elif x <= 1.55e+226: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z + Float64(a * Float64(Float64(t + y) / x))) t_2 = Float64(Float64(z + a) - b) tmp = 0.0 if (x <= -3.7e+33) tmp = t_1; elseif (x <= -4.6e-93) tmp = a; elseif (x <= -1.2e-129) tmp = Float64(Float64(-b) / Float64(Float64(t + y) / y)); elseif (x <= 1.1e+86) tmp = t_2; elseif (x <= 8.2e+152) tmp = Float64(z / Float64(Float64(x + t) / x)); elseif (x <= 1.55e+226) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z + (a * ((t + y) / x)); t_2 = (z + a) - b; tmp = 0.0; if (x <= -3.7e+33) tmp = t_1; elseif (x <= -4.6e-93) tmp = a; elseif (x <= -1.2e-129) tmp = -b / ((t + y) / y); elseif (x <= 1.1e+86) tmp = t_2; elseif (x <= 8.2e+152) tmp = z / ((x + t) / x); elseif (x <= 1.55e+226) tmp = t_2; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z + N[(a * N[(N[(t + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[x, -3.7e+33], t$95$1, If[LessEqual[x, -4.6e-93], a, If[LessEqual[x, -1.2e-129], N[((-b) / N[(N[(t + y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.1e+86], t$95$2, If[LessEqual[x, 8.2e+152], N[(z / N[(N[(x + t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.55e+226], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z + a \cdot \frac{t + y}{x}\\
t_2 := \left(z + a\right) - b\\
\mathbf{if}\;x \leq -3.7 \cdot 10^{+33}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -4.6 \cdot 10^{-93}:\\
\;\;\;\;a\\
\mathbf{elif}\;x \leq -1.2 \cdot 10^{-129}:\\
\;\;\;\;\frac{-b}{\frac{t + y}{y}}\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{+86}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 8.2 \cdot 10^{+152}:\\
\;\;\;\;\frac{z}{\frac{x + t}{x}}\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{+226}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if x < -3.6999999999999999e33 or 1.54999999999999988e226 < x Initial program 46.9%
Taylor expanded in x around inf 43.5%
associate--l+43.6%
+-commutative43.6%
associate-/l*49.6%
+-commutative49.6%
associate-/l*49.6%
associate-/l*56.9%
+-commutative56.9%
associate-/l*65.1%
+-commutative65.1%
Simplified65.1%
Taylor expanded in a around inf 60.4%
distribute-lft-in60.4%
associate-*r/55.6%
*-commutative55.6%
associate-*r/60.4%
associate-*r/56.2%
*-commutative56.2%
associate-*r/60.8%
distribute-rgt-in60.8%
associate-*l/51.5%
associate-*r/60.4%
+-commutative60.4%
Simplified60.4%
if -3.6999999999999999e33 < x < -4.5999999999999996e-93Initial program 55.4%
Taylor expanded in t around inf 59.7%
if -4.5999999999999996e-93 < x < -1.19999999999999994e-129Initial program 89.3%
Taylor expanded in b around inf 56.6%
associate-*r*56.6%
mul-1-neg56.6%
Simplified56.6%
Taylor expanded in x around 0 56.6%
associate-/l*66.9%
associate-*r/66.9%
mul-1-neg66.9%
+-commutative66.9%
Simplified66.9%
if -1.19999999999999994e-129 < x < 1.10000000000000002e86 or 8.1999999999999996e152 < x < 1.54999999999999988e226Initial program 67.3%
Taylor expanded in y around inf 63.9%
if 1.10000000000000002e86 < x < 8.1999999999999996e152Initial program 72.7%
Taylor expanded in z around inf 50.5%
+-commutative50.5%
Simplified50.5%
Taylor expanded in y around 0 50.5%
*-commutative50.5%
associate-/l*63.8%
+-commutative63.8%
Simplified63.8%
Final simplification62.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ z (* a (/ (+ t y) x)))))
(if (<= x -9e+40)
t_2
(if (<= x -4e-93)
a
(if (<= x -1.2e-129)
(/ (- b) (/ (+ (+ x t) y) y))
(if (<= x 1.9e+86)
t_1
(if (<= x 6.2e+148)
(/ z (/ (+ x t) x))
(if (<= x 1.7e+226) 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 + (a * ((t + y) / x));
double tmp;
if (x <= -9e+40) {
tmp = t_2;
} else if (x <= -4e-93) {
tmp = a;
} else if (x <= -1.2e-129) {
tmp = -b / (((x + t) + y) / y);
} else if (x <= 1.9e+86) {
tmp = t_1;
} else if (x <= 6.2e+148) {
tmp = z / ((x + t) / x);
} else if (x <= 1.7e+226) {
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 + (a * ((t + y) / x))
if (x <= (-9d+40)) then
tmp = t_2
else if (x <= (-4d-93)) then
tmp = a
else if (x <= (-1.2d-129)) then
tmp = -b / (((x + t) + y) / y)
else if (x <= 1.9d+86) then
tmp = t_1
else if (x <= 6.2d+148) then
tmp = z / ((x + t) / x)
else if (x <= 1.7d+226) 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 + (a * ((t + y) / x));
double tmp;
if (x <= -9e+40) {
tmp = t_2;
} else if (x <= -4e-93) {
tmp = a;
} else if (x <= -1.2e-129) {
tmp = -b / (((x + t) + y) / y);
} else if (x <= 1.9e+86) {
tmp = t_1;
} else if (x <= 6.2e+148) {
tmp = z / ((x + t) / x);
} else if (x <= 1.7e+226) {
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 + (a * ((t + y) / x)) tmp = 0 if x <= -9e+40: tmp = t_2 elif x <= -4e-93: tmp = a elif x <= -1.2e-129: tmp = -b / (((x + t) + y) / y) elif x <= 1.9e+86: tmp = t_1 elif x <= 6.2e+148: tmp = z / ((x + t) / x) elif x <= 1.7e+226: 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(a * Float64(Float64(t + y) / x))) tmp = 0.0 if (x <= -9e+40) tmp = t_2; elseif (x <= -4e-93) tmp = a; elseif (x <= -1.2e-129) tmp = Float64(Float64(-b) / Float64(Float64(Float64(x + t) + y) / y)); elseif (x <= 1.9e+86) tmp = t_1; elseif (x <= 6.2e+148) tmp = Float64(z / Float64(Float64(x + t) / x)); elseif (x <= 1.7e+226) 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 + (a * ((t + y) / x)); tmp = 0.0; if (x <= -9e+40) tmp = t_2; elseif (x <= -4e-93) tmp = a; elseif (x <= -1.2e-129) tmp = -b / (((x + t) + y) / y); elseif (x <= 1.9e+86) tmp = t_1; elseif (x <= 6.2e+148) tmp = z / ((x + t) / x); elseif (x <= 1.7e+226) 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[(a * N[(N[(t + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -9e+40], t$95$2, If[LessEqual[x, -4e-93], a, If[LessEqual[x, -1.2e-129], N[((-b) / N[(N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.9e+86], t$95$1, If[LessEqual[x, 6.2e+148], N[(z / N[(N[(x + t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 1.7e+226], t$95$1, t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := z + a \cdot \frac{t + y}{x}\\
\mathbf{if}\;x \leq -9 \cdot 10^{+40}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -4 \cdot 10^{-93}:\\
\;\;\;\;a\\
\mathbf{elif}\;x \leq -1.2 \cdot 10^{-129}:\\
\;\;\;\;\frac{-b}{\frac{\left(x + t\right) + y}{y}}\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{+86}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 6.2 \cdot 10^{+148}:\\
\;\;\;\;\frac{z}{\frac{x + t}{x}}\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{+226}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -9.00000000000000064e40 or 1.69999999999999989e226 < x Initial program 46.9%
Taylor expanded in x around inf 43.5%
associate--l+43.6%
+-commutative43.6%
associate-/l*49.6%
+-commutative49.6%
associate-/l*49.6%
associate-/l*56.9%
+-commutative56.9%
associate-/l*65.1%
+-commutative65.1%
Simplified65.1%
Taylor expanded in a around inf 60.4%
distribute-lft-in60.4%
associate-*r/55.6%
*-commutative55.6%
associate-*r/60.4%
associate-*r/56.2%
*-commutative56.2%
associate-*r/60.8%
distribute-rgt-in60.8%
associate-*l/51.5%
associate-*r/60.4%
+-commutative60.4%
Simplified60.4%
if -9.00000000000000064e40 < x < -3.9999999999999996e-93Initial program 55.4%
Taylor expanded in t around inf 59.7%
if -3.9999999999999996e-93 < x < -1.19999999999999994e-129Initial program 89.3%
Taylor expanded in b around inf 56.6%
*-commutative56.6%
+-commutative56.6%
associate-+r+56.6%
*-commutative56.6%
associate-/l*66.9%
associate-*r/66.9%
mul-1-neg66.9%
+-commutative66.9%
associate-+l+66.9%
Simplified66.9%
if -1.19999999999999994e-129 < x < 1.89999999999999989e86 or 6.19999999999999951e148 < x < 1.69999999999999989e226Initial program 67.3%
Taylor expanded in y around inf 63.9%
if 1.89999999999999989e86 < x < 6.19999999999999951e148Initial program 72.7%
Taylor expanded in z around inf 50.5%
+-commutative50.5%
Simplified50.5%
Taylor expanded in y around 0 50.5%
*-commutative50.5%
associate-/l*63.8%
+-commutative63.8%
Simplified63.8%
Final simplification62.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -4e-40)
t_1
(if (<= y 4e-164)
(+ z (* a (/ (+ t y) x)))
(if (<= y 3.4e-123)
(+ a (* x (- (/ z t) (/ a t))))
(if (<= y 2.8e-67) (+ z (* y (- (/ a x) (/ b x)))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -4e-40) {
tmp = t_1;
} else if (y <= 4e-164) {
tmp = z + (a * ((t + y) / x));
} else if (y <= 3.4e-123) {
tmp = a + (x * ((z / t) - (a / t)));
} else if (y <= 2.8e-67) {
tmp = z + (y * ((a / x) - (b / x)));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (y <= (-4d-40)) then
tmp = t_1
else if (y <= 4d-164) then
tmp = z + (a * ((t + y) / x))
else if (y <= 3.4d-123) then
tmp = a + (x * ((z / t) - (a / t)))
else if (y <= 2.8d-67) then
tmp = z + (y * ((a / x) - (b / x)))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -4e-40) {
tmp = t_1;
} else if (y <= 4e-164) {
tmp = z + (a * ((t + y) / x));
} else if (y <= 3.4e-123) {
tmp = a + (x * ((z / t) - (a / t)));
} else if (y <= 2.8e-67) {
tmp = z + (y * ((a / x) - (b / x)));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -4e-40: tmp = t_1 elif y <= 4e-164: tmp = z + (a * ((t + y) / x)) elif y <= 3.4e-123: tmp = a + (x * ((z / t) - (a / t))) elif y <= 2.8e-67: tmp = z + (y * ((a / x) - (b / x))) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -4e-40) tmp = t_1; elseif (y <= 4e-164) tmp = Float64(z + Float64(a * Float64(Float64(t + y) / x))); elseif (y <= 3.4e-123) tmp = Float64(a + Float64(x * Float64(Float64(z / t) - Float64(a / t)))); elseif (y <= 2.8e-67) tmp = Float64(z + Float64(y * Float64(Float64(a / x) - Float64(b / x)))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -4e-40) tmp = t_1; elseif (y <= 4e-164) tmp = z + (a * ((t + y) / x)); elseif (y <= 3.4e-123) tmp = a + (x * ((z / t) - (a / t))); elseif (y <= 2.8e-67) tmp = z + (y * ((a / x) - (b / x))); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -4e-40], t$95$1, If[LessEqual[y, 4e-164], N[(z + N[(a * N[(N[(t + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e-123], N[(a + N[(x * N[(N[(z / t), $MachinePrecision] - N[(a / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.8e-67], N[(z + N[(y * N[(N[(a / x), $MachinePrecision] - N[(b / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -4 \cdot 10^{-40}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-164}:\\
\;\;\;\;z + a \cdot \frac{t + y}{x}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-123}:\\
\;\;\;\;a + x \cdot \left(\frac{z}{t} - \frac{a}{t}\right)\\
\mathbf{elif}\;y \leq 2.8 \cdot 10^{-67}:\\
\;\;\;\;z + y \cdot \left(\frac{a}{x} - \frac{b}{x}\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -3.9999999999999997e-40 or 2.8000000000000001e-67 < y Initial program 45.7%
Taylor expanded in y around inf 69.6%
if -3.9999999999999997e-40 < y < 3.99999999999999985e-164Initial program 84.0%
Taylor expanded in x around inf 48.7%
associate--l+50.8%
+-commutative50.8%
associate-/l*53.2%
+-commutative53.2%
associate-/l*51.0%
associate-/l*50.8%
+-commutative50.8%
associate-/l*50.9%
+-commutative50.9%
Simplified50.9%
Taylor expanded in a around inf 50.4%
distribute-lft-in50.4%
associate-*r/48.0%
*-commutative48.0%
associate-*r/46.1%
associate-*r/46.1%
*-commutative46.1%
associate-*r/46.0%
distribute-rgt-in46.1%
associate-*l/48.0%
associate-*r/50.4%
+-commutative50.4%
Simplified50.4%
if 3.99999999999999985e-164 < y < 3.4000000000000001e-123Initial program 55.9%
Taylor expanded in y around 0 25.5%
Taylor expanded in x around 0 61.6%
if 3.4000000000000001e-123 < y < 2.8000000000000001e-67Initial program 100.0%
Taylor expanded in x around inf 56.4%
associate--l+56.4%
+-commutative56.4%
associate-/l*53.3%
+-commutative53.3%
associate-/l*52.6%
associate-/l*52.6%
+-commutative52.6%
associate-/l*52.7%
+-commutative52.7%
Simplified52.7%
Taylor expanded in y around inf 56.9%
Final simplification62.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (/ a (/ (+ (+ x t) y) (+ t y)))) (t_2 (- (+ z a) b)))
(if (<= y -1.6e-66)
t_2
(if (<= y 3e-285)
t_1
(if (<= y 2.7e-171)
(+ z (* a (/ (+ t y) x)))
(if (<= y 1.95e+39) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (((x + t) + y) / (t + y));
double t_2 = (z + a) - b;
double tmp;
if (y <= -1.6e-66) {
tmp = t_2;
} else if (y <= 3e-285) {
tmp = t_1;
} else if (y <= 2.7e-171) {
tmp = z + (a * ((t + y) / x));
} else if (y <= 1.95e+39) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a / (((x + t) + y) / (t + y))
t_2 = (z + a) - b
if (y <= (-1.6d-66)) then
tmp = t_2
else if (y <= 3d-285) then
tmp = t_1
else if (y <= 2.7d-171) then
tmp = z + (a * ((t + y) / x))
else if (y <= 1.95d+39) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a / (((x + t) + y) / (t + y));
double t_2 = (z + a) - b;
double tmp;
if (y <= -1.6e-66) {
tmp = t_2;
} else if (y <= 3e-285) {
tmp = t_1;
} else if (y <= 2.7e-171) {
tmp = z + (a * ((t + y) / x));
} else if (y <= 1.95e+39) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a / (((x + t) + y) / (t + y)) t_2 = (z + a) - b tmp = 0 if y <= -1.6e-66: tmp = t_2 elif y <= 3e-285: tmp = t_1 elif y <= 2.7e-171: tmp = z + (a * ((t + y) / x)) elif y <= 1.95e+39: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a / Float64(Float64(Float64(x + t) + y) / Float64(t + y))) t_2 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -1.6e-66) tmp = t_2; elseif (y <= 3e-285) tmp = t_1; elseif (y <= 2.7e-171) tmp = Float64(z + Float64(a * Float64(Float64(t + y) / x))); elseif (y <= 1.95e+39) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a / (((x + t) + y) / (t + y)); t_2 = (z + a) - b; tmp = 0.0; if (y <= -1.6e-66) tmp = t_2; elseif (y <= 3e-285) tmp = t_1; elseif (y <= 2.7e-171) tmp = z + (a * ((t + y) / x)); elseif (y <= 1.95e+39) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a / N[(N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -1.6e-66], t$95$2, If[LessEqual[y, 3e-285], t$95$1, If[LessEqual[y, 2.7e-171], N[(z + N[(a * N[(N[(t + y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.95e+39], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{a}{\frac{\left(x + t\right) + y}{t + y}}\\
t_2 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -1.6 \cdot 10^{-66}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-285}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 2.7 \cdot 10^{-171}:\\
\;\;\;\;z + a \cdot \frac{t + y}{x}\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{+39}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.59999999999999991e-66 or 1.95e39 < y Initial program 46.0%
Taylor expanded in y around inf 71.0%
if -1.59999999999999991e-66 < y < 3.00000000000000003e-285 or 2.70000000000000014e-171 < y < 1.95e39Initial program 78.6%
Taylor expanded in a around inf 38.3%
+-commutative38.3%
+-commutative38.3%
associate-+r+38.3%
associate-/l*55.9%
associate-+r+55.9%
+-commutative55.9%
associate-+r+55.9%
+-commutative55.9%
Simplified55.9%
if 3.00000000000000003e-285 < y < 2.70000000000000014e-171Initial program 82.9%
Taylor expanded in x around inf 56.0%
associate--l+56.0%
+-commutative56.0%
associate-/l*58.8%
+-commutative58.8%
associate-/l*58.8%
associate-/l*58.8%
+-commutative58.8%
associate-/l*61.6%
+-commutative61.6%
Simplified61.6%
Taylor expanded in a around inf 61.8%
distribute-lft-in61.8%
associate-*r/59.1%
*-commutative59.1%
associate-*r/56.1%
associate-*r/56.1%
*-commutative56.1%
associate-*r/55.7%
distribute-rgt-in56.1%
associate-*l/59.1%
associate-*r/61.8%
+-commutative61.8%
Simplified61.8%
Final simplification64.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -8.6e-46) (not (<= y 3.5e-177))) (+ z (- (/ a (/ (+ (+ x t) y) (+ t y))) b)) (/ (+ (* t a) (* z x)) (+ x t))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -8.6e-46) || !(y <= 3.5e-177)) {
tmp = z + ((a / (((x + t) + y) / (t + y))) - b);
} else {
tmp = ((t * a) + (z * x)) / (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 <= (-8.6d-46)) .or. (.not. (y <= 3.5d-177))) then
tmp = z + ((a / (((x + t) + y) / (t + y))) - b)
else
tmp = ((t * a) + (z * x)) / (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 <= -8.6e-46) || !(y <= 3.5e-177)) {
tmp = z + ((a / (((x + t) + y) / (t + y))) - b);
} else {
tmp = ((t * a) + (z * x)) / (x + t);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -8.6e-46) or not (y <= 3.5e-177): tmp = z + ((a / (((x + t) + y) / (t + y))) - b) else: tmp = ((t * a) + (z * x)) / (x + t) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -8.6e-46) || !(y <= 3.5e-177)) tmp = Float64(z + Float64(Float64(a / Float64(Float64(Float64(x + t) + y) / Float64(t + y))) - b)); else tmp = Float64(Float64(Float64(t * a) + Float64(z * x)) / Float64(x + t)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -8.6e-46) || ~((y <= 3.5e-177))) tmp = z + ((a / (((x + t) + y) / (t + y))) - b); else tmp = ((t * a) + (z * x)) / (x + t); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -8.6e-46], N[Not[LessEqual[y, 3.5e-177]], $MachinePrecision]], N[(z + N[(N[(a / N[(N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.6 \cdot 10^{-46} \lor \neg \left(y \leq 3.5 \cdot 10^{-177}\right):\\
\;\;\;\;z + \left(\frac{a}{\frac{\left(x + t\right) + y}{t + y}} - b\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot a + z \cdot x}{x + t}\\
\end{array}
\end{array}
if y < -8.6000000000000007e-46 or 3.5000000000000002e-177 < y Initial program 49.5%
Taylor expanded in z around 0 60.8%
associate--l+60.8%
associate-+r+60.8%
associate-+r+60.8%
+-commutative60.8%
+-commutative60.8%
associate-+r+60.8%
*-commutative60.8%
+-commutative60.8%
associate-+r+60.8%
div-sub60.8%
Simplified60.8%
div-sub60.8%
associate-/l*81.8%
+-commutative81.8%
add-sqr-sqrt43.1%
sqrt-unprod63.3%
sqr-neg63.3%
*-commutative63.3%
distribute-lft-neg-out63.3%
*-commutative63.3%
distribute-lft-neg-out63.3%
sqrt-unprod35.5%
add-sqr-sqrt71.0%
div-inv71.0%
associate-*l*78.1%
Applied egg-rr99.7%
Taylor expanded in x around inf 87.2%
Taylor expanded in y around inf 74.3%
if -8.6000000000000007e-46 < y < 3.5000000000000002e-177Initial program 85.5%
Taylor expanded in y around 0 69.8%
Final simplification72.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x t) y)) (t_2 (/ a (/ t_1 (+ t y)))))
(if (<= a -5800.0)
t_2
(if (<= a -3.4e-145)
(- (+ z a) b)
(if (<= a 6.6e+16) (/ (+ x y) (/ t_1 z)) 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 = a / (t_1 / (t + y));
double tmp;
if (a <= -5800.0) {
tmp = t_2;
} else if (a <= -3.4e-145) {
tmp = (z + a) - b;
} else if (a <= 6.6e+16) {
tmp = (x + y) / (t_1 / z);
} 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 = (x + t) + y
t_2 = a / (t_1 / (t + y))
if (a <= (-5800.0d0)) then
tmp = t_2
else if (a <= (-3.4d-145)) then
tmp = (z + a) - b
else if (a <= 6.6d+16) then
tmp = (x + y) / (t_1 / z)
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 = (x + t) + y;
double t_2 = a / (t_1 / (t + y));
double tmp;
if (a <= -5800.0) {
tmp = t_2;
} else if (a <= -3.4e-145) {
tmp = (z + a) - b;
} else if (a <= 6.6e+16) {
tmp = (x + y) / (t_1 / z);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + t) + y t_2 = a / (t_1 / (t + y)) tmp = 0 if a <= -5800.0: tmp = t_2 elif a <= -3.4e-145: tmp = (z + a) - b elif a <= 6.6e+16: tmp = (x + y) / (t_1 / z) else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + t) + y) t_2 = Float64(a / Float64(t_1 / Float64(t + y))) tmp = 0.0 if (a <= -5800.0) tmp = t_2; elseif (a <= -3.4e-145) tmp = Float64(Float64(z + a) - b); elseif (a <= 6.6e+16) tmp = Float64(Float64(x + y) / Float64(t_1 / z)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + t) + y; t_2 = a / (t_1 / (t + y)); tmp = 0.0; if (a <= -5800.0) tmp = t_2; elseif (a <= -3.4e-145) tmp = (z + a) - b; elseif (a <= 6.6e+16) tmp = (x + y) / (t_1 / z); else tmp = t_2; 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[(a / N[(t$95$1 / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5800.0], t$95$2, If[LessEqual[a, -3.4e-145], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], If[LessEqual[a, 6.6e+16], N[(N[(x + y), $MachinePrecision] / N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \frac{a}{\frac{t_1}{t + y}}\\
\mathbf{if}\;a \leq -5800:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -3.4 \cdot 10^{-145}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{elif}\;a \leq 6.6 \cdot 10^{+16}:\\
\;\;\;\;\frac{x + y}{\frac{t_1}{z}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if a < -5800 or 6.6e16 < a Initial program 47.7%
Taylor expanded in a around inf 34.5%
+-commutative34.5%
+-commutative34.5%
associate-+r+34.5%
associate-/l*72.4%
associate-+r+72.4%
+-commutative72.4%
associate-+r+72.4%
+-commutative72.4%
Simplified72.4%
if -5800 < a < -3.3999999999999999e-145Initial program 76.2%
Taylor expanded in y around inf 63.2%
if -3.3999999999999999e-145 < a < 6.6e16Initial program 74.6%
Taylor expanded in z around inf 50.0%
+-commutative50.0%
associate-+r+50.0%
*-commutative50.0%
associate-/l*56.6%
+-commutative56.6%
+-commutative56.6%
associate-+l+56.6%
Simplified56.6%
Final simplification65.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= y -1.55e-41)
t_1
(if (<= y 6e-170)
(/ (+ (* t a) (* z x)) (+ x t))
(if (<= y 2.6e+39) (/ a (/ (+ (+ x t) y) (+ t y))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -1.55e-41) {
tmp = t_1;
} else if (y <= 6e-170) {
tmp = ((t * a) + (z * x)) / (x + t);
} else if (y <= 2.6e+39) {
tmp = a / (((x + t) + y) / (t + y));
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (y <= (-1.55d-41)) then
tmp = t_1
else if (y <= 6d-170) then
tmp = ((t * a) + (z * x)) / (x + t)
else if (y <= 2.6d+39) then
tmp = a / (((x + t) + y) / (t + y))
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (y <= -1.55e-41) {
tmp = t_1;
} else if (y <= 6e-170) {
tmp = ((t * a) + (z * x)) / (x + t);
} else if (y <= 2.6e+39) {
tmp = a / (((x + t) + y) / (t + y));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if y <= -1.55e-41: tmp = t_1 elif y <= 6e-170: tmp = ((t * a) + (z * x)) / (x + t) elif y <= 2.6e+39: tmp = a / (((x + t) + y) / (t + y)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -1.55e-41) tmp = t_1; elseif (y <= 6e-170) tmp = Float64(Float64(Float64(t * a) + Float64(z * x)) / Float64(x + t)); elseif (y <= 2.6e+39) tmp = Float64(a / Float64(Float64(Float64(x + t) + y) / Float64(t + y))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (y <= -1.55e-41) tmp = t_1; elseif (y <= 6e-170) tmp = ((t * a) + (z * x)) / (x + t); elseif (y <= 2.6e+39) tmp = a / (((x + t) + y) / (t + y)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -1.55e-41], t$95$1, If[LessEqual[y, 6e-170], N[(N[(N[(t * a), $MachinePrecision] + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.6e+39], N[(a / N[(N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision] / N[(t + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -1.55 \cdot 10^{-41}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 6 \cdot 10^{-170}:\\
\;\;\;\;\frac{t \cdot a + z \cdot x}{x + t}\\
\mathbf{elif}\;y \leq 2.6 \cdot 10^{+39}:\\
\;\;\;\;\frac{a}{\frac{\left(x + t\right) + y}{t + y}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -1.55e-41 or 2.6e39 < y Initial program 44.3%
Taylor expanded in y around inf 72.0%
if -1.55e-41 < y < 6.00000000000000027e-170Initial program 83.7%
Taylor expanded in y around 0 68.4%
if 6.00000000000000027e-170 < y < 2.6e39Initial program 70.9%
Taylor expanded in a around inf 33.7%
+-commutative33.7%
+-commutative33.7%
associate-+r+33.7%
associate-/l*62.8%
associate-+r+62.8%
+-commutative62.8%
associate-+r+62.8%
+-commutative62.8%
Simplified62.8%
Final simplification69.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -4.6e-40) (not (<= y 2.5e-170))) (- (+ z a) b) (+ z (* y (/ a x)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.6e-40) || !(y <= 2.5e-170)) {
tmp = (z + a) - b;
} else {
tmp = z + (y * (a / x));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-4.6d-40)) .or. (.not. (y <= 2.5d-170))) then
tmp = (z + a) - b
else
tmp = z + (y * (a / x))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -4.6e-40) || !(y <= 2.5e-170)) {
tmp = (z + a) - b;
} else {
tmp = z + (y * (a / x));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -4.6e-40) or not (y <= 2.5e-170): tmp = (z + a) - b else: tmp = z + (y * (a / x)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -4.6e-40) || !(y <= 2.5e-170)) tmp = Float64(Float64(z + a) - b); else tmp = Float64(z + Float64(y * Float64(a / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -4.6e-40) || ~((y <= 2.5e-170))) tmp = (z + a) - b; else tmp = z + (y * (a / x)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -4.6e-40], N[Not[LessEqual[y, 2.5e-170]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(z + N[(y * N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.6 \cdot 10^{-40} \lor \neg \left(y \leq 2.5 \cdot 10^{-170}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;z + y \cdot \frac{a}{x}\\
\end{array}
\end{array}
if y < -4.6e-40 or 2.50000000000000005e-170 < y Initial program 49.7%
Taylor expanded in y around inf 65.2%
if -4.6e-40 < y < 2.50000000000000005e-170Initial program 83.9%
Taylor expanded in x around inf 48.9%
associate--l+51.1%
+-commutative51.1%
associate-/l*53.5%
+-commutative53.5%
associate-/l*51.2%
associate-/l*51.1%
+-commutative51.1%
associate-/l*51.2%
+-commutative51.2%
Simplified51.2%
Taylor expanded in a around -inf 48.3%
Taylor expanded in t around 0 40.4%
*-commutative40.4%
associate-*r/39.4%
Simplified39.4%
Final simplification56.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -3.8e-40) (not (<= y 3e-166))) (- (+ z a) b) (+ z (/ a (/ x t)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -3.8e-40) || !(y <= 3e-166)) {
tmp = (z + a) - b;
} else {
tmp = z + (a / (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 <= (-3.8d-40)) .or. (.not. (y <= 3d-166))) then
tmp = (z + a) - b
else
tmp = z + (a / (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 <= -3.8e-40) || !(y <= 3e-166)) {
tmp = (z + a) - b;
} else {
tmp = z + (a / (x / t));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -3.8e-40) or not (y <= 3e-166): tmp = (z + a) - b else: tmp = z + (a / (x / t)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -3.8e-40) || !(y <= 3e-166)) tmp = Float64(Float64(z + a) - b); else tmp = Float64(z + Float64(a / Float64(x / t))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -3.8e-40) || ~((y <= 3e-166))) tmp = (z + a) - b; else tmp = z + (a / (x / t)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -3.8e-40], N[Not[LessEqual[y, 3e-166]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], N[(z + N[(a / N[(x / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.8 \cdot 10^{-40} \lor \neg \left(y \leq 3 \cdot 10^{-166}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;z + \frac{a}{\frac{x}{t}}\\
\end{array}
\end{array}
if y < -3.7999999999999999e-40 or 3.0000000000000003e-166 < y Initial program 49.4%
Taylor expanded in y around inf 65.5%
if -3.7999999999999999e-40 < y < 3.0000000000000003e-166Initial program 84.0%
Taylor expanded in x around inf 48.7%
associate--l+50.8%
+-commutative50.8%
associate-/l*53.2%
+-commutative53.2%
associate-/l*51.0%
associate-/l*50.8%
+-commutative50.8%
associate-/l*50.9%
+-commutative50.9%
Simplified50.9%
Taylor expanded in a around -inf 48.0%
Taylor expanded in y around 0 44.2%
+-commutative44.2%
associate-/l*46.6%
Simplified46.6%
Final simplification58.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1.15e-182) (not (<= y 1.42e-168))) (- (+ z a) b) z))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.15e-182) || !(y <= 1.42e-168)) {
tmp = (z + a) - b;
} else {
tmp = z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1.15d-182)) .or. (.not. (y <= 1.42d-168))) then
tmp = (z + a) - b
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1.15e-182) || !(y <= 1.42e-168)) {
tmp = (z + a) - b;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1.15e-182) or not (y <= 1.42e-168): tmp = (z + a) - b else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1.15e-182) || !(y <= 1.42e-168)) tmp = Float64(Float64(z + a) - b); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1.15e-182) || ~((y <= 1.42e-168))) tmp = (z + a) - b; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1.15e-182], N[Not[LessEqual[y, 1.42e-168]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], z]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{-182} \lor \neg \left(y \leq 1.42 \cdot 10^{-168}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if y < -1.15e-182 or 1.4199999999999999e-168 < y Initial program 56.3%
Taylor expanded in y around inf 60.1%
if -1.15e-182 < y < 1.4199999999999999e-168Initial program 79.9%
Taylor expanded in x around inf 39.1%
Final simplification55.4%
(FPCore (x y z t a b) :precision binary64 (if (<= a -1.75e-54) a (if (<= a 1.35e+33) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -1.75e-54) {
tmp = a;
} else if (a <= 1.35e+33) {
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.75d-54)) then
tmp = a
else if (a <= 1.35d+33) 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.75e-54) {
tmp = a;
} else if (a <= 1.35e+33) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -1.75e-54: tmp = a elif a <= 1.35e+33: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -1.75e-54) tmp = a; elseif (a <= 1.35e+33) 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.75e-54) tmp = a; elseif (a <= 1.35e+33) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.75e-54], a, If[LessEqual[a, 1.35e+33], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.75 \cdot 10^{-54}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 1.35 \cdot 10^{+33}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -1.74999999999999991e-54 or 1.34999999999999996e33 < a Initial program 49.4%
Taylor expanded in t around inf 53.1%
if -1.74999999999999991e-54 < a < 1.34999999999999996e33Initial program 75.0%
Taylor expanded in x around inf 41.7%
Final simplification47.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 61.6%
Taylor expanded in t around inf 35.0%
Final simplification35.0%
(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 2023301
(FPCore (x y z t a b)
:name "AI.Clustering.Hierarchical.Internal:ward from clustering-0.2.1"
:precision binary64
:herbie-target
(if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) -3.5813117084150564e+153) (- (+ z a) b) (if (< (/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)) 1.2285964308315609e+82) (/ 1.0 (/ (+ (+ x t) y) (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))) (- (+ z a) b)))
(/ (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)) (+ (+ x t) y)))