
(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 15 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 y) t)) (t_2 (+ y (+ x t))) (t_3 (/ y t_1)))
(if (or (<= z -2.2e-103) (not (<= z 1.6e-29)))
(*
z
(+ (/ x t_1) (- (+ t_3 (* (/ a z) (/ (+ y t) t_1))) (* t_3 (/ b z)))))
(* b (- (/ (fma z (/ (+ x y) t_2) (* a (/ (+ y t) t_2))) b) (/ y t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + y) + t;
double t_2 = y + (x + t);
double t_3 = y / t_1;
double tmp;
if ((z <= -2.2e-103) || !(z <= 1.6e-29)) {
tmp = z * ((x / t_1) + ((t_3 + ((a / z) * ((y + t) / t_1))) - (t_3 * (b / z))));
} else {
tmp = b * ((fma(z, ((x + y) / t_2), (a * ((y + t) / t_2))) / b) - (y / t_2));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + y) + t) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(y / t_1) tmp = 0.0 if ((z <= -2.2e-103) || !(z <= 1.6e-29)) tmp = Float64(z * Float64(Float64(x / t_1) + Float64(Float64(t_3 + Float64(Float64(a / z) * Float64(Float64(y + t) / t_1))) - Float64(t_3 * Float64(b / z))))); else tmp = Float64(b * Float64(Float64(fma(z, Float64(Float64(x + y) / t_2), Float64(a * Float64(Float64(y + t) / t_2))) / b) - Float64(y / t_2))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y / t$95$1), $MachinePrecision]}, If[Or[LessEqual[z, -2.2e-103], N[Not[LessEqual[z, 1.6e-29]], $MachinePrecision]], N[(z * N[(N[(x / t$95$1), $MachinePrecision] + N[(N[(t$95$3 + N[(N[(a / z), $MachinePrecision] * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$3 * N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(b * N[(N[(N[(z * N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(a * N[(N[(y + t), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision] - N[(y / t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) + t\\
t_2 := y + \left(x + t\right)\\
t_3 := \frac{y}{t\_1}\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{-103} \lor \neg \left(z \leq 1.6 \cdot 10^{-29}\right):\\
\;\;\;\;z \cdot \left(\frac{x}{t\_1} + \left(\left(t\_3 + \frac{a}{z} \cdot \frac{y + t}{t\_1}\right) - t\_3 \cdot \frac{b}{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(\frac{\mathsf{fma}\left(z, \frac{x + y}{t\_2}, a \cdot \frac{y + t}{t\_2}\right)}{b} - \frac{y}{t\_2}\right)\\
\end{array}
\end{array}
if z < -2.1999999999999999e-103 or 1.6e-29 < z Initial program 48.7%
Taylor expanded in z around inf 63.3%
associate--l+63.3%
+-commutative63.3%
+-commutative63.3%
times-frac88.6%
+-commutative88.6%
times-frac99.2%
+-commutative99.2%
Simplified99.2%
if -2.1999999999999999e-103 < z < 1.6e-29Initial program 74.8%
Taylor expanded in b around -inf 74.2%
mul-1-neg74.2%
distribute-rgt-neg-in74.2%
+-commutative74.2%
mul-1-neg74.2%
unsub-neg74.2%
Simplified87.6%
Final simplification94.7%
(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)))
(if (or (<= t_2 (- INFINITY)) (not (<= t_2 1e+268)))
(+ (* a (/ (+ y t) t_1)) (- z b))
t_2)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = (((z * (x + y)) + (a * (y + t))) - (y * b)) / t_1;
double tmp;
if ((t_2 <= -((double) INFINITY)) || !(t_2 <= 1e+268)) {
tmp = (a * ((y + t) / t_1)) + (z - b);
} else {
tmp = t_2;
}
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 tmp;
if ((t_2 <= -Double.POSITIVE_INFINITY) || !(t_2 <= 1e+268)) {
tmp = (a * ((y + t) / t_1)) + (z - b);
} else {
tmp = t_2;
}
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 tmp = 0 if (t_2 <= -math.inf) or not (t_2 <= 1e+268): tmp = (a * ((y + t) / t_1)) + (z - b) else: tmp = t_2 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) tmp = 0.0 if ((t_2 <= Float64(-Inf)) || !(t_2 <= 1e+268)) tmp = Float64(Float64(a * Float64(Float64(y + t) / t_1)) + Float64(z - b)); else tmp = t_2; 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; tmp = 0.0; if ((t_2 <= -Inf) || ~((t_2 <= 1e+268))) tmp = (a * ((y + t) / t_1)) + (z - b); else tmp = t_2; 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]}, If[Or[LessEqual[t$95$2, (-Infinity)], N[Not[LessEqual[t$95$2, 1e+268]], $MachinePrecision]], N[(N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(z - b), $MachinePrecision]), $MachinePrecision], t$95$2]]]
\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}\\
\mathbf{if}\;t\_2 \leq -\infty \lor \neg \left(t\_2 \leq 10^{+268}\right):\\
\;\;\;\;a \cdot \frac{y + t}{t\_1} + \left(z - b\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)) < -inf.0 or 9.9999999999999997e267 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.8%
Taylor expanded in b around 0 5.8%
mul-1-neg5.8%
+-commutative5.8%
associate-+l+5.8%
associate-/l*35.5%
+-commutative35.5%
associate-+r+35.5%
+-commutative35.5%
associate-+l+35.5%
sub-neg35.5%
div-sub35.5%
+-commutative35.5%
*-commutative35.5%
+-commutative35.5%
associate-+r+35.5%
+-commutative35.5%
associate-+l+35.5%
Simplified35.5%
Taylor expanded in y around inf 77.9%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 9.9999999999999997e267Initial program 99.8%
Final simplification90.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x y) t)) (t_2 (+ y (+ x t))) (t_3 (/ y t_1)))
(if (or (<= z -2.2e-136) (not (<= z 4e-28)))
(*
z
(+ (/ x t_1) (- (+ t_3 (* (/ a z) (/ (+ y t) t_1))) (* t_3 (/ b z)))))
(+ (* a (/ (+ y t) t_2)) (/ (- (* z (+ x y)) (* y b)) t_2)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + y) + t;
double t_2 = y + (x + t);
double t_3 = y / t_1;
double tmp;
if ((z <= -2.2e-136) || !(z <= 4e-28)) {
tmp = z * ((x / t_1) + ((t_3 + ((a / z) * ((y + t) / t_1))) - (t_3 * (b / z))));
} else {
tmp = (a * ((y + t) / t_2)) + (((z * (x + y)) - (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) :: t_3
real(8) :: tmp
t_1 = (x + y) + t
t_2 = y + (x + t)
t_3 = y / t_1
if ((z <= (-2.2d-136)) .or. (.not. (z <= 4d-28))) then
tmp = z * ((x / t_1) + ((t_3 + ((a / z) * ((y + t) / t_1))) - (t_3 * (b / z))))
else
tmp = (a * ((y + t) / t_2)) + (((z * (x + y)) - (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 + y) + t;
double t_2 = y + (x + t);
double t_3 = y / t_1;
double tmp;
if ((z <= -2.2e-136) || !(z <= 4e-28)) {
tmp = z * ((x / t_1) + ((t_3 + ((a / z) * ((y + t) / t_1))) - (t_3 * (b / z))));
} else {
tmp = (a * ((y + t) / t_2)) + (((z * (x + y)) - (y * b)) / t_2);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + y) + t t_2 = y + (x + t) t_3 = y / t_1 tmp = 0 if (z <= -2.2e-136) or not (z <= 4e-28): tmp = z * ((x / t_1) + ((t_3 + ((a / z) * ((y + t) / t_1))) - (t_3 * (b / z)))) else: tmp = (a * ((y + t) / t_2)) + (((z * (x + y)) - (y * b)) / t_2) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + y) + t) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(y / t_1) tmp = 0.0 if ((z <= -2.2e-136) || !(z <= 4e-28)) tmp = Float64(z * Float64(Float64(x / t_1) + Float64(Float64(t_3 + Float64(Float64(a / z) * Float64(Float64(y + t) / t_1))) - Float64(t_3 * Float64(b / z))))); else tmp = Float64(Float64(a * Float64(Float64(y + t) / t_2)) + Float64(Float64(Float64(z * Float64(x + y)) - Float64(y * b)) / t_2)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + y) + t; t_2 = y + (x + t); t_3 = y / t_1; tmp = 0.0; if ((z <= -2.2e-136) || ~((z <= 4e-28))) tmp = z * ((x / t_1) + ((t_3 + ((a / z) * ((y + t) / t_1))) - (t_3 * (b / z)))); else tmp = (a * ((y + t) / t_2)) + (((z * (x + y)) - (y * b)) / t_2); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + y), $MachinePrecision] + t), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(y / t$95$1), $MachinePrecision]}, If[Or[LessEqual[z, -2.2e-136], N[Not[LessEqual[z, 4e-28]], $MachinePrecision]], N[(z * N[(N[(x / t$95$1), $MachinePrecision] + N[(N[(t$95$3 + N[(N[(a / z), $MachinePrecision] * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(t$95$3 * N[(b / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(N[(y + t), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(z * N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + y\right) + t\\
t_2 := y + \left(x + t\right)\\
t_3 := \frac{y}{t\_1}\\
\mathbf{if}\;z \leq -2.2 \cdot 10^{-136} \lor \neg \left(z \leq 4 \cdot 10^{-28}\right):\\
\;\;\;\;z \cdot \left(\frac{x}{t\_1} + \left(\left(t\_3 + \frac{a}{z} \cdot \frac{y + t}{t\_1}\right) - t\_3 \cdot \frac{b}{z}\right)\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{y + t}{t\_2} + \frac{z \cdot \left(x + y\right) - y \cdot b}{t\_2}\\
\end{array}
\end{array}
if z < -2.2000000000000001e-136 or 3.99999999999999988e-28 < z Initial program 48.3%
Taylor expanded in z around inf 62.2%
associate--l+62.2%
+-commutative62.2%
+-commutative62.2%
times-frac86.3%
+-commutative86.3%
times-frac97.5%
+-commutative97.5%
Simplified97.5%
if -2.2000000000000001e-136 < z < 3.99999999999999988e-28Initial program 77.8%
Taylor expanded in b around 0 77.9%
mul-1-neg77.9%
+-commutative77.9%
associate-+l+77.9%
associate-/l*87.2%
+-commutative87.2%
associate-+r+87.2%
+-commutative87.2%
associate-+l+87.2%
sub-neg87.2%
div-sub87.2%
+-commutative87.2%
*-commutative87.2%
+-commutative87.2%
associate-+r+87.2%
+-commutative87.2%
associate-+l+87.2%
Simplified87.2%
Final simplification93.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- z (/ (* y b) x))) (t_2 (- (+ z a) b)))
(if (<= y -3.4e-88)
t_2
(if (<= y -3.2e-139)
(- a (/ (* y b) t))
(if (<= y -1.35e-150)
(+ (- z b) (/ (* a (+ y t)) x))
(if (<= y -3.1e-159)
t_1
(if (<= y 1.12e-153)
(/ (+ (* a t) (* z x)) (+ x t))
(if (<= y 1.12e-83)
(* a (/ (+ y t) (+ y (+ x t))))
(if (<= y 1.8e-18) t_1 t_2)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = z - ((y * b) / x);
double t_2 = (z + a) - b;
double tmp;
if (y <= -3.4e-88) {
tmp = t_2;
} else if (y <= -3.2e-139) {
tmp = a - ((y * b) / t);
} else if (y <= -1.35e-150) {
tmp = (z - b) + ((a * (y + t)) / x);
} else if (y <= -3.1e-159) {
tmp = t_1;
} else if (y <= 1.12e-153) {
tmp = ((a * t) + (z * x)) / (x + t);
} else if (y <= 1.12e-83) {
tmp = a * ((y + t) / (y + (x + t)));
} else if (y <= 1.8e-18) {
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 - ((y * b) / x)
t_2 = (z + a) - b
if (y <= (-3.4d-88)) then
tmp = t_2
else if (y <= (-3.2d-139)) then
tmp = a - ((y * b) / t)
else if (y <= (-1.35d-150)) then
tmp = (z - b) + ((a * (y + t)) / x)
else if (y <= (-3.1d-159)) then
tmp = t_1
else if (y <= 1.12d-153) then
tmp = ((a * t) + (z * x)) / (x + t)
else if (y <= 1.12d-83) then
tmp = a * ((y + t) / (y + (x + t)))
else if (y <= 1.8d-18) 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 - ((y * b) / x);
double t_2 = (z + a) - b;
double tmp;
if (y <= -3.4e-88) {
tmp = t_2;
} else if (y <= -3.2e-139) {
tmp = a - ((y * b) / t);
} else if (y <= -1.35e-150) {
tmp = (z - b) + ((a * (y + t)) / x);
} else if (y <= -3.1e-159) {
tmp = t_1;
} else if (y <= 1.12e-153) {
tmp = ((a * t) + (z * x)) / (x + t);
} else if (y <= 1.12e-83) {
tmp = a * ((y + t) / (y + (x + t)));
} else if (y <= 1.8e-18) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = z - ((y * b) / x) t_2 = (z + a) - b tmp = 0 if y <= -3.4e-88: tmp = t_2 elif y <= -3.2e-139: tmp = a - ((y * b) / t) elif y <= -1.35e-150: tmp = (z - b) + ((a * (y + t)) / x) elif y <= -3.1e-159: tmp = t_1 elif y <= 1.12e-153: tmp = ((a * t) + (z * x)) / (x + t) elif y <= 1.12e-83: tmp = a * ((y + t) / (y + (x + t))) elif y <= 1.8e-18: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(z - Float64(Float64(y * b) / x)) t_2 = Float64(Float64(z + a) - b) tmp = 0.0 if (y <= -3.4e-88) tmp = t_2; elseif (y <= -3.2e-139) tmp = Float64(a - Float64(Float64(y * b) / t)); elseif (y <= -1.35e-150) tmp = Float64(Float64(z - b) + Float64(Float64(a * Float64(y + t)) / x)); elseif (y <= -3.1e-159) tmp = t_1; elseif (y <= 1.12e-153) tmp = Float64(Float64(Float64(a * t) + Float64(z * x)) / Float64(x + t)); elseif (y <= 1.12e-83) tmp = Float64(a * Float64(Float64(y + t) / Float64(y + Float64(x + t)))); elseif (y <= 1.8e-18) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = z - ((y * b) / x); t_2 = (z + a) - b; tmp = 0.0; if (y <= -3.4e-88) tmp = t_2; elseif (y <= -3.2e-139) tmp = a - ((y * b) / t); elseif (y <= -1.35e-150) tmp = (z - b) + ((a * (y + t)) / x); elseif (y <= -3.1e-159) tmp = t_1; elseif (y <= 1.12e-153) tmp = ((a * t) + (z * x)) / (x + t); elseif (y <= 1.12e-83) tmp = a * ((y + t) / (y + (x + t))); elseif (y <= 1.8e-18) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(z - N[(N[(y * b), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[LessEqual[y, -3.4e-88], t$95$2, If[LessEqual[y, -3.2e-139], N[(a - N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -1.35e-150], N[(N[(z - b), $MachinePrecision] + N[(N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.1e-159], t$95$1, If[LessEqual[y, 1.12e-153], N[(N[(N[(a * t), $MachinePrecision] + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.12e-83], N[(a * N[(N[(y + t), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.8e-18], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := z - \frac{y \cdot b}{x}\\
t_2 := \left(z + a\right) - b\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{-88}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -3.2 \cdot 10^{-139}:\\
\;\;\;\;a - \frac{y \cdot b}{t}\\
\mathbf{elif}\;y \leq -1.35 \cdot 10^{-150}:\\
\;\;\;\;\left(z - b\right) + \frac{a \cdot \left(y + t\right)}{x}\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{-159}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{-153}:\\
\;\;\;\;\frac{a \cdot t + z \cdot x}{x + t}\\
\mathbf{elif}\;y \leq 1.12 \cdot 10^{-83}:\\
\;\;\;\;a \cdot \frac{y + t}{y + \left(x + t\right)}\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-18}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -3.39999999999999975e-88 or 1.80000000000000005e-18 < y Initial program 47.9%
Taylor expanded in y around inf 70.7%
if -3.39999999999999975e-88 < y < -3.1999999999999999e-139Initial program 68.5%
Taylor expanded in b around -inf 47.2%
mul-1-neg47.2%
distribute-rgt-neg-in47.2%
+-commutative47.2%
mul-1-neg47.2%
unsub-neg47.2%
Simplified68.2%
Taylor expanded in x around 0 57.3%
Taylor expanded in z around 0 57.3%
Taylor expanded in y around 0 78.3%
associate-*r/78.3%
neg-mul-178.3%
distribute-lft-neg-in78.3%
Simplified78.3%
if -3.1999999999999999e-139 < y < -1.3500000000000001e-150Initial program 83.8%
Taylor expanded in b around 0 83.8%
mul-1-neg83.8%
+-commutative83.8%
associate-+l+83.8%
associate-/l*68.3%
+-commutative68.3%
associate-+r+68.3%
+-commutative68.3%
associate-+l+68.3%
sub-neg68.3%
div-sub68.3%
+-commutative68.3%
*-commutative68.3%
+-commutative68.3%
associate-+r+68.3%
+-commutative68.3%
associate-+l+68.3%
Simplified68.3%
Taylor expanded in y around inf 68.8%
Taylor expanded in x around inf 67.6%
if -1.3500000000000001e-150 < y < -3.1e-159 or 1.11999999999999993e-83 < y < 1.80000000000000005e-18Initial program 83.9%
Taylor expanded in b around -inf 77.9%
mul-1-neg77.9%
distribute-rgt-neg-in77.9%
+-commutative77.9%
mul-1-neg77.9%
unsub-neg77.9%
Simplified88.6%
Taylor expanded in x around inf 77.3%
Taylor expanded in x around inf 77.3%
associate-*r/77.3%
neg-mul-177.3%
distribute-lft-neg-in77.3%
Simplified77.3%
if -3.1e-159 < y < 1.12000000000000005e-153Initial program 74.8%
Taylor expanded in y around 0 67.4%
if 1.12000000000000005e-153 < y < 1.11999999999999993e-83Initial program 49.5%
Taylor expanded in a around inf 42.6%
associate-/l*80.6%
+-commutative80.6%
associate-+r+80.6%
+-commutative80.6%
associate-+l+80.6%
Simplified80.6%
Final simplification71.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (* a (/ (+ y t) t_1))))
(if (<= a -1.8e+35)
t_2
(if (<= a -1.25e-292)
(* b (- (/ z b) (/ y (+ x y))))
(if (<= a 2.2e-127)
(* z (/ (+ x y) t_1))
(if (<= a 2.75e-117)
(* b (/ y (- (+ y t))))
(if (<= a 7.8e+153) (- (+ z a) b) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = a * ((y + t) / t_1);
double tmp;
if (a <= -1.8e+35) {
tmp = t_2;
} else if (a <= -1.25e-292) {
tmp = b * ((z / b) - (y / (x + y)));
} else if (a <= 2.2e-127) {
tmp = z * ((x + y) / t_1);
} else if (a <= 2.75e-117) {
tmp = b * (y / -(y + t));
} else if (a <= 7.8e+153) {
tmp = (z + a) - b;
} 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 = y + (x + t)
t_2 = a * ((y + t) / t_1)
if (a <= (-1.8d+35)) then
tmp = t_2
else if (a <= (-1.25d-292)) then
tmp = b * ((z / b) - (y / (x + y)))
else if (a <= 2.2d-127) then
tmp = z * ((x + y) / t_1)
else if (a <= 2.75d-117) then
tmp = b * (y / -(y + t))
else if (a <= 7.8d+153) then
tmp = (z + a) - b
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 = y + (x + t);
double t_2 = a * ((y + t) / t_1);
double tmp;
if (a <= -1.8e+35) {
tmp = t_2;
} else if (a <= -1.25e-292) {
tmp = b * ((z / b) - (y / (x + y)));
} else if (a <= 2.2e-127) {
tmp = z * ((x + y) / t_1);
} else if (a <= 2.75e-117) {
tmp = b * (y / -(y + t));
} else if (a <= 7.8e+153) {
tmp = (z + a) - b;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = a * ((y + t) / t_1) tmp = 0 if a <= -1.8e+35: tmp = t_2 elif a <= -1.25e-292: tmp = b * ((z / b) - (y / (x + y))) elif a <= 2.2e-127: tmp = z * ((x + y) / t_1) elif a <= 2.75e-117: tmp = b * (y / -(y + t)) elif a <= 7.8e+153: tmp = (z + a) - b else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(a * Float64(Float64(y + t) / t_1)) tmp = 0.0 if (a <= -1.8e+35) tmp = t_2; elseif (a <= -1.25e-292) tmp = Float64(b * Float64(Float64(z / b) - Float64(y / Float64(x + y)))); elseif (a <= 2.2e-127) tmp = Float64(z * Float64(Float64(x + y) / t_1)); elseif (a <= 2.75e-117) tmp = Float64(b * Float64(y / Float64(-Float64(y + t)))); elseif (a <= 7.8e+153) tmp = Float64(Float64(z + a) - b); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = a * ((y + t) / t_1); tmp = 0.0; if (a <= -1.8e+35) tmp = t_2; elseif (a <= -1.25e-292) tmp = b * ((z / b) - (y / (x + y))); elseif (a <= 2.2e-127) tmp = z * ((x + y) / t_1); elseif (a <= 2.75e-117) tmp = b * (y / -(y + t)); elseif (a <= 7.8e+153) tmp = (z + a) - b; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.8e+35], t$95$2, If[LessEqual[a, -1.25e-292], N[(b * N[(N[(z / b), $MachinePrecision] - N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.2e-127], N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.75e-117], N[(b * N[(y / (-N[(y + t), $MachinePrecision])), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7.8e+153], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := a \cdot \frac{y + t}{t\_1}\\
\mathbf{if}\;a \leq -1.8 \cdot 10^{+35}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -1.25 \cdot 10^{-292}:\\
\;\;\;\;b \cdot \left(\frac{z}{b} - \frac{y}{x + y}\right)\\
\mathbf{elif}\;a \leq 2.2 \cdot 10^{-127}:\\
\;\;\;\;z \cdot \frac{x + y}{t\_1}\\
\mathbf{elif}\;a \leq 2.75 \cdot 10^{-117}:\\
\;\;\;\;b \cdot \frac{y}{-\left(y + t\right)}\\
\mathbf{elif}\;a \leq 7.8 \cdot 10^{+153}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -1.8e35 or 7.79999999999999966e153 < a Initial program 43.4%
Taylor expanded in a around inf 34.2%
associate-/l*72.7%
+-commutative72.7%
associate-+r+72.7%
+-commutative72.7%
associate-+l+72.7%
Simplified72.7%
if -1.8e35 < a < -1.24999999999999995e-292Initial program 67.8%
Taylor expanded in b around -inf 66.2%
mul-1-neg66.2%
distribute-rgt-neg-in66.2%
+-commutative66.2%
mul-1-neg66.2%
unsub-neg66.2%
Simplified85.2%
Taylor expanded in x around inf 69.5%
Taylor expanded in t around 0 65.1%
+-commutative65.1%
Simplified65.1%
if -1.24999999999999995e-292 < a < 2.2000000000000001e-127Initial program 78.8%
Taylor expanded in z around inf 46.7%
associate-/l*65.0%
+-commutative65.0%
+-commutative65.0%
associate-+r+65.0%
+-commutative65.0%
associate-+l+65.0%
Simplified65.0%
if 2.2000000000000001e-127 < a < 2.75000000000000013e-117Initial program 100.0%
Taylor expanded in b around -inf 100.0%
mul-1-neg100.0%
distribute-rgt-neg-in100.0%
+-commutative100.0%
mul-1-neg100.0%
unsub-neg100.0%
Simplified100.0%
Taylor expanded in x around 0 100.0%
Taylor expanded in b around inf 100.0%
mul-1-neg100.0%
associate-/l*100.0%
+-commutative100.0%
distribute-rgt-neg-in100.0%
+-commutative100.0%
mul-1-neg100.0%
associate-*r/100.0%
mul-1-neg100.0%
Simplified100.0%
if 2.75000000000000013e-117 < a < 7.79999999999999966e153Initial program 61.4%
Taylor expanded in y around inf 62.0%
Final simplification67.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))) (t_2 (* a (/ (+ y t) t_1))))
(if (<= a -5.5e+84)
t_2
(if (<= a -2.7e+35)
(/ (+ (* a t) (* z x)) (+ x t))
(if (<= a 1.8e-132)
(* b (- (/ z b) (/ y t_1)))
(if (<= a 1.2e+152) (- (+ z a) b) t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = a * ((y + t) / t_1);
double tmp;
if (a <= -5.5e+84) {
tmp = t_2;
} else if (a <= -2.7e+35) {
tmp = ((a * t) + (z * x)) / (x + t);
} else if (a <= 1.8e-132) {
tmp = b * ((z / b) - (y / t_1));
} else if (a <= 1.2e+152) {
tmp = (z + a) - b;
} 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 = y + (x + t)
t_2 = a * ((y + t) / t_1)
if (a <= (-5.5d+84)) then
tmp = t_2
else if (a <= (-2.7d+35)) then
tmp = ((a * t) + (z * x)) / (x + t)
else if (a <= 1.8d-132) then
tmp = b * ((z / b) - (y / t_1))
else if (a <= 1.2d+152) then
tmp = (z + a) - b
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 = y + (x + t);
double t_2 = a * ((y + t) / t_1);
double tmp;
if (a <= -5.5e+84) {
tmp = t_2;
} else if (a <= -2.7e+35) {
tmp = ((a * t) + (z * x)) / (x + t);
} else if (a <= 1.8e-132) {
tmp = b * ((z / b) - (y / t_1));
} else if (a <= 1.2e+152) {
tmp = (z + a) - b;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = a * ((y + t) / t_1) tmp = 0 if a <= -5.5e+84: tmp = t_2 elif a <= -2.7e+35: tmp = ((a * t) + (z * x)) / (x + t) elif a <= 1.8e-132: tmp = b * ((z / b) - (y / t_1)) elif a <= 1.2e+152: tmp = (z + a) - b else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(a * Float64(Float64(y + t) / t_1)) tmp = 0.0 if (a <= -5.5e+84) tmp = t_2; elseif (a <= -2.7e+35) tmp = Float64(Float64(Float64(a * t) + Float64(z * x)) / Float64(x + t)); elseif (a <= 1.8e-132) tmp = Float64(b * Float64(Float64(z / b) - Float64(y / t_1))); elseif (a <= 1.2e+152) tmp = Float64(Float64(z + a) - b); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = a * ((y + t) / t_1); tmp = 0.0; if (a <= -5.5e+84) tmp = t_2; elseif (a <= -2.7e+35) tmp = ((a * t) + (z * x)) / (x + t); elseif (a <= 1.8e-132) tmp = b * ((z / b) - (y / t_1)); elseif (a <= 1.2e+152) tmp = (z + a) - b; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -5.5e+84], t$95$2, If[LessEqual[a, -2.7e+35], N[(N[(N[(a * t), $MachinePrecision] + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.8e-132], N[(b * N[(N[(z / b), $MachinePrecision] - N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.2e+152], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := a \cdot \frac{y + t}{t\_1}\\
\mathbf{if}\;a \leq -5.5 \cdot 10^{+84}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;a \leq -2.7 \cdot 10^{+35}:\\
\;\;\;\;\frac{a \cdot t + z \cdot x}{x + t}\\
\mathbf{elif}\;a \leq 1.8 \cdot 10^{-132}:\\
\;\;\;\;b \cdot \left(\frac{z}{b} - \frac{y}{t\_1}\right)\\
\mathbf{elif}\;a \leq 1.2 \cdot 10^{+152}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if a < -5.5000000000000004e84 or 1.2e152 < a Initial program 39.3%
Taylor expanded in a around inf 32.3%
associate-/l*75.1%
+-commutative75.1%
associate-+r+75.1%
+-commutative75.1%
associate-+l+75.1%
Simplified75.1%
if -5.5000000000000004e84 < a < -2.70000000000000003e35Initial program 81.4%
Taylor expanded in y around 0 90.9%
if -2.70000000000000003e35 < a < 1.80000000000000004e-132Initial program 71.8%
Taylor expanded in b around -inf 68.0%
mul-1-neg68.0%
distribute-rgt-neg-in68.0%
+-commutative68.0%
mul-1-neg68.0%
unsub-neg68.0%
Simplified84.4%
Taylor expanded in x around inf 66.0%
if 1.80000000000000004e-132 < a < 1.2e152Initial program 63.2%
Taylor expanded in y around inf 62.1%
Final simplification69.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (/ (+ y t) (+ y (+ x t))))))
(if (<= a -1.15e+84)
t_1
(if (<= a -0.95)
(/ (+ (* a t) (* z x)) (+ x t))
(if (<= a 3.4e-113)
(- z (/ (* y b) (+ x (+ y t))))
(if (<= a 2.15e+151) (- (+ z a) b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * ((y + t) / (y + (x + t)));
double tmp;
if (a <= -1.15e+84) {
tmp = t_1;
} else if (a <= -0.95) {
tmp = ((a * t) + (z * x)) / (x + t);
} else if (a <= 3.4e-113) {
tmp = z - ((y * b) / (x + (y + t)));
} else if (a <= 2.15e+151) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * ((y + t) / (y + (x + t)))
if (a <= (-1.15d+84)) then
tmp = t_1
else if (a <= (-0.95d0)) then
tmp = ((a * t) + (z * x)) / (x + t)
else if (a <= 3.4d-113) then
tmp = z - ((y * b) / (x + (y + t)))
else if (a <= 2.15d+151) then
tmp = (z + a) - b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * ((y + t) / (y + (x + t)));
double tmp;
if (a <= -1.15e+84) {
tmp = t_1;
} else if (a <= -0.95) {
tmp = ((a * t) + (z * x)) / (x + t);
} else if (a <= 3.4e-113) {
tmp = z - ((y * b) / (x + (y + t)));
} else if (a <= 2.15e+151) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * ((y + t) / (y + (x + t))) tmp = 0 if a <= -1.15e+84: tmp = t_1 elif a <= -0.95: tmp = ((a * t) + (z * x)) / (x + t) elif a <= 3.4e-113: tmp = z - ((y * b) / (x + (y + t))) elif a <= 2.15e+151: tmp = (z + a) - b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(Float64(y + t) / Float64(y + Float64(x + t)))) tmp = 0.0 if (a <= -1.15e+84) tmp = t_1; elseif (a <= -0.95) tmp = Float64(Float64(Float64(a * t) + Float64(z * x)) / Float64(x + t)); elseif (a <= 3.4e-113) tmp = Float64(z - Float64(Float64(y * b) / Float64(x + Float64(y + t)))); elseif (a <= 2.15e+151) tmp = Float64(Float64(z + a) - b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * ((y + t) / (y + (x + t))); tmp = 0.0; if (a <= -1.15e+84) tmp = t_1; elseif (a <= -0.95) tmp = ((a * t) + (z * x)) / (x + t); elseif (a <= 3.4e-113) tmp = z - ((y * b) / (x + (y + t))); elseif (a <= 2.15e+151) tmp = (z + a) - b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(N[(y + t), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.15e+84], t$95$1, If[LessEqual[a, -0.95], N[(N[(N[(a * t), $MachinePrecision] + N[(z * x), $MachinePrecision]), $MachinePrecision] / N[(x + t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.4e-113], N[(z - N[(N[(y * b), $MachinePrecision] / N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 2.15e+151], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \frac{y + t}{y + \left(x + t\right)}\\
\mathbf{if}\;a \leq -1.15 \cdot 10^{+84}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -0.95:\\
\;\;\;\;\frac{a \cdot t + z \cdot x}{x + t}\\
\mathbf{elif}\;a \leq 3.4 \cdot 10^{-113}:\\
\;\;\;\;z - \frac{y \cdot b}{x + \left(y + t\right)}\\
\mathbf{elif}\;a \leq 2.15 \cdot 10^{+151}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.1499999999999999e84 or 2.14999999999999991e151 < a Initial program 39.3%
Taylor expanded in a around inf 32.3%
associate-/l*75.1%
+-commutative75.1%
associate-+r+75.1%
+-commutative75.1%
associate-+l+75.1%
Simplified75.1%
if -1.1499999999999999e84 < a < -0.94999999999999996Initial program 60.7%
Taylor expanded in y around 0 63.2%
if -0.94999999999999996 < a < 3.4000000000000002e-113Initial program 74.8%
Taylor expanded in b around -inf 69.1%
mul-1-neg69.1%
distribute-rgt-neg-in69.1%
+-commutative69.1%
mul-1-neg69.1%
unsub-neg69.1%
Simplified83.5%
Taylor expanded in x around inf 64.6%
Taylor expanded in b around 0 66.2%
associate-*r/66.2%
neg-mul-166.2%
distribute-lft-neg-in66.2%
+-commutative66.2%
associate-+r+66.2%
+-commutative66.2%
Simplified66.2%
if 3.4000000000000002e-113 < a < 2.14999999999999991e151Initial program 61.7%
Taylor expanded in y around inf 61.9%
Final simplification68.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (/ (+ y t) (+ y (+ x t))))))
(if (<= a -3.1e+35)
t_1
(if (<= a 2.6e-133)
(* b (- (/ z b) (/ y (+ x y))))
(if (<= a 9.5e+152) (- (+ z a) b) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * ((y + t) / (y + (x + t)));
double tmp;
if (a <= -3.1e+35) {
tmp = t_1;
} else if (a <= 2.6e-133) {
tmp = b * ((z / b) - (y / (x + y)));
} else if (a <= 9.5e+152) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = a * ((y + t) / (y + (x + t)))
if (a <= (-3.1d+35)) then
tmp = t_1
else if (a <= 2.6d-133) then
tmp = b * ((z / b) - (y / (x + y)))
else if (a <= 9.5d+152) then
tmp = (z + a) - b
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * ((y + t) / (y + (x + t)));
double tmp;
if (a <= -3.1e+35) {
tmp = t_1;
} else if (a <= 2.6e-133) {
tmp = b * ((z / b) - (y / (x + y)));
} else if (a <= 9.5e+152) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * ((y + t) / (y + (x + t))) tmp = 0 if a <= -3.1e+35: tmp = t_1 elif a <= 2.6e-133: tmp = b * ((z / b) - (y / (x + y))) elif a <= 9.5e+152: tmp = (z + a) - b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(Float64(y + t) / Float64(y + Float64(x + t)))) tmp = 0.0 if (a <= -3.1e+35) tmp = t_1; elseif (a <= 2.6e-133) tmp = Float64(b * Float64(Float64(z / b) - Float64(y / Float64(x + y)))); elseif (a <= 9.5e+152) tmp = Float64(Float64(z + a) - b); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * ((y + t) / (y + (x + t))); tmp = 0.0; if (a <= -3.1e+35) tmp = t_1; elseif (a <= 2.6e-133) tmp = b * ((z / b) - (y / (x + y))); elseif (a <= 9.5e+152) tmp = (z + a) - b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(N[(y + t), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -3.1e+35], t$95$1, If[LessEqual[a, 2.6e-133], N[(b * N[(N[(z / b), $MachinePrecision] - N[(y / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 9.5e+152], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \frac{y + t}{y + \left(x + t\right)}\\
\mathbf{if}\;a \leq -3.1 \cdot 10^{+35}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 2.6 \cdot 10^{-133}:\\
\;\;\;\;b \cdot \left(\frac{z}{b} - \frac{y}{x + y}\right)\\
\mathbf{elif}\;a \leq 9.5 \cdot 10^{+152}:\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -3.09999999999999987e35 or 9.49999999999999916e152 < a Initial program 43.4%
Taylor expanded in a around inf 34.2%
associate-/l*72.7%
+-commutative72.7%
associate-+r+72.7%
+-commutative72.7%
associate-+l+72.7%
Simplified72.7%
if -3.09999999999999987e35 < a < 2.5999999999999999e-133Initial program 71.8%
Taylor expanded in b around -inf 68.0%
mul-1-neg68.0%
distribute-rgt-neg-in68.0%
+-commutative68.0%
mul-1-neg68.0%
unsub-neg68.0%
Simplified84.4%
Taylor expanded in x around inf 66.0%
Taylor expanded in t around 0 61.2%
+-commutative61.2%
Simplified61.2%
if 2.5999999999999999e-133 < a < 9.49999999999999916e152Initial program 63.2%
Taylor expanded in y around inf 62.1%
Final simplification65.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))))
(if (or (<= b -1.12e+178) (not (<= b 1.7e+170)))
(* b (- (/ a b) (/ y t_1)))
(+ (* a (/ (+ y t) t_1)) (- z b)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if ((b <= -1.12e+178) || !(b <= 1.7e+170)) {
tmp = b * ((a / b) - (y / t_1));
} else {
tmp = (a * ((y + t) / t_1)) + (z - b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y + (x + t)
if ((b <= (-1.12d+178)) .or. (.not. (b <= 1.7d+170))) then
tmp = b * ((a / b) - (y / t_1))
else
tmp = (a * ((y + t) / t_1)) + (z - b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if ((b <= -1.12e+178) || !(b <= 1.7e+170)) {
tmp = b * ((a / b) - (y / t_1));
} else {
tmp = (a * ((y + t) / t_1)) + (z - b);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) tmp = 0 if (b <= -1.12e+178) or not (b <= 1.7e+170): tmp = b * ((a / b) - (y / t_1)) else: tmp = (a * ((y + t) / t_1)) + (z - b) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) tmp = 0.0 if ((b <= -1.12e+178) || !(b <= 1.7e+170)) tmp = Float64(b * Float64(Float64(a / b) - Float64(y / t_1))); else tmp = Float64(Float64(a * Float64(Float64(y + t) / t_1)) + Float64(z - b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); tmp = 0.0; if ((b <= -1.12e+178) || ~((b <= 1.7e+170))) tmp = b * ((a / b) - (y / t_1)); else tmp = (a * ((y + t) / t_1)) + (z - b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[b, -1.12e+178], N[Not[LessEqual[b, 1.7e+170]], $MachinePrecision]], N[(b * N[(N[(a / b), $MachinePrecision] - N[(y / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(a * N[(N[(y + t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(z - b), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;b \leq -1.12 \cdot 10^{+178} \lor \neg \left(b \leq 1.7 \cdot 10^{+170}\right):\\
\;\;\;\;b \cdot \left(\frac{a}{b} - \frac{y}{t\_1}\right)\\
\mathbf{else}:\\
\;\;\;\;a \cdot \frac{y + t}{t\_1} + \left(z - b\right)\\
\end{array}
\end{array}
if b < -1.12000000000000001e178 or 1.7000000000000001e170 < b Initial program 45.2%
Taylor expanded in b around -inf 49.5%
mul-1-neg49.5%
distribute-rgt-neg-in49.5%
+-commutative49.5%
mul-1-neg49.5%
unsub-neg49.5%
Simplified93.4%
Taylor expanded in t around inf 70.0%
if -1.12000000000000001e178 < b < 1.7000000000000001e170Initial program 62.3%
Taylor expanded in b around 0 62.3%
mul-1-neg62.3%
+-commutative62.3%
associate-+l+62.3%
associate-/l*76.0%
+-commutative76.0%
associate-+r+76.0%
+-commutative76.0%
associate-+l+76.0%
sub-neg76.0%
div-sub75.9%
+-commutative75.9%
*-commutative75.9%
+-commutative75.9%
associate-+r+75.9%
+-commutative75.9%
associate-+l+75.9%
Simplified75.9%
Taylor expanded in y around inf 77.1%
Final simplification75.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -1.05e+128) (not (<= a 3.1e+154))) (* a (/ (+ y t) (+ y (+ x t)))) (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -1.05e+128) || !(a <= 3.1e+154)) {
tmp = a * ((y + t) / (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 ((a <= (-1.05d+128)) .or. (.not. (a <= 3.1d+154))) then
tmp = a * ((y + t) / (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 ((a <= -1.05e+128) || !(a <= 3.1e+154)) {
tmp = a * ((y + t) / (y + (x + t)));
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.05e+128) or not (a <= 3.1e+154): tmp = a * ((y + t) / (y + (x + t))) else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -1.05e+128) || !(a <= 3.1e+154)) tmp = Float64(a * Float64(Float64(y + t) / 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 ((a <= -1.05e+128) || ~((a <= 3.1e+154))) tmp = a * ((y + t) / (y + (x + t))); else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -1.05e+128], N[Not[LessEqual[a, 3.1e+154]], $MachinePrecision]], N[(a * N[(N[(y + t), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.05 \cdot 10^{+128} \lor \neg \left(a \leq 3.1 \cdot 10^{+154}\right):\\
\;\;\;\;a \cdot \frac{y + t}{y + \left(x + t\right)}\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if a < -1.05e128 or 3.1000000000000001e154 < a Initial program 39.0%
Taylor expanded in a around inf 30.9%
associate-/l*75.9%
+-commutative75.9%
associate-+r+75.9%
+-commutative75.9%
associate-+l+75.9%
Simplified75.9%
if -1.05e128 < a < 3.1000000000000001e154Initial program 67.3%
Taylor expanded in y around inf 57.3%
Final simplification63.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -4.5e+181) (not (<= b 1.35e+231))) (* (/ y (+ (+ x y) t)) (- b)) (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.5e+181) || !(b <= 1.35e+231)) {
tmp = (y / ((x + y) + t)) * -b;
} 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 <= (-4.5d+181)) .or. (.not. (b <= 1.35d+231))) then
tmp = (y / ((x + y) + t)) * -b
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 <= -4.5e+181) || !(b <= 1.35e+231)) {
tmp = (y / ((x + y) + t)) * -b;
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -4.5e+181) or not (b <= 1.35e+231): tmp = (y / ((x + y) + t)) * -b else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -4.5e+181) || !(b <= 1.35e+231)) tmp = Float64(Float64(y / Float64(Float64(x + y) + t)) * Float64(-b)); 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 <= -4.5e+181) || ~((b <= 1.35e+231))) tmp = (y / ((x + y) + t)) * -b; else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -4.5e+181], N[Not[LessEqual[b, 1.35e+231]], $MachinePrecision]], N[(N[(y / N[(N[(x + y), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision] * (-b)), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.5 \cdot 10^{+181} \lor \neg \left(b \leq 1.35 \cdot 10^{+231}\right):\\
\;\;\;\;\frac{y}{\left(x + y\right) + t} \cdot \left(-b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if b < -4.5e181 or 1.35e231 < b Initial program 49.3%
Taylor expanded in b around -inf 52.3%
mul-1-neg52.3%
distribute-rgt-neg-in52.3%
+-commutative52.3%
mul-1-neg52.3%
unsub-neg52.3%
Simplified92.5%
Taylor expanded in b around inf 32.3%
mul-1-neg32.3%
associate-/l*52.4%
associate-+r+52.4%
+-commutative52.4%
distribute-rgt-neg-out52.4%
distribute-neg-frac52.4%
+-commutative52.4%
associate-+r+52.4%
+-commutative52.4%
Simplified52.4%
if -4.5e181 < b < 1.35e231Initial program 60.8%
Taylor expanded in y around inf 63.7%
Final simplification61.7%
(FPCore (x y z t a b) :precision binary64 (if (or (<= x -4.4e+95) (not (<= x 3.2e-7))) (- z (/ (* y b) x)) (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((x <= -4.4e+95) || !(x <= 3.2e-7)) {
tmp = z - ((y * b) / x);
} 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 ((x <= (-4.4d+95)) .or. (.not. (x <= 3.2d-7))) then
tmp = z - ((y * b) / x)
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 ((x <= -4.4e+95) || !(x <= 3.2e-7)) {
tmp = z - ((y * b) / x);
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (x <= -4.4e+95) or not (x <= 3.2e-7): tmp = z - ((y * b) / x) else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((x <= -4.4e+95) || !(x <= 3.2e-7)) tmp = Float64(z - Float64(Float64(y * b) / x)); 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 ((x <= -4.4e+95) || ~((x <= 3.2e-7))) tmp = z - ((y * b) / x); else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[x, -4.4e+95], N[Not[LessEqual[x, 3.2e-7]], $MachinePrecision]], N[(z - N[(N[(y * b), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{+95} \lor \neg \left(x \leq 3.2 \cdot 10^{-7}\right):\\
\;\;\;\;z - \frac{y \cdot b}{x}\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if x < -4.3999999999999998e95 or 3.2000000000000001e-7 < x Initial program 50.9%
Taylor expanded in b around -inf 47.8%
mul-1-neg47.8%
distribute-rgt-neg-in47.8%
+-commutative47.8%
mul-1-neg47.8%
unsub-neg47.8%
Simplified78.8%
Taylor expanded in x around inf 50.9%
Taylor expanded in x around inf 52.2%
associate-*r/52.2%
neg-mul-152.2%
distribute-lft-neg-in52.2%
Simplified52.2%
if -4.3999999999999998e95 < x < 3.2000000000000001e-7Initial program 64.7%
Taylor expanded in y around inf 67.0%
Final simplification60.6%
(FPCore (x y z t a b) :precision binary64 (if (<= t -1.55e+162) a (if (<= t 4.5e-77) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -1.55e+162) {
tmp = a;
} else if (t <= 4.5e-77) {
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 (t <= (-1.55d+162)) then
tmp = a
else if (t <= 4.5d-77) 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 (t <= -1.55e+162) {
tmp = a;
} else if (t <= 4.5e-77) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -1.55e+162: tmp = a elif t <= 4.5e-77: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -1.55e+162) tmp = a; elseif (t <= 4.5e-77) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -1.55e+162) tmp = a; elseif (t <= 4.5e-77) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.55e+162], a, If[LessEqual[t, 4.5e-77], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.55 \cdot 10^{+162}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq 4.5 \cdot 10^{-77}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -1.55e162 or 4.5000000000000001e-77 < t Initial program 45.7%
Taylor expanded in t around inf 53.0%
if -1.55e162 < t < 4.5000000000000001e-77Initial program 68.3%
Taylor expanded in x around inf 45.3%
(FPCore (x y z t a b) :precision binary64 (- (+ z a) b))
double code(double x, double y, double z, double t, double a, double b) {
return (z + a) - b;
}
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 = (z + a) - b
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return (z + a) - b;
}
def code(x, y, z, t, a, b): return (z + a) - b
function code(x, y, z, t, a, b) return Float64(Float64(z + a) - b) end
function tmp = code(x, y, z, t, a, b) tmp = (z + a) - b; end
code[x_, y_, z_, t_, a_, b_] := N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]
\begin{array}{l}
\\
\left(z + a\right) - b
\end{array}
Initial program 58.7%
Taylor expanded in y around inf 56.7%
Final simplification56.7%
(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 58.7%
Taylor expanded in t around inf 32.7%
(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 2024100
(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)))