
(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 21 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 (+ y (+ x t))))
(if (<= x -5.6e+120)
(+ (/ (+ x y) (/ t_1 z)) (+ (/ y (/ t_1 (- a b))) (/ (* t a) t_1)))
(if (<= x 3.75e+140)
(+ (/ (- z b) (/ t_1 y)) (+ (/ a (/ t_1 (+ y t))) (/ (* x z) t_1)))
(+
(/ y (/ (+ x y) (- a b)))
(fma
t
(-
(/ a (+ x y))
(+ (/ z (+ x y)) (/ y (/ (pow (+ x y) 2.0) (- a b)))))
z))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if (x <= -5.6e+120) {
tmp = ((x + y) / (t_1 / z)) + ((y / (t_1 / (a - b))) + ((t * a) / t_1));
} else if (x <= 3.75e+140) {
tmp = ((z - b) / (t_1 / y)) + ((a / (t_1 / (y + t))) + ((x * z) / t_1));
} else {
tmp = (y / ((x + y) / (a - b))) + fma(t, ((a / (x + y)) - ((z / (x + y)) + (y / (pow((x + y), 2.0) / (a - b))))), z);
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) tmp = 0.0 if (x <= -5.6e+120) tmp = Float64(Float64(Float64(x + y) / Float64(t_1 / z)) + Float64(Float64(y / Float64(t_1 / Float64(a - b))) + Float64(Float64(t * a) / t_1))); elseif (x <= 3.75e+140) tmp = Float64(Float64(Float64(z - b) / Float64(t_1 / y)) + Float64(Float64(a / Float64(t_1 / Float64(y + t))) + Float64(Float64(x * z) / t_1))); else tmp = Float64(Float64(y / Float64(Float64(x + y) / Float64(a - b))) + fma(t, Float64(Float64(a / Float64(x + y)) - Float64(Float64(z / Float64(x + y)) + Float64(y / Float64((Float64(x + y) ^ 2.0) / Float64(a - b))))), z)); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -5.6e+120], N[(N[(N[(x + y), $MachinePrecision] / N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision] + N[(N[(y / N[(t$95$1 / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.75e+140], N[(N[(N[(z - b), $MachinePrecision] / N[(t$95$1 / y), $MachinePrecision]), $MachinePrecision] + N[(N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(x * z), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(N[(x + y), $MachinePrecision] / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(a / N[(x + y), $MachinePrecision]), $MachinePrecision] - N[(N[(z / N[(x + y), $MachinePrecision]), $MachinePrecision] + N[(y / N[(N[Power[N[(x + y), $MachinePrecision], 2.0], $MachinePrecision] / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + z), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;x \leq -5.6 \cdot 10^{+120}:\\
\;\;\;\;\frac{x + y}{\frac{t_1}{z}} + \left(\frac{y}{\frac{t_1}{a - b}} + \frac{t \cdot a}{t_1}\right)\\
\mathbf{elif}\;x \leq 3.75 \cdot 10^{+140}:\\
\;\;\;\;\frac{z - b}{\frac{t_1}{y}} + \left(\frac{a}{\frac{t_1}{y + t}} + \frac{x \cdot z}{t_1}\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\frac{x + y}{a - b}} + \mathsf{fma}\left(t, \frac{a}{x + y} - \left(\frac{z}{x + y} + \frac{y}{\frac{{\left(x + y\right)}^{2}}{a - b}}\right), z\right)\\
\end{array}
\end{array}
if x < -5.6000000000000001e120Initial program 53.6%
Simplified53.7%
Taylor expanded in z around inf 53.7%
associate-/l*77.8%
associate-/l*91.5%
Simplified91.5%
if -5.6000000000000001e120 < x < 3.7499999999999999e140Initial program 72.1%
Simplified72.5%
Taylor expanded in a around inf 72.3%
associate-/l*79.0%
+-commutative79.0%
associate-/l*95.2%
Simplified95.2%
if 3.7499999999999999e140 < x Initial program 47.8%
*-commutative47.8%
distribute-rgt-in47.6%
associate-+r+47.6%
associate--l+47.6%
+-commutative47.6%
+-commutative47.6%
distribute-lft-out--47.9%
fma-def48.5%
+-commutative48.5%
fma-def48.8%
associate-+l+48.8%
+-commutative48.8%
Simplified48.8%
Taylor expanded in t around 0 73.0%
associate-/l*65.4%
*-commutative65.4%
fma-def65.4%
+-commutative65.4%
associate-/l*84.6%
Simplified84.6%
Final simplification93.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ (- (+ (* (+ x y) z) (* a (+ y t))) (* y b)) t_1)))
(if (<= t_2 -1e+246)
(+ (* (+ y t) (/ a t_1)) (* z (/ (+ x y) t_1)))
(if (<= t_2 2e+307)
(/ (fma x z (fma y (+ a (- z b)) (* t a))) (+ x (+ y t)))
(+ (/ (+ x y) (/ t_1 z)) (+ (/ y (/ t_1 (- a b))) (/ (* t a) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1;
double tmp;
if (t_2 <= -1e+246) {
tmp = ((y + t) * (a / t_1)) + (z * ((x + y) / t_1));
} else if (t_2 <= 2e+307) {
tmp = fma(x, z, fma(y, (a + (z - b)), (t * a))) / (x + (y + t));
} else {
tmp = ((x + y) / (t_1 / z)) + ((y / (t_1 / (a - b))) + ((t * a) / t_1));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(a * Float64(y + t))) - Float64(y * b)) / t_1) tmp = 0.0 if (t_2 <= -1e+246) tmp = Float64(Float64(Float64(y + t) * Float64(a / t_1)) + Float64(z * Float64(Float64(x + y) / t_1))); elseif (t_2 <= 2e+307) tmp = Float64(fma(x, z, fma(y, Float64(a + Float64(z - b)), Float64(t * a))) / Float64(x + Float64(y + t))); else tmp = Float64(Float64(Float64(x + y) / Float64(t_1 / z)) + Float64(Float64(y / Float64(t_1 / Float64(a - b))) + Float64(Float64(t * a) / t_1))); end return 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[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+246], N[(N[(N[(y + t), $MachinePrecision] * N[(a / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+307], N[(N[(x * z + N[(y * N[(a + N[(z - b), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x + y), $MachinePrecision] / N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision] + N[(N[(y / N[(t$95$1 / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{t_1}\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{+246}:\\
\;\;\;\;\left(y + t\right) \cdot \frac{a}{t_1} + z \cdot \frac{x + y}{t_1}\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, z, \mathsf{fma}\left(y, a + \left(z - b\right), t \cdot a\right)\right)}{x + \left(y + t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y}{\frac{t_1}{z}} + \left(\frac{y}{\frac{t_1}{a - b}} + \frac{t \cdot a}{t_1}\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)) < -1.00000000000000007e246Initial program 11.7%
Taylor expanded in b around 0 11.5%
Taylor expanded in a around inf 11.5%
associate-/l*47.2%
+-commutative47.2%
associate-/r/47.0%
*-commutative47.0%
associate-*l/85.8%
*-commutative85.8%
Simplified85.8%
if -1.00000000000000007e246 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.99999999999999997e307Initial program 99.7%
Simplified99.7%
if 1.99999999999999997e307 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 4.5%
Simplified6.0%
Taylor expanded in z around inf 4.5%
associate-/l*31.0%
associate-/l*76.0%
Simplified76.0%
Final simplification92.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ (- (+ (* (+ x y) z) (* a (+ y t))) (* y b)) t_1)))
(if (<= t_2 -1e+246)
(+ (* (+ y t) (/ a t_1)) (* z (/ (+ x y) t_1)))
(if (<= t_2 2e+307)
(/ (fma y (- a b) (fma (+ x y) z (* t a))) (+ x (+ y t)))
(+ (/ (+ x y) (/ t_1 z)) (+ (/ y (/ t_1 (- a b))) (/ (* t a) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1;
double tmp;
if (t_2 <= -1e+246) {
tmp = ((y + t) * (a / t_1)) + (z * ((x + y) / t_1));
} else if (t_2 <= 2e+307) {
tmp = fma(y, (a - b), fma((x + y), z, (t * a))) / (x + (y + t));
} else {
tmp = ((x + y) / (t_1 / z)) + ((y / (t_1 / (a - b))) + ((t * a) / t_1));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(a * Float64(y + t))) - Float64(y * b)) / t_1) tmp = 0.0 if (t_2 <= -1e+246) tmp = Float64(Float64(Float64(y + t) * Float64(a / t_1)) + Float64(z * Float64(Float64(x + y) / t_1))); elseif (t_2 <= 2e+307) tmp = Float64(fma(y, Float64(a - b), fma(Float64(x + y), z, Float64(t * a))) / Float64(x + Float64(y + t))); else tmp = Float64(Float64(Float64(x + y) / Float64(t_1 / z)) + Float64(Float64(y / Float64(t_1 / Float64(a - b))) + Float64(Float64(t * a) / t_1))); end return 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[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+246], N[(N[(N[(y + t), $MachinePrecision] * N[(a / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+307], N[(N[(y * N[(a - b), $MachinePrecision] + N[(N[(x + y), $MachinePrecision] * z + N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x + y), $MachinePrecision] / N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision] + N[(N[(y / N[(t$95$1 / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{t_1}\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{+246}:\\
\;\;\;\;\left(y + t\right) \cdot \frac{a}{t_1} + z \cdot \frac{x + y}{t_1}\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, a - b, \mathsf{fma}\left(x + y, z, t \cdot a\right)\right)}{x + \left(y + t\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y}{\frac{t_1}{z}} + \left(\frac{y}{\frac{t_1}{a - b}} + \frac{t \cdot a}{t_1}\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)) < -1.00000000000000007e246Initial program 11.7%
Taylor expanded in b around 0 11.5%
Taylor expanded in a around inf 11.5%
associate-/l*47.2%
+-commutative47.2%
associate-/r/47.0%
*-commutative47.0%
associate-*l/85.8%
*-commutative85.8%
Simplified85.8%
if -1.00000000000000007e246 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.99999999999999997e307Initial program 99.7%
*-commutative99.7%
distribute-rgt-in99.7%
associate-+r+99.7%
associate--l+99.7%
+-commutative99.7%
+-commutative99.7%
distribute-lft-out--99.7%
fma-def99.7%
+-commutative99.7%
fma-def99.7%
associate-+l+99.7%
+-commutative99.7%
Simplified99.7%
if 1.99999999999999997e307 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 4.5%
Simplified6.0%
Taylor expanded in z around inf 4.5%
associate-/l*31.0%
associate-/l*76.0%
Simplified76.0%
Final simplification92.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ (- (+ (* (+ x y) z) (* a (+ y t))) (* y b)) t_1)))
(if (<= t_2 -1e+246)
(+ (* (+ y t) (/ a t_1)) (* z (/ (+ x y) t_1)))
(if (<= t_2 2e+307)
t_2
(+ (/ (+ x y) (/ t_1 z)) (+ (/ y (/ t_1 (- a b))) (/ (* t a) t_1)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1;
double tmp;
if (t_2 <= -1e+246) {
tmp = ((y + t) * (a / t_1)) + (z * ((x + y) / t_1));
} else if (t_2 <= 2e+307) {
tmp = t_2;
} else {
tmp = ((x + y) / (t_1 / z)) + ((y / (t_1 / (a - b))) + ((t * a) / t_1));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y + (x + t)
t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1
if (t_2 <= (-1d+246)) then
tmp = ((y + t) * (a / t_1)) + (z * ((x + y) / t_1))
else if (t_2 <= 2d+307) then
tmp = t_2
else
tmp = ((x + y) / (t_1 / z)) + ((y / (t_1 / (a - b))) + ((t * a) / t_1))
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1;
double tmp;
if (t_2 <= -1e+246) {
tmp = ((y + t) * (a / t_1)) + (z * ((x + y) / t_1));
} else if (t_2 <= 2e+307) {
tmp = t_2;
} else {
tmp = ((x + y) / (t_1 / z)) + ((y / (t_1 / (a - b))) + ((t * a) / t_1));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1 tmp = 0 if t_2 <= -1e+246: tmp = ((y + t) * (a / t_1)) + (z * ((x + y) / t_1)) elif t_2 <= 2e+307: tmp = t_2 else: tmp = ((x + y) / (t_1 / z)) + ((y / (t_1 / (a - b))) + ((t * a) / t_1)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(a * Float64(y + t))) - Float64(y * b)) / t_1) tmp = 0.0 if (t_2 <= -1e+246) tmp = Float64(Float64(Float64(y + t) * Float64(a / t_1)) + Float64(z * Float64(Float64(x + y) / t_1))); elseif (t_2 <= 2e+307) tmp = t_2; else tmp = Float64(Float64(Float64(x + y) / Float64(t_1 / z)) + Float64(Float64(y / Float64(t_1 / Float64(a - b))) + Float64(Float64(t * a) / t_1))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1; tmp = 0.0; if (t_2 <= -1e+246) tmp = ((y + t) * (a / t_1)) + (z * ((x + y) / t_1)); elseif (t_2 <= 2e+307) tmp = t_2; else tmp = ((x + y) / (t_1 / z)) + ((y / (t_1 / (a - b))) + ((t * a) / t_1)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+246], N[(N[(N[(y + t), $MachinePrecision] * N[(a / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+307], t$95$2, N[(N[(N[(x + y), $MachinePrecision] / N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision] + N[(N[(y / N[(t$95$1 / N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t * a), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{t_1}\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{+246}:\\
\;\;\;\;\left(y + t\right) \cdot \frac{a}{t_1} + z \cdot \frac{x + y}{t_1}\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x + y}{\frac{t_1}{z}} + \left(\frac{y}{\frac{t_1}{a - b}} + \frac{t \cdot a}{t_1}\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)) < -1.00000000000000007e246Initial program 11.7%
Taylor expanded in b around 0 11.5%
Taylor expanded in a around inf 11.5%
associate-/l*47.2%
+-commutative47.2%
associate-/r/47.0%
*-commutative47.0%
associate-*l/85.8%
*-commutative85.8%
Simplified85.8%
if -1.00000000000000007e246 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.99999999999999997e307Initial program 99.7%
if 1.99999999999999997e307 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 4.5%
Simplified6.0%
Taylor expanded in z around inf 4.5%
associate-/l*31.0%
associate-/l*76.0%
Simplified76.0%
Final simplification92.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ (- (+ (* (+ x y) z) (* a (+ y t))) (* y b)) t_1)))
(if (or (<= t_2 -1e+246) (not (<= t_2 2e+296)))
(+ (* (+ y t) (/ a t_1)) (* z (/ (+ x y) t_1)))
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 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1;
double tmp;
if ((t_2 <= -1e+246) || !(t_2 <= 2e+296)) {
tmp = ((y + t) * (a / t_1)) + (z * ((x + 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 = y + (x + t)
t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1
if ((t_2 <= (-1d+246)) .or. (.not. (t_2 <= 2d+296))) then
tmp = ((y + t) * (a / t_1)) + (z * ((x + 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 = y + (x + t);
double t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1;
double tmp;
if ((t_2 <= -1e+246) || !(t_2 <= 2e+296)) {
tmp = ((y + t) * (a / t_1)) + (z * ((x + y) / t_1));
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1 tmp = 0 if (t_2 <= -1e+246) or not (t_2 <= 2e+296): tmp = ((y + t) * (a / t_1)) + (z * ((x + y) / t_1)) 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(Float64(x + y) * z) + Float64(a * Float64(y + t))) - Float64(y * b)) / t_1) tmp = 0.0 if ((t_2 <= -1e+246) || !(t_2 <= 2e+296)) tmp = Float64(Float64(Float64(y + t) * Float64(a / t_1)) + Float64(z * Float64(Float64(x + y) / t_1))); 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 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / t_1; tmp = 0.0; if ((t_2 <= -1e+246) || ~((t_2 <= 2e+296))) tmp = ((y + t) * (a / t_1)) + (z * ((x + y) / t_1)); 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[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[Or[LessEqual[t$95$2, -1e+246], N[Not[LessEqual[t$95$2, 2e+296]], $MachinePrecision]], N[(N[(N[(y + t), $MachinePrecision] * N[(a / t$95$1), $MachinePrecision]), $MachinePrecision] + N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{t_1}\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{+246} \lor \neg \left(t_2 \leq 2 \cdot 10^{+296}\right):\\
\;\;\;\;\left(y + t\right) \cdot \frac{a}{t_1} + z \cdot \frac{x + y}{t_1}\\
\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.00000000000000007e246 or 1.99999999999999996e296 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 8.1%
Taylor expanded in b around 0 7.8%
Taylor expanded in a around inf 7.8%
associate-/l*33.0%
+-commutative33.0%
associate-/r/32.8%
*-commutative32.8%
associate-*l/79.1%
*-commutative79.1%
Simplified79.1%
if -1.00000000000000007e246 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.99999999999999996e296Initial program 99.7%
Final simplification92.1%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (/ (- (+ (* (+ x y) z) (* a (+ y t))) (* y b)) (+ y (+ x t))))) (if (or (<= t_1 (- INFINITY)) (not (<= t_1 2e+307))) (- (+ z a) b) t_1)))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -((double) INFINITY)) || !(t_1 <= 2e+307)) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / (y + (x + t));
double tmp;
if ((t_1 <= -Double.POSITIVE_INFINITY) || !(t_1 <= 2e+307)) {
tmp = (z + a) - b;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / (y + (x + t)) tmp = 0 if (t_1 <= -math.inf) or not (t_1 <= 2e+307): tmp = (z + a) - b else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(Float64(Float64(x + y) * z) + Float64(a * Float64(y + t))) - Float64(y * b)) / Float64(y + Float64(x + t))) tmp = 0.0 if ((t_1 <= Float64(-Inf)) || !(t_1 <= 2e+307)) 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 = ((((x + y) * z) + (a * (y + t))) - (y * b)) / (y + (x + t)); tmp = 0.0; if ((t_1 <= -Inf) || ~((t_1 <= 2e+307))) tmp = (z + a) - b; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(a * N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, (-Infinity)], N[Not[LessEqual[t$95$1, 2e+307]], $MachinePrecision]], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision], t$95$1]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \frac{\left(\left(x + y\right) \cdot z + a \cdot \left(y + t\right)\right) - y \cdot b}{y + \left(x + t\right)}\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 2 \cdot 10^{+307}\right):\\
\;\;\;\;\left(z + a\right) - b\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < -inf.0 or 1.99999999999999997e307 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) Initial program 5.1%
Taylor expanded in y around inf 66.3%
+-commutative66.3%
Simplified66.3%
if -inf.0 < (/.f64 (-.f64 (+.f64 (*.f64 (+.f64 x y) z) (*.f64 (+.f64 t y) a)) (*.f64 y b)) (+.f64 (+.f64 x t) y)) < 1.99999999999999997e307Initial program 99.7%
Final simplification87.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ a (/ t_1 (+ y t))))
(t_3 (- (+ z a) b))
(t_4 (/ (- (* x z) (* y b)) t_1)))
(if (<= y -2.65e+36)
t_3
(if (<= y -1.3e-69)
t_2
(if (<= y -4.3e-180)
(* z (/ (+ x y) t_1))
(if (<= y -4e-209)
(/ (- (* t a) (* y b)) t_1)
(if (<= y -9.5e-229)
(+ z a)
(if (<= y -4.1e-274)
t_2
(if (<= y 5.5e-266)
t_4
(if (<= y 1.8e-184) t_2 (if (<= y 4.6e-43) t_4 t_3)))))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = a / (t_1 / (y + t));
double t_3 = (z + a) - b;
double t_4 = ((x * z) - (y * b)) / t_1;
double tmp;
if (y <= -2.65e+36) {
tmp = t_3;
} else if (y <= -1.3e-69) {
tmp = t_2;
} else if (y <= -4.3e-180) {
tmp = z * ((x + y) / t_1);
} else if (y <= -4e-209) {
tmp = ((t * a) - (y * b)) / t_1;
} else if (y <= -9.5e-229) {
tmp = z + a;
} else if (y <= -4.1e-274) {
tmp = t_2;
} else if (y <= 5.5e-266) {
tmp = t_4;
} else if (y <= 1.8e-184) {
tmp = t_2;
} else if (y <= 4.6e-43) {
tmp = t_4;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = y + (x + t)
t_2 = a / (t_1 / (y + t))
t_3 = (z + a) - b
t_4 = ((x * z) - (y * b)) / t_1
if (y <= (-2.65d+36)) then
tmp = t_3
else if (y <= (-1.3d-69)) then
tmp = t_2
else if (y <= (-4.3d-180)) then
tmp = z * ((x + y) / t_1)
else if (y <= (-4d-209)) then
tmp = ((t * a) - (y * b)) / t_1
else if (y <= (-9.5d-229)) then
tmp = z + a
else if (y <= (-4.1d-274)) then
tmp = t_2
else if (y <= 5.5d-266) then
tmp = t_4
else if (y <= 1.8d-184) then
tmp = t_2
else if (y <= 4.6d-43) then
tmp = t_4
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = a / (t_1 / (y + t));
double t_3 = (z + a) - b;
double t_4 = ((x * z) - (y * b)) / t_1;
double tmp;
if (y <= -2.65e+36) {
tmp = t_3;
} else if (y <= -1.3e-69) {
tmp = t_2;
} else if (y <= -4.3e-180) {
tmp = z * ((x + y) / t_1);
} else if (y <= -4e-209) {
tmp = ((t * a) - (y * b)) / t_1;
} else if (y <= -9.5e-229) {
tmp = z + a;
} else if (y <= -4.1e-274) {
tmp = t_2;
} else if (y <= 5.5e-266) {
tmp = t_4;
} else if (y <= 1.8e-184) {
tmp = t_2;
} else if (y <= 4.6e-43) {
tmp = t_4;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = a / (t_1 / (y + t)) t_3 = (z + a) - b t_4 = ((x * z) - (y * b)) / t_1 tmp = 0 if y <= -2.65e+36: tmp = t_3 elif y <= -1.3e-69: tmp = t_2 elif y <= -4.3e-180: tmp = z * ((x + y) / t_1) elif y <= -4e-209: tmp = ((t * a) - (y * b)) / t_1 elif y <= -9.5e-229: tmp = z + a elif y <= -4.1e-274: tmp = t_2 elif y <= 5.5e-266: tmp = t_4 elif y <= 1.8e-184: tmp = t_2 elif y <= 4.6e-43: tmp = t_4 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(a / Float64(t_1 / Float64(y + t))) t_3 = Float64(Float64(z + a) - b) t_4 = Float64(Float64(Float64(x * z) - Float64(y * b)) / t_1) tmp = 0.0 if (y <= -2.65e+36) tmp = t_3; elseif (y <= -1.3e-69) tmp = t_2; elseif (y <= -4.3e-180) tmp = Float64(z * Float64(Float64(x + y) / t_1)); elseif (y <= -4e-209) tmp = Float64(Float64(Float64(t * a) - Float64(y * b)) / t_1); elseif (y <= -9.5e-229) tmp = Float64(z + a); elseif (y <= -4.1e-274) tmp = t_2; elseif (y <= 5.5e-266) tmp = t_4; elseif (y <= 1.8e-184) tmp = t_2; elseif (y <= 4.6e-43) tmp = t_4; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = a / (t_1 / (y + t)); t_3 = (z + a) - b; t_4 = ((x * z) - (y * b)) / t_1; tmp = 0.0; if (y <= -2.65e+36) tmp = t_3; elseif (y <= -1.3e-69) tmp = t_2; elseif (y <= -4.3e-180) tmp = z * ((x + y) / t_1); elseif (y <= -4e-209) tmp = ((t * a) - (y * b)) / t_1; elseif (y <= -9.5e-229) tmp = z + a; elseif (y <= -4.1e-274) tmp = t_2; elseif (y <= 5.5e-266) tmp = t_4; elseif (y <= 1.8e-184) tmp = t_2; elseif (y <= 4.6e-43) tmp = t_4; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$4 = N[(N[(N[(x * z), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[y, -2.65e+36], t$95$3, If[LessEqual[y, -1.3e-69], t$95$2, If[LessEqual[y, -4.3e-180], N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4e-209], N[(N[(N[(t * a), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[y, -9.5e-229], N[(z + a), $MachinePrecision], If[LessEqual[y, -4.1e-274], t$95$2, If[LessEqual[y, 5.5e-266], t$95$4, If[LessEqual[y, 1.8e-184], t$95$2, If[LessEqual[y, 4.6e-43], t$95$4, t$95$3]]]]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{a}{\frac{t_1}{y + t}}\\
t_3 := \left(z + a\right) - b\\
t_4 := \frac{x \cdot z - y \cdot b}{t_1}\\
\mathbf{if}\;y \leq -2.65 \cdot 10^{+36}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq -1.3 \cdot 10^{-69}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -4.3 \cdot 10^{-180}:\\
\;\;\;\;z \cdot \frac{x + y}{t_1}\\
\mathbf{elif}\;y \leq -4 \cdot 10^{-209}:\\
\;\;\;\;\frac{t \cdot a - y \cdot b}{t_1}\\
\mathbf{elif}\;y \leq -9.5 \cdot 10^{-229}:\\
\;\;\;\;z + a\\
\mathbf{elif}\;y \leq -4.1 \cdot 10^{-274}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 5.5 \cdot 10^{-266}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y \leq 1.8 \cdot 10^{-184}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-43}:\\
\;\;\;\;t_4\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y < -2.65e36 or 4.5999999999999998e-43 < y Initial program 47.6%
Taylor expanded in y around inf 70.0%
+-commutative70.0%
Simplified70.0%
if -2.65e36 < y < -1.3000000000000001e-69 or -9.4999999999999997e-229 < y < -4.09999999999999987e-274 or 5.50000000000000026e-266 < y < 1.8000000000000001e-184Initial program 77.0%
Taylor expanded in a around inf 47.4%
associate-/l*60.3%
Simplified60.3%
if -1.3000000000000001e-69 < y < -4.2999999999999996e-180Initial program 86.2%
Taylor expanded in z around inf 63.2%
associate-/l*52.4%
Simplified52.4%
associate-/r/74.7%
Applied egg-rr74.7%
if -4.2999999999999996e-180 < y < -4.0000000000000002e-209Initial program 99.5%
Taylor expanded in t around inf 87.8%
if -4.0000000000000002e-209 < y < -9.4999999999999997e-229Initial program 62.3%
Taylor expanded in b around 0 62.3%
Taylor expanded in y around inf 81.3%
+-commutative81.3%
Simplified81.3%
if -4.09999999999999987e-274 < y < 5.50000000000000026e-266 or 1.8000000000000001e-184 < y < 4.5999999999999998e-43Initial program 91.6%
Taylor expanded in x around inf 72.2%
Final simplification69.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t)))
(t_2 (/ (- (* t a) (* y b)) t_1))
(t_3 (- (+ z a) b))
(t_4 (* z (/ (+ x y) t_1))))
(if (<= y -4.1e+36)
t_3
(if (<= y -1.2e-69)
(/ a (/ t_1 (+ y t)))
(if (<= y -5.1e-172)
t_4
(if (<= y -2.05e-209)
t_2
(if (<= y 2.5e-293) t_4 (if (<= y 4e-57) t_2 t_3))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = ((t * a) - (y * b)) / t_1;
double t_3 = (z + a) - b;
double t_4 = z * ((x + y) / t_1);
double tmp;
if (y <= -4.1e+36) {
tmp = t_3;
} else if (y <= -1.2e-69) {
tmp = a / (t_1 / (y + t));
} else if (y <= -5.1e-172) {
tmp = t_4;
} else if (y <= -2.05e-209) {
tmp = t_2;
} else if (y <= 2.5e-293) {
tmp = t_4;
} else if (y <= 4e-57) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = y + (x + t)
t_2 = ((t * a) - (y * b)) / t_1
t_3 = (z + a) - b
t_4 = z * ((x + y) / t_1)
if (y <= (-4.1d+36)) then
tmp = t_3
else if (y <= (-1.2d-69)) then
tmp = a / (t_1 / (y + t))
else if (y <= (-5.1d-172)) then
tmp = t_4
else if (y <= (-2.05d-209)) then
tmp = t_2
else if (y <= 2.5d-293) then
tmp = t_4
else if (y <= 4d-57) then
tmp = t_2
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double t_2 = ((t * a) - (y * b)) / t_1;
double t_3 = (z + a) - b;
double t_4 = z * ((x + y) / t_1);
double tmp;
if (y <= -4.1e+36) {
tmp = t_3;
} else if (y <= -1.2e-69) {
tmp = a / (t_1 / (y + t));
} else if (y <= -5.1e-172) {
tmp = t_4;
} else if (y <= -2.05e-209) {
tmp = t_2;
} else if (y <= 2.5e-293) {
tmp = t_4;
} else if (y <= 4e-57) {
tmp = t_2;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) t_2 = ((t * a) - (y * b)) / t_1 t_3 = (z + a) - b t_4 = z * ((x + y) / t_1) tmp = 0 if y <= -4.1e+36: tmp = t_3 elif y <= -1.2e-69: tmp = a / (t_1 / (y + t)) elif y <= -5.1e-172: tmp = t_4 elif y <= -2.05e-209: tmp = t_2 elif y <= 2.5e-293: tmp = t_4 elif y <= 4e-57: tmp = t_2 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) t_2 = Float64(Float64(Float64(t * a) - Float64(y * b)) / t_1) t_3 = Float64(Float64(z + a) - b) t_4 = Float64(z * Float64(Float64(x + y) / t_1)) tmp = 0.0 if (y <= -4.1e+36) tmp = t_3; elseif (y <= -1.2e-69) tmp = Float64(a / Float64(t_1 / Float64(y + t))); elseif (y <= -5.1e-172) tmp = t_4; elseif (y <= -2.05e-209) tmp = t_2; elseif (y <= 2.5e-293) tmp = t_4; elseif (y <= 4e-57) tmp = t_2; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); t_2 = ((t * a) - (y * b)) / t_1; t_3 = (z + a) - b; t_4 = z * ((x + y) / t_1); tmp = 0.0; if (y <= -4.1e+36) tmp = t_3; elseif (y <= -1.2e-69) tmp = a / (t_1 / (y + t)); elseif (y <= -5.1e-172) tmp = t_4; elseif (y <= -2.05e-209) tmp = t_2; elseif (y <= 2.5e-293) tmp = t_4; elseif (y <= 4e-57) tmp = t_2; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t * a), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$4 = N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.1e+36], t$95$3, If[LessEqual[y, -1.2e-69], N[(a / N[(t$95$1 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.1e-172], t$95$4, If[LessEqual[y, -2.05e-209], t$95$2, If[LessEqual[y, 2.5e-293], t$95$4, If[LessEqual[y, 4e-57], t$95$2, t$95$3]]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
t_2 := \frac{t \cdot a - y \cdot b}{t_1}\\
t_3 := \left(z + a\right) - b\\
t_4 := z \cdot \frac{x + y}{t_1}\\
\mathbf{if}\;y \leq -4.1 \cdot 10^{+36}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;y \leq -1.2 \cdot 10^{-69}:\\
\;\;\;\;\frac{a}{\frac{t_1}{y + t}}\\
\mathbf{elif}\;y \leq -5.1 \cdot 10^{-172}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y \leq -2.05 \cdot 10^{-209}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 2.5 \cdot 10^{-293}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;y \leq 4 \cdot 10^{-57}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if y < -4.10000000000000013e36 or 3.99999999999999982e-57 < y Initial program 49.2%
Taylor expanded in y around inf 69.5%
+-commutative69.5%
Simplified69.5%
if -4.10000000000000013e36 < y < -1.2000000000000001e-69Initial program 79.6%
Taylor expanded in a around inf 43.7%
associate-/l*57.2%
Simplified57.2%
if -1.2000000000000001e-69 < y < -5.0999999999999998e-172 or -2.04999999999999989e-209 < y < 2.5000000000000001e-293Initial program 85.3%
Taylor expanded in z around inf 56.5%
associate-/l*47.7%
Simplified47.7%
associate-/r/63.7%
Applied egg-rr63.7%
if -5.0999999999999998e-172 < y < -2.04999999999999989e-209 or 2.5000000000000001e-293 < y < 3.99999999999999982e-57Initial program 84.6%
Taylor expanded in t around inf 55.4%
Final simplification64.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b))
(t_2 (+ y (+ x t)))
(t_3 (- z (* y (- (/ b x) (/ a x))))))
(if (<= x -3.8e+70)
t_3
(if (<= x -6700000.0)
(* z (/ (+ x y) t_2))
(if (<= x -6.6e-59)
(/ (- y) (/ t_2 b))
(if (<= x -4.2e-130)
t_1
(if (<= x -1.6e-202) a (if (<= x 4.8e+18) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = z - (y * ((b / x) - (a / x)));
double tmp;
if (x <= -3.8e+70) {
tmp = t_3;
} else if (x <= -6700000.0) {
tmp = z * ((x + y) / t_2);
} else if (x <= -6.6e-59) {
tmp = -y / (t_2 / b);
} else if (x <= -4.2e-130) {
tmp = t_1;
} else if (x <= -1.6e-202) {
tmp = a;
} else if (x <= 4.8e+18) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (z + a) - b
t_2 = y + (x + t)
t_3 = z - (y * ((b / x) - (a / x)))
if (x <= (-3.8d+70)) then
tmp = t_3
else if (x <= (-6700000.0d0)) then
tmp = z * ((x + y) / t_2)
else if (x <= (-6.6d-59)) then
tmp = -y / (t_2 / b)
else if (x <= (-4.2d-130)) then
tmp = t_1
else if (x <= (-1.6d-202)) then
tmp = a
else if (x <= 4.8d+18) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = z - (y * ((b / x) - (a / x)));
double tmp;
if (x <= -3.8e+70) {
tmp = t_3;
} else if (x <= -6700000.0) {
tmp = z * ((x + y) / t_2);
} else if (x <= -6.6e-59) {
tmp = -y / (t_2 / b);
} else if (x <= -4.2e-130) {
tmp = t_1;
} else if (x <= -1.6e-202) {
tmp = a;
} else if (x <= 4.8e+18) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = y + (x + t) t_3 = z - (y * ((b / x) - (a / x))) tmp = 0 if x <= -3.8e+70: tmp = t_3 elif x <= -6700000.0: tmp = z * ((x + y) / t_2) elif x <= -6.6e-59: tmp = -y / (t_2 / b) elif x <= -4.2e-130: tmp = t_1 elif x <= -1.6e-202: tmp = a elif x <= 4.8e+18: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(z - Float64(y * Float64(Float64(b / x) - Float64(a / x)))) tmp = 0.0 if (x <= -3.8e+70) tmp = t_3; elseif (x <= -6700000.0) tmp = Float64(z * Float64(Float64(x + y) / t_2)); elseif (x <= -6.6e-59) tmp = Float64(Float64(-y) / Float64(t_2 / b)); elseif (x <= -4.2e-130) tmp = t_1; elseif (x <= -1.6e-202) tmp = a; elseif (x <= 4.8e+18) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = y + (x + t); t_3 = z - (y * ((b / x) - (a / x))); tmp = 0.0; if (x <= -3.8e+70) tmp = t_3; elseif (x <= -6700000.0) tmp = z * ((x + y) / t_2); elseif (x <= -6.6e-59) tmp = -y / (t_2 / b); elseif (x <= -4.2e-130) tmp = t_1; elseif (x <= -1.6e-202) tmp = a; elseif (x <= 4.8e+18) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z - N[(y * N[(N[(b / x), $MachinePrecision] - N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.8e+70], t$95$3, If[LessEqual[x, -6700000.0], N[(z * N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.6e-59], N[((-y) / N[(t$95$2 / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4.2e-130], t$95$1, If[LessEqual[x, -1.6e-202], a, If[LessEqual[x, 4.8e+18], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := y + \left(x + t\right)\\
t_3 := z - y \cdot \left(\frac{b}{x} - \frac{a}{x}\right)\\
\mathbf{if}\;x \leq -3.8 \cdot 10^{+70}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -6700000:\\
\;\;\;\;z \cdot \frac{x + y}{t_2}\\
\mathbf{elif}\;x \leq -6.6 \cdot 10^{-59}:\\
\;\;\;\;\frac{-y}{\frac{t_2}{b}}\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-202}:\\
\;\;\;\;a\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+18}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if x < -3.7999999999999998e70 or 4.8e18 < x Initial program 58.8%
Simplified59.0%
Taylor expanded in x around inf 51.8%
+-commutative51.8%
associate-+r+51.8%
associate-/l*51.6%
associate-/l*54.7%
+-commutative54.7%
Simplified54.7%
Taylor expanded in t around 0 48.2%
associate--l+49.1%
+-commutative49.1%
associate-+r-49.1%
associate-*l/51.3%
associate-/l*59.5%
Simplified59.5%
Taylor expanded in y around 0 61.7%
if -3.7999999999999998e70 < x < -6.7e6Initial program 62.0%
Taylor expanded in z around inf 48.3%
associate-/l*61.3%
Simplified61.3%
associate-/r/61.2%
Applied egg-rr61.2%
if -6.7e6 < x < -6.59999999999999964e-59Initial program 92.4%
Taylor expanded in b around inf 68.4%
mul-1-neg68.4%
associate-/l*75.7%
distribute-neg-frac75.7%
Simplified75.7%
if -6.59999999999999964e-59 < x < -4.20000000000000004e-130 or -1.6000000000000001e-202 < x < 4.8e18Initial program 67.3%
Taylor expanded in y around inf 65.8%
+-commutative65.8%
Simplified65.8%
if -4.20000000000000004e-130 < x < -1.6000000000000001e-202Initial program 88.5%
Taylor expanded in t around inf 66.9%
Final simplification64.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b))
(t_2 (+ y (+ x t)))
(t_3 (- z (* y (- (/ b x) (/ a x))))))
(if (<= x -8.5e+71)
t_3
(if (<= x -1250000000.0)
(* z (/ (+ x y) t_2))
(if (<= x -6.6e-59)
(/ (- y) (/ t_2 b))
(if (<= x -4e-130)
t_1
(if (<= x -1.75e-203)
(/ a (/ t_2 (+ y t)))
(if (<= x 4.8e+18) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = z - (y * ((b / x) - (a / x)));
double tmp;
if (x <= -8.5e+71) {
tmp = t_3;
} else if (x <= -1250000000.0) {
tmp = z * ((x + y) / t_2);
} else if (x <= -6.6e-59) {
tmp = -y / (t_2 / b);
} else if (x <= -4e-130) {
tmp = t_1;
} else if (x <= -1.75e-203) {
tmp = a / (t_2 / (y + t));
} else if (x <= 4.8e+18) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (z + a) - b
t_2 = y + (x + t)
t_3 = z - (y * ((b / x) - (a / x)))
if (x <= (-8.5d+71)) then
tmp = t_3
else if (x <= (-1250000000.0d0)) then
tmp = z * ((x + y) / t_2)
else if (x <= (-6.6d-59)) then
tmp = -y / (t_2 / b)
else if (x <= (-4d-130)) then
tmp = t_1
else if (x <= (-1.75d-203)) then
tmp = a / (t_2 / (y + t))
else if (x <= 4.8d+18) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = z - (y * ((b / x) - (a / x)));
double tmp;
if (x <= -8.5e+71) {
tmp = t_3;
} else if (x <= -1250000000.0) {
tmp = z * ((x + y) / t_2);
} else if (x <= -6.6e-59) {
tmp = -y / (t_2 / b);
} else if (x <= -4e-130) {
tmp = t_1;
} else if (x <= -1.75e-203) {
tmp = a / (t_2 / (y + t));
} else if (x <= 4.8e+18) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = y + (x + t) t_3 = z - (y * ((b / x) - (a / x))) tmp = 0 if x <= -8.5e+71: tmp = t_3 elif x <= -1250000000.0: tmp = z * ((x + y) / t_2) elif x <= -6.6e-59: tmp = -y / (t_2 / b) elif x <= -4e-130: tmp = t_1 elif x <= -1.75e-203: tmp = a / (t_2 / (y + t)) elif x <= 4.8e+18: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(z - Float64(y * Float64(Float64(b / x) - Float64(a / x)))) tmp = 0.0 if (x <= -8.5e+71) tmp = t_3; elseif (x <= -1250000000.0) tmp = Float64(z * Float64(Float64(x + y) / t_2)); elseif (x <= -6.6e-59) tmp = Float64(Float64(-y) / Float64(t_2 / b)); elseif (x <= -4e-130) tmp = t_1; elseif (x <= -1.75e-203) tmp = Float64(a / Float64(t_2 / Float64(y + t))); elseif (x <= 4.8e+18) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = y + (x + t); t_3 = z - (y * ((b / x) - (a / x))); tmp = 0.0; if (x <= -8.5e+71) tmp = t_3; elseif (x <= -1250000000.0) tmp = z * ((x + y) / t_2); elseif (x <= -6.6e-59) tmp = -y / (t_2 / b); elseif (x <= -4e-130) tmp = t_1; elseif (x <= -1.75e-203) tmp = a / (t_2 / (y + t)); elseif (x <= 4.8e+18) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z - N[(y * N[(N[(b / x), $MachinePrecision] - N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -8.5e+71], t$95$3, If[LessEqual[x, -1250000000.0], N[(z * N[(N[(x + y), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.6e-59], N[((-y) / N[(t$95$2 / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -4e-130], t$95$1, If[LessEqual[x, -1.75e-203], N[(a / N[(t$95$2 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.8e+18], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := y + \left(x + t\right)\\
t_3 := z - y \cdot \left(\frac{b}{x} - \frac{a}{x}\right)\\
\mathbf{if}\;x \leq -8.5 \cdot 10^{+71}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -1250000000:\\
\;\;\;\;z \cdot \frac{x + y}{t_2}\\
\mathbf{elif}\;x \leq -6.6 \cdot 10^{-59}:\\
\;\;\;\;\frac{-y}{\frac{t_2}{b}}\\
\mathbf{elif}\;x \leq -4 \cdot 10^{-130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.75 \cdot 10^{-203}:\\
\;\;\;\;\frac{a}{\frac{t_2}{y + t}}\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+18}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if x < -8.4999999999999996e71 or 4.8e18 < x Initial program 58.8%
Simplified59.0%
Taylor expanded in x around inf 51.8%
+-commutative51.8%
associate-+r+51.8%
associate-/l*51.6%
associate-/l*54.7%
+-commutative54.7%
Simplified54.7%
Taylor expanded in t around 0 48.2%
associate--l+49.1%
+-commutative49.1%
associate-+r-49.1%
associate-*l/51.3%
associate-/l*59.5%
Simplified59.5%
Taylor expanded in y around 0 61.7%
if -8.4999999999999996e71 < x < -1.25e9Initial program 62.0%
Taylor expanded in z around inf 48.3%
associate-/l*61.3%
Simplified61.3%
associate-/r/61.2%
Applied egg-rr61.2%
if -1.25e9 < x < -6.59999999999999964e-59Initial program 92.4%
Taylor expanded in b around inf 68.4%
mul-1-neg68.4%
associate-/l*75.7%
distribute-neg-frac75.7%
Simplified75.7%
if -6.59999999999999964e-59 < x < -4.0000000000000003e-130 or -1.7500000000000001e-203 < x < 4.8e18Initial program 67.3%
Taylor expanded in y around inf 65.8%
+-commutative65.8%
Simplified65.8%
if -4.0000000000000003e-130 < x < -1.7500000000000001e-203Initial program 88.5%
Taylor expanded in a around inf 56.2%
associate-/l*67.4%
Simplified67.4%
Final simplification64.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b))
(t_2 (+ y (+ x t)))
(t_3 (- z (* y (- (/ b x) (/ a x))))))
(if (<= x -2.5e+69)
t_3
(if (<= x -1950000000.0)
(/ (+ x y) (/ t_2 z))
(if (<= x -6.6e-59)
(/ (- y) (/ t_2 b))
(if (<= x -3.5e-130)
t_1
(if (<= x -2.2e-204)
(/ a (/ t_2 (+ y t)))
(if (<= x 4.8e+18) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = z - (y * ((b / x) - (a / x)));
double tmp;
if (x <= -2.5e+69) {
tmp = t_3;
} else if (x <= -1950000000.0) {
tmp = (x + y) / (t_2 / z);
} else if (x <= -6.6e-59) {
tmp = -y / (t_2 / b);
} else if (x <= -3.5e-130) {
tmp = t_1;
} else if (x <= -2.2e-204) {
tmp = a / (t_2 / (y + t));
} else if (x <= 4.8e+18) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (z + a) - b
t_2 = y + (x + t)
t_3 = z - (y * ((b / x) - (a / x)))
if (x <= (-2.5d+69)) then
tmp = t_3
else if (x <= (-1950000000.0d0)) then
tmp = (x + y) / (t_2 / z)
else if (x <= (-6.6d-59)) then
tmp = -y / (t_2 / b)
else if (x <= (-3.5d-130)) then
tmp = t_1
else if (x <= (-2.2d-204)) then
tmp = a / (t_2 / (y + t))
else if (x <= 4.8d+18) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = z - (y * ((b / x) - (a / x)));
double tmp;
if (x <= -2.5e+69) {
tmp = t_3;
} else if (x <= -1950000000.0) {
tmp = (x + y) / (t_2 / z);
} else if (x <= -6.6e-59) {
tmp = -y / (t_2 / b);
} else if (x <= -3.5e-130) {
tmp = t_1;
} else if (x <= -2.2e-204) {
tmp = a / (t_2 / (y + t));
} else if (x <= 4.8e+18) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = y + (x + t) t_3 = z - (y * ((b / x) - (a / x))) tmp = 0 if x <= -2.5e+69: tmp = t_3 elif x <= -1950000000.0: tmp = (x + y) / (t_2 / z) elif x <= -6.6e-59: tmp = -y / (t_2 / b) elif x <= -3.5e-130: tmp = t_1 elif x <= -2.2e-204: tmp = a / (t_2 / (y + t)) elif x <= 4.8e+18: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(z - Float64(y * Float64(Float64(b / x) - Float64(a / x)))) tmp = 0.0 if (x <= -2.5e+69) tmp = t_3; elseif (x <= -1950000000.0) tmp = Float64(Float64(x + y) / Float64(t_2 / z)); elseif (x <= -6.6e-59) tmp = Float64(Float64(-y) / Float64(t_2 / b)); elseif (x <= -3.5e-130) tmp = t_1; elseif (x <= -2.2e-204) tmp = Float64(a / Float64(t_2 / Float64(y + t))); elseif (x <= 4.8e+18) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = y + (x + t); t_3 = z - (y * ((b / x) - (a / x))); tmp = 0.0; if (x <= -2.5e+69) tmp = t_3; elseif (x <= -1950000000.0) tmp = (x + y) / (t_2 / z); elseif (x <= -6.6e-59) tmp = -y / (t_2 / b); elseif (x <= -3.5e-130) tmp = t_1; elseif (x <= -2.2e-204) tmp = a / (t_2 / (y + t)); elseif (x <= 4.8e+18) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z - N[(y * N[(N[(b / x), $MachinePrecision] - N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -2.5e+69], t$95$3, If[LessEqual[x, -1950000000.0], N[(N[(x + y), $MachinePrecision] / N[(t$95$2 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.6e-59], N[((-y) / N[(t$95$2 / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -3.5e-130], t$95$1, If[LessEqual[x, -2.2e-204], N[(a / N[(t$95$2 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.8e+18], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := y + \left(x + t\right)\\
t_3 := z - y \cdot \left(\frac{b}{x} - \frac{a}{x}\right)\\
\mathbf{if}\;x \leq -2.5 \cdot 10^{+69}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -1950000000:\\
\;\;\;\;\frac{x + y}{\frac{t_2}{z}}\\
\mathbf{elif}\;x \leq -6.6 \cdot 10^{-59}:\\
\;\;\;\;\frac{-y}{\frac{t_2}{b}}\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.2 \cdot 10^{-204}:\\
\;\;\;\;\frac{a}{\frac{t_2}{y + t}}\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+18}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if x < -2.50000000000000018e69 or 4.8e18 < x Initial program 58.8%
Simplified59.0%
Taylor expanded in x around inf 51.8%
+-commutative51.8%
associate-+r+51.8%
associate-/l*51.6%
associate-/l*54.7%
+-commutative54.7%
Simplified54.7%
Taylor expanded in t around 0 48.2%
associate--l+49.1%
+-commutative49.1%
associate-+r-49.1%
associate-*l/51.3%
associate-/l*59.5%
Simplified59.5%
Taylor expanded in y around 0 61.7%
if -2.50000000000000018e69 < x < -1.95e9Initial program 62.0%
Taylor expanded in z around inf 48.3%
associate-/l*61.3%
Simplified61.3%
if -1.95e9 < x < -6.59999999999999964e-59Initial program 92.4%
Taylor expanded in b around inf 68.4%
mul-1-neg68.4%
associate-/l*75.7%
distribute-neg-frac75.7%
Simplified75.7%
if -6.59999999999999964e-59 < x < -3.4999999999999999e-130 or -2.1999999999999998e-204 < x < 4.8e18Initial program 67.3%
Taylor expanded in y around inf 65.8%
+-commutative65.8%
Simplified65.8%
if -3.4999999999999999e-130 < x < -2.1999999999999998e-204Initial program 88.5%
Taylor expanded in a around inf 56.2%
associate-/l*67.4%
Simplified67.4%
Final simplification64.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b))
(t_2 (+ y (+ x t)))
(t_3 (- z (* y (- (/ b x) (/ a x))))))
(if (<= x -1.2e+69)
t_3
(if (<= x -1250000.0)
(/ (+ x y) (/ t_2 z))
(if (<= x -5.8e-63)
(/ (* y t_1) t_2)
(if (<= x -1.4e-128)
t_1
(if (<= x -4e-204)
(/ a (/ t_2 (+ y t)))
(if (<= x 4.5e+18) t_1 t_3))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = z - (y * ((b / x) - (a / x)));
double tmp;
if (x <= -1.2e+69) {
tmp = t_3;
} else if (x <= -1250000.0) {
tmp = (x + y) / (t_2 / z);
} else if (x <= -5.8e-63) {
tmp = (y * t_1) / t_2;
} else if (x <= -1.4e-128) {
tmp = t_1;
} else if (x <= -4e-204) {
tmp = a / (t_2 / (y + t));
} else if (x <= 4.5e+18) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = (z + a) - b
t_2 = y + (x + t)
t_3 = z - (y * ((b / x) - (a / x)))
if (x <= (-1.2d+69)) then
tmp = t_3
else if (x <= (-1250000.0d0)) then
tmp = (x + y) / (t_2 / z)
else if (x <= (-5.8d-63)) then
tmp = (y * t_1) / t_2
else if (x <= (-1.4d-128)) then
tmp = t_1
else if (x <= (-4d-204)) then
tmp = a / (t_2 / (y + t))
else if (x <= 4.5d+18) then
tmp = t_1
else
tmp = t_3
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double t_2 = y + (x + t);
double t_3 = z - (y * ((b / x) - (a / x)));
double tmp;
if (x <= -1.2e+69) {
tmp = t_3;
} else if (x <= -1250000.0) {
tmp = (x + y) / (t_2 / z);
} else if (x <= -5.8e-63) {
tmp = (y * t_1) / t_2;
} else if (x <= -1.4e-128) {
tmp = t_1;
} else if (x <= -4e-204) {
tmp = a / (t_2 / (y + t));
} else if (x <= 4.5e+18) {
tmp = t_1;
} else {
tmp = t_3;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b t_2 = y + (x + t) t_3 = z - (y * ((b / x) - (a / x))) tmp = 0 if x <= -1.2e+69: tmp = t_3 elif x <= -1250000.0: tmp = (x + y) / (t_2 / z) elif x <= -5.8e-63: tmp = (y * t_1) / t_2 elif x <= -1.4e-128: tmp = t_1 elif x <= -4e-204: tmp = a / (t_2 / (y + t)) elif x <= 4.5e+18: tmp = t_1 else: tmp = t_3 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(y + Float64(x + t)) t_3 = Float64(z - Float64(y * Float64(Float64(b / x) - Float64(a / x)))) tmp = 0.0 if (x <= -1.2e+69) tmp = t_3; elseif (x <= -1250000.0) tmp = Float64(Float64(x + y) / Float64(t_2 / z)); elseif (x <= -5.8e-63) tmp = Float64(Float64(y * t_1) / t_2); elseif (x <= -1.4e-128) tmp = t_1; elseif (x <= -4e-204) tmp = Float64(a / Float64(t_2 / Float64(y + t))); elseif (x <= 4.5e+18) tmp = t_1; else tmp = t_3; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; t_2 = y + (x + t); t_3 = z - (y * ((b / x) - (a / x))); tmp = 0.0; if (x <= -1.2e+69) tmp = t_3; elseif (x <= -1250000.0) tmp = (x + y) / (t_2 / z); elseif (x <= -5.8e-63) tmp = (y * t_1) / t_2; elseif (x <= -1.4e-128) tmp = t_1; elseif (x <= -4e-204) tmp = a / (t_2 / (y + t)); elseif (x <= 4.5e+18) tmp = t_1; else tmp = t_3; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(z - N[(y * N[(N[(b / x), $MachinePrecision] - N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.2e+69], t$95$3, If[LessEqual[x, -1250000.0], N[(N[(x + y), $MachinePrecision] / N[(t$95$2 / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -5.8e-63], N[(N[(y * t$95$1), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[x, -1.4e-128], t$95$1, If[LessEqual[x, -4e-204], N[(a / N[(t$95$2 / N[(y + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 4.5e+18], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := y + \left(x + t\right)\\
t_3 := z - y \cdot \left(\frac{b}{x} - \frac{a}{x}\right)\\
\mathbf{if}\;x \leq -1.2 \cdot 10^{+69}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -1250000:\\
\;\;\;\;\frac{x + y}{\frac{t_2}{z}}\\
\mathbf{elif}\;x \leq -5.8 \cdot 10^{-63}:\\
\;\;\;\;\frac{y \cdot t_1}{t_2}\\
\mathbf{elif}\;x \leq -1.4 \cdot 10^{-128}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -4 \cdot 10^{-204}:\\
\;\;\;\;\frac{a}{\frac{t_2}{y + t}}\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+18}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\end{array}
if x < -1.2000000000000001e69 or 4.5e18 < x Initial program 58.8%
Simplified59.0%
Taylor expanded in x around inf 51.8%
+-commutative51.8%
associate-+r+51.8%
associate-/l*51.6%
associate-/l*54.7%
+-commutative54.7%
Simplified54.7%
Taylor expanded in t around 0 48.2%
associate--l+49.1%
+-commutative49.1%
associate-+r-49.1%
associate-*l/51.3%
associate-/l*59.5%
Simplified59.5%
Taylor expanded in y around 0 61.7%
if -1.2000000000000001e69 < x < -1.25e6Initial program 62.0%
Taylor expanded in z around inf 48.3%
associate-/l*61.3%
Simplified61.3%
if -1.25e6 < x < -5.7999999999999995e-63Initial program 93.3%
Taylor expanded in y around inf 79.6%
+-commutative79.6%
Simplified79.6%
if -5.7999999999999995e-63 < x < -1.3999999999999999e-128 or -4e-204 < x < 4.5e18Initial program 66.7%
Taylor expanded in y around inf 66.0%
+-commutative66.0%
Simplified66.0%
if -1.3999999999999999e-128 < x < -4e-204Initial program 88.5%
Taylor expanded in a around inf 56.2%
associate-/l*67.4%
Simplified67.4%
Final simplification64.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ y (+ x t))))
(if (or (<= z -4.7e+67) (not (<= z 1550000000000.0)))
(* z (/ (+ x y) t_1))
(/ (+ (* t a) (* y (- a b))) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if ((z <= -4.7e+67) || !(z <= 1550000000000.0)) {
tmp = z * ((x + y) / t_1);
} else {
tmp = ((t * a) + (y * (a - b))) / t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = y + (x + t)
if ((z <= (-4.7d+67)) .or. (.not. (z <= 1550000000000.0d0))) then
tmp = z * ((x + y) / t_1)
else
tmp = ((t * a) + (y * (a - b))) / t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y + (x + t);
double tmp;
if ((z <= -4.7e+67) || !(z <= 1550000000000.0)) {
tmp = z * ((x + y) / t_1);
} else {
tmp = ((t * a) + (y * (a - b))) / t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y + (x + t) tmp = 0 if (z <= -4.7e+67) or not (z <= 1550000000000.0): tmp = z * ((x + y) / t_1) else: tmp = ((t * a) + (y * (a - b))) / t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y + Float64(x + t)) tmp = 0.0 if ((z <= -4.7e+67) || !(z <= 1550000000000.0)) tmp = Float64(z * Float64(Float64(x + y) / t_1)); else tmp = Float64(Float64(Float64(t * a) + Float64(y * Float64(a - b))) / t_1); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y + (x + t); tmp = 0.0; if ((z <= -4.7e+67) || ~((z <= 1550000000000.0))) tmp = z * ((x + y) / t_1); else tmp = ((t * a) + (y * (a - b))) / t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y + N[(x + t), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[z, -4.7e+67], N[Not[LessEqual[z, 1550000000000.0]], $MachinePrecision]], N[(z * N[(N[(x + y), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * a), $MachinePrecision] + N[(y * N[(a - b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y + \left(x + t\right)\\
\mathbf{if}\;z \leq -4.7 \cdot 10^{+67} \lor \neg \left(z \leq 1550000000000\right):\\
\;\;\;\;z \cdot \frac{x + y}{t_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t \cdot a + y \cdot \left(a - b\right)}{t_1}\\
\end{array}
\end{array}
if z < -4.70000000000000017e67 or 1.55e12 < z Initial program 50.5%
Taylor expanded in z around inf 36.3%
associate-/l*62.2%
Simplified62.2%
associate-/r/66.1%
Applied egg-rr66.1%
if -4.70000000000000017e67 < z < 1.55e12Initial program 78.6%
Simplified78.7%
Taylor expanded in z around 0 64.1%
Final simplification65.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ z (* (- a b) (/ y x)))))
(if (<= x -4.5e+80)
t_2
(if (<= x -3.5e-130)
t_1
(if (<= x -1.6e-202) a (if (<= x 4.8e+18) 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 - b) * (y / x));
double tmp;
if (x <= -4.5e+80) {
tmp = t_2;
} else if (x <= -3.5e-130) {
tmp = t_1;
} else if (x <= -1.6e-202) {
tmp = a;
} else if (x <= 4.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 + a) - b
t_2 = z + ((a - b) * (y / x))
if (x <= (-4.5d+80)) then
tmp = t_2
else if (x <= (-3.5d-130)) then
tmp = t_1
else if (x <= (-1.6d-202)) then
tmp = a
else if (x <= 4.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 + a) - b;
double t_2 = z + ((a - b) * (y / x));
double tmp;
if (x <= -4.5e+80) {
tmp = t_2;
} else if (x <= -3.5e-130) {
tmp = t_1;
} else if (x <= -1.6e-202) {
tmp = a;
} else if (x <= 4.8e+18) {
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 - b) * (y / x)) tmp = 0 if x <= -4.5e+80: tmp = t_2 elif x <= -3.5e-130: tmp = t_1 elif x <= -1.6e-202: tmp = a elif x <= 4.8e+18: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(z + Float64(Float64(a - b) * Float64(y / x))) tmp = 0.0 if (x <= -4.5e+80) tmp = t_2; elseif (x <= -3.5e-130) tmp = t_1; elseif (x <= -1.6e-202) tmp = a; elseif (x <= 4.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 + a) - b; t_2 = z + ((a - b) * (y / x)); tmp = 0.0; if (x <= -4.5e+80) tmp = t_2; elseif (x <= -3.5e-130) tmp = t_1; elseif (x <= -1.6e-202) tmp = a; elseif (x <= 4.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[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(z + N[(N[(a - b), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -4.5e+80], t$95$2, If[LessEqual[x, -3.5e-130], t$95$1, If[LessEqual[x, -1.6e-202], a, If[LessEqual[x, 4.8e+18], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := z + \left(a - b\right) \cdot \frac{y}{x}\\
\mathbf{if}\;x \leq -4.5 \cdot 10^{+80}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -3.5 \cdot 10^{-130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-202}:\\
\;\;\;\;a\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+18}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -4.50000000000000007e80 or 4.8e18 < x Initial program 58.9%
Simplified59.1%
Taylor expanded in x around inf 51.8%
+-commutative51.8%
associate-+r+51.8%
associate-/l*51.5%
associate-/l*54.7%
+-commutative54.7%
Simplified54.7%
Taylor expanded in t around 0 48.1%
associate--l+49.0%
+-commutative49.0%
associate-+r-49.0%
associate-*l/51.3%
associate-/l*59.7%
Simplified59.7%
Taylor expanded in z around 0 55.1%
associate-*l/59.7%
*-commutative59.7%
Simplified59.7%
if -4.50000000000000007e80 < x < -3.4999999999999999e-130 or -1.6000000000000001e-202 < x < 4.8e18Initial program 68.7%
Taylor expanded in y around inf 60.8%
+-commutative60.8%
Simplified60.8%
if -3.4999999999999999e-130 < x < -1.6000000000000001e-202Initial program 88.5%
Taylor expanded in t around inf 66.9%
Final simplification60.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)) (t_2 (+ z (/ (* y a) x))))
(if (<= x -1.95e+173)
t_2
(if (<= x -5.6e-130)
t_1
(if (<= x -1.6e-202) a (if (<= x 4.8e+18) 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 + ((y * a) / x);
double tmp;
if (x <= -1.95e+173) {
tmp = t_2;
} else if (x <= -5.6e-130) {
tmp = t_1;
} else if (x <= -1.6e-202) {
tmp = a;
} else if (x <= 4.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 + a) - b
t_2 = z + ((y * a) / x)
if (x <= (-1.95d+173)) then
tmp = t_2
else if (x <= (-5.6d-130)) then
tmp = t_1
else if (x <= (-1.6d-202)) then
tmp = a
else if (x <= 4.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 + a) - b;
double t_2 = z + ((y * a) / x);
double tmp;
if (x <= -1.95e+173) {
tmp = t_2;
} else if (x <= -5.6e-130) {
tmp = t_1;
} else if (x <= -1.6e-202) {
tmp = a;
} else if (x <= 4.8e+18) {
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 + ((y * a) / x) tmp = 0 if x <= -1.95e+173: tmp = t_2 elif x <= -5.6e-130: tmp = t_1 elif x <= -1.6e-202: tmp = a elif x <= 4.8e+18: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) t_2 = Float64(z + Float64(Float64(y * a) / x)) tmp = 0.0 if (x <= -1.95e+173) tmp = t_2; elseif (x <= -5.6e-130) tmp = t_1; elseif (x <= -1.6e-202) tmp = a; elseif (x <= 4.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 + a) - b; t_2 = z + ((y * a) / x); tmp = 0.0; if (x <= -1.95e+173) tmp = t_2; elseif (x <= -5.6e-130) tmp = t_1; elseif (x <= -1.6e-202) tmp = a; elseif (x <= 4.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[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, Block[{t$95$2 = N[(z + N[(N[(y * a), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.95e+173], t$95$2, If[LessEqual[x, -5.6e-130], t$95$1, If[LessEqual[x, -1.6e-202], a, If[LessEqual[x, 4.8e+18], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
t_2 := z + \frac{y \cdot a}{x}\\
\mathbf{if}\;x \leq -1.95 \cdot 10^{+173}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -5.6 \cdot 10^{-130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-202}:\\
\;\;\;\;a\\
\mathbf{elif}\;x \leq 4.8 \cdot 10^{+18}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if x < -1.9499999999999999e173 or 4.8e18 < x Initial program 57.0%
Taylor expanded in b around 0 43.7%
Taylor expanded in t around 0 31.7%
Taylor expanded in y around 0 48.7%
if -1.9499999999999999e173 < x < -5.60000000000000032e-130 or -1.6000000000000001e-202 < x < 4.8e18Initial program 68.4%
Taylor expanded in y around inf 59.3%
+-commutative59.3%
Simplified59.3%
if -5.60000000000000032e-130 < x < -1.6000000000000001e-202Initial program 88.5%
Taylor expanded in t around inf 66.9%
Final simplification56.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- (+ z a) b)))
(if (<= x -1.22e-129)
t_1
(if (<= x -4.2e-203) a (if (<= x 4.1e+121) t_1 (* z (- 1.0 (/ t x))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (x <= -1.22e-129) {
tmp = t_1;
} else if (x <= -4.2e-203) {
tmp = a;
} else if (x <= 4.1e+121) {
tmp = t_1;
} else {
tmp = z * (1.0 - (t / 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) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (x <= (-1.22d-129)) then
tmp = t_1
else if (x <= (-4.2d-203)) then
tmp = a
else if (x <= 4.1d+121) then
tmp = t_1
else
tmp = z * (1.0d0 - (t / x))
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 (x <= -1.22e-129) {
tmp = t_1;
} else if (x <= -4.2e-203) {
tmp = a;
} else if (x <= 4.1e+121) {
tmp = t_1;
} else {
tmp = z * (1.0 - (t / x));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if x <= -1.22e-129: tmp = t_1 elif x <= -4.2e-203: tmp = a elif x <= 4.1e+121: tmp = t_1 else: tmp = z * (1.0 - (t / x)) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (x <= -1.22e-129) tmp = t_1; elseif (x <= -4.2e-203) tmp = a; elseif (x <= 4.1e+121) tmp = t_1; else tmp = Float64(z * Float64(1.0 - Float64(t / x))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (x <= -1.22e-129) tmp = t_1; elseif (x <= -4.2e-203) tmp = a; elseif (x <= 4.1e+121) tmp = t_1; else tmp = z * (1.0 - (t / x)); 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[x, -1.22e-129], t$95$1, If[LessEqual[x, -4.2e-203], a, If[LessEqual[x, 4.1e+121], t$95$1, N[(z * N[(1.0 - N[(t / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;x \leq -1.22 \cdot 10^{-129}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -4.2 \cdot 10^{-203}:\\
\;\;\;\;a\\
\mathbf{elif}\;x \leq 4.1 \cdot 10^{+121}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(1 - \frac{t}{x}\right)\\
\end{array}
\end{array}
if x < -1.21999999999999999e-129 or -4.20000000000000004e-203 < x < 4.1e121Initial program 67.2%
Taylor expanded in y around inf 52.3%
+-commutative52.3%
Simplified52.3%
if -1.21999999999999999e-129 < x < -4.20000000000000004e-203Initial program 88.5%
Taylor expanded in t around inf 66.9%
if 4.1e121 < x Initial program 50.5%
Simplified50.8%
Taylor expanded in x around inf 57.1%
+-commutative57.1%
associate-+r+57.1%
associate-/l*59.7%
associate-/l*63.6%
+-commutative63.6%
Simplified63.6%
Taylor expanded in z around inf 55.5%
Final simplification53.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.4e+194) (not (<= b 6.8e+162))) (/ (- y) (/ (+ y t) b)) (- (+ z a) b)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.4e+194) || !(b <= 6.8e+162)) {
tmp = -y / ((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 <= (-1.4d+194)) .or. (.not. (b <= 6.8d+162))) then
tmp = -y / ((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 <= -1.4e+194) || !(b <= 6.8e+162)) {
tmp = -y / ((y + t) / b);
} else {
tmp = (z + a) - b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.4e+194) or not (b <= 6.8e+162): tmp = -y / ((y + t) / b) else: tmp = (z + a) - b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.4e+194) || !(b <= 6.8e+162)) tmp = Float64(Float64(-y) / Float64(Float64(y + t) / 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 <= -1.4e+194) || ~((b <= 6.8e+162))) tmp = -y / ((y + t) / b); else tmp = (z + a) - b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.4e+194], N[Not[LessEqual[b, 6.8e+162]], $MachinePrecision]], N[((-y) / N[(N[(y + t), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision], N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.4 \cdot 10^{+194} \lor \neg \left(b \leq 6.8 \cdot 10^{+162}\right):\\
\;\;\;\;\frac{-y}{\frac{y + t}{b}}\\
\mathbf{else}:\\
\;\;\;\;\left(z + a\right) - b\\
\end{array}
\end{array}
if b < -1.40000000000000005e194 or 6.80000000000000006e162 < b Initial program 58.4%
Taylor expanded in b around inf 40.5%
mul-1-neg40.5%
associate-/l*63.0%
distribute-neg-frac63.0%
Simplified63.0%
Taylor expanded in x around 0 33.5%
mul-1-neg33.5%
associate-/l*52.4%
distribute-neg-frac52.4%
Simplified52.4%
if -1.40000000000000005e194 < b < 6.80000000000000006e162Initial program 68.5%
Taylor expanded in y around inf 55.9%
+-commutative55.9%
Simplified55.9%
Final simplification55.0%
(FPCore (x y z t a b) :precision binary64 (let* ((t_1 (- (+ z a) b))) (if (<= x -7e-130) t_1 (if (<= x -2.5e-204) a (if (<= x 4.4e+121) t_1 z)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (z + a) - b;
double tmp;
if (x <= -7e-130) {
tmp = t_1;
} else if (x <= -2.5e-204) {
tmp = a;
} else if (x <= 4.4e+121) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = (z + a) - b
if (x <= (-7d-130)) then
tmp = t_1
else if (x <= (-2.5d-204)) then
tmp = a
else if (x <= 4.4d+121) then
tmp = t_1
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 t_1 = (z + a) - b;
double tmp;
if (x <= -7e-130) {
tmp = t_1;
} else if (x <= -2.5e-204) {
tmp = a;
} else if (x <= 4.4e+121) {
tmp = t_1;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (z + a) - b tmp = 0 if x <= -7e-130: tmp = t_1 elif x <= -2.5e-204: tmp = a elif x <= 4.4e+121: tmp = t_1 else: tmp = z return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(z + a) - b) tmp = 0.0 if (x <= -7e-130) tmp = t_1; elseif (x <= -2.5e-204) tmp = a; elseif (x <= 4.4e+121) tmp = t_1; else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (z + a) - b; tmp = 0.0; if (x <= -7e-130) tmp = t_1; elseif (x <= -2.5e-204) tmp = a; elseif (x <= 4.4e+121) tmp = t_1; else tmp = z; 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[x, -7e-130], t$95$1, If[LessEqual[x, -2.5e-204], a, If[LessEqual[x, 4.4e+121], t$95$1, z]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(z + a\right) - b\\
\mathbf{if}\;x \leq -7 \cdot 10^{-130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{-204}:\\
\;\;\;\;a\\
\mathbf{elif}\;x \leq 4.4 \cdot 10^{+121}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if x < -6.9999999999999998e-130 or -2.5000000000000001e-204 < x < 4.40000000000000003e121Initial program 67.2%
Taylor expanded in y around inf 52.3%
+-commutative52.3%
Simplified52.3%
if -6.9999999999999998e-130 < x < -2.5000000000000001e-204Initial program 88.5%
Taylor expanded in t around inf 66.9%
if 4.40000000000000003e121 < x Initial program 50.5%
Taylor expanded in x around inf 55.4%
Final simplification53.7%
(FPCore (x y z t a b) :precision binary64 (if (<= t -7.2e+130) a (if (<= t 2.6e+36) z a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= -7.2e+130) {
tmp = a;
} else if (t <= 2.6e+36) {
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 <= (-7.2d+130)) then
tmp = a
else if (t <= 2.6d+36) 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 <= -7.2e+130) {
tmp = a;
} else if (t <= 2.6e+36) {
tmp = z;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if t <= -7.2e+130: tmp = a elif t <= 2.6e+36: tmp = z else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (t <= -7.2e+130) tmp = a; elseif (t <= 2.6e+36) tmp = z; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (t <= -7.2e+130) tmp = a; elseif (t <= 2.6e+36) tmp = z; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -7.2e+130], a, If[LessEqual[t, 2.6e+36], z, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.2 \cdot 10^{+130}:\\
\;\;\;\;a\\
\mathbf{elif}\;t \leq 2.6 \cdot 10^{+36}:\\
\;\;\;\;z\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if t < -7.2000000000000002e130 or 2.6000000000000001e36 < t Initial program 57.1%
Taylor expanded in t around inf 44.1%
if -7.2000000000000002e130 < t < 2.6000000000000001e36Initial program 71.4%
Taylor expanded in x around inf 44.5%
Final simplification44.4%
(FPCore (x y z t a b) :precision binary64 (if (<= x 1e+161) (+ z a) z))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 1e+161) {
tmp = z + a;
} else {
tmp = z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= 1d+161) then
tmp = z + a
else
tmp = z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= 1e+161) {
tmp = z + a;
} else {
tmp = z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= 1e+161: tmp = z + a else: tmp = z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= 1e+161) tmp = Float64(z + a); else tmp = z; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= 1e+161) tmp = z + a; else tmp = z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, 1e+161], N[(z + a), $MachinePrecision], z]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq 10^{+161}:\\
\;\;\;\;z + a\\
\mathbf{else}:\\
\;\;\;\;z\\
\end{array}
\end{array}
if x < 1e161Initial program 68.8%
Taylor expanded in b around 0 48.8%
Taylor expanded in y around inf 44.8%
+-commutative44.8%
Simplified44.8%
if 1e161 < x Initial program 47.4%
Taylor expanded in x around inf 61.8%
Final simplification47.0%
(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 66.1%
Taylor expanded in t around inf 27.6%
Final simplification27.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ x t) y))
(t_2 (- (+ (* (+ x y) z) (* (+ t y) a)) (* y b)))
(t_3 (/ t_2 t_1))
(t_4 (- (+ z a) b)))
(if (< t_3 -3.5813117084150564e+153)
t_4
(if (< t_3 1.2285964308315609e+82) (/ 1.0 (/ t_1 t_2)) t_4))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: t_4
real(8) :: tmp
t_1 = (x + t) + y
t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b)
t_3 = t_2 / t_1
t_4 = (z + a) - b
if (t_3 < (-3.5813117084150564d+153)) then
tmp = t_4
else if (t_3 < 1.2285964308315609d+82) then
tmp = 1.0d0 / (t_1 / t_2)
else
tmp = t_4
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x + t) + y;
double t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b);
double t_3 = t_2 / t_1;
double t_4 = (z + a) - b;
double tmp;
if (t_3 < -3.5813117084150564e+153) {
tmp = t_4;
} else if (t_3 < 1.2285964308315609e+82) {
tmp = 1.0 / (t_1 / t_2);
} else {
tmp = t_4;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = (x + t) + y t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b) t_3 = t_2 / t_1 t_4 = (z + a) - b tmp = 0 if t_3 < -3.5813117084150564e+153: tmp = t_4 elif t_3 < 1.2285964308315609e+82: tmp = 1.0 / (t_1 / t_2) else: tmp = t_4 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(x + t) + y) t_2 = Float64(Float64(Float64(Float64(x + y) * z) + Float64(Float64(t + y) * a)) - Float64(y * b)) t_3 = Float64(t_2 / t_1) t_4 = Float64(Float64(z + a) - b) tmp = 0.0 if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = Float64(1.0 / Float64(t_1 / t_2)); else tmp = t_4; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = (x + t) + y; t_2 = (((x + y) * z) + ((t + y) * a)) - (y * b); t_3 = t_2 / t_1; t_4 = (z + a) - b; tmp = 0.0; if (t_3 < -3.5813117084150564e+153) tmp = t_4; elseif (t_3 < 1.2285964308315609e+82) tmp = 1.0 / (t_1 / t_2); else tmp = t_4; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + t), $MachinePrecision] + y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(N[(t + y), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] - N[(y * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / t$95$1), $MachinePrecision]}, Block[{t$95$4 = N[(N[(z + a), $MachinePrecision] - b), $MachinePrecision]}, If[Less[t$95$3, -3.5813117084150564e+153], t$95$4, If[Less[t$95$3, 1.2285964308315609e+82], N[(1.0 / N[(t$95$1 / t$95$2), $MachinePrecision]), $MachinePrecision], t$95$4]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(x + t\right) + y\\
t_2 := \left(\left(x + y\right) \cdot z + \left(t + y\right) \cdot a\right) - y \cdot b\\
t_3 := \frac{t_2}{t_1}\\
t_4 := \left(z + a\right) - b\\
\mathbf{if}\;t_3 < -3.5813117084150564 \cdot 10^{+153}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;t_3 < 1.2285964308315609 \cdot 10^{+82}:\\
\;\;\;\;\frac{1}{\frac{t_1}{t_2}}\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\end{array}
herbie shell --seed 2023257
(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)))