
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * 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 = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * 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 = ((x - ((y - 1.0d0) * z)) - ((t - 1.0d0) * a)) + (((y + t) - 2.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b);
}
def code(x, y, z, t, a, b): return ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x - Float64(Float64(y - 1.0) * z)) - Float64(Float64(t - 1.0) * a)) + Float64(Float64(Float64(y + t) - 2.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x - ((y - 1.0) * z)) - ((t - 1.0) * a)) + (((y + t) - 2.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x - N[(N[(y - 1.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] - N[(N[(t - 1.0), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(\left(x - \left(y - 1\right) \cdot z\right) - \left(t - 1\right) \cdot a\right) + \left(\left(y + t\right) - 2\right) \cdot b
\end{array}
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (+ (* a (- 1.0 t)) (+ x (* z (- 1.0 y)))) (* b (- (+ y t) 2.0)))))
(if (<= t_1 INFINITY) t_1 (* t (+ (- b a) (* b (/ (+ y -2.0) t)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a * (1.0 - t)) + (x + (z * (1.0 - y)))) + (b * ((y + t) - 2.0));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = t * ((b - a) + (b * ((y + -2.0) / t)));
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((a * (1.0 - t)) + (x + (z * (1.0 - y)))) + (b * ((y + t) - 2.0));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = t * ((b - a) + (b * ((y + -2.0) / t)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((a * (1.0 - t)) + (x + (z * (1.0 - y)))) + (b * ((y + t) - 2.0)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = t * ((b - a) + (b * ((y + -2.0) / t))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(a * Float64(1.0 - t)) + Float64(x + Float64(z * Float64(1.0 - y)))) + Float64(b * Float64(Float64(y + t) - 2.0))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(t * Float64(Float64(b - a) + Float64(b * Float64(Float64(y + -2.0) / t)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((a * (1.0 - t)) + (x + (z * (1.0 - y)))) + (b * ((y + t) - 2.0)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = t * ((b - a) + (b * ((y + -2.0) / t))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] + N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(t * N[(N[(b - a), $MachinePrecision] + N[(b * N[(N[(y + -2.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(a \cdot \left(1 - t\right) + \left(x + z \cdot \left(1 - y\right)\right)\right) + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(b - a\right) + b \cdot \frac{y + -2}{t}\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y #s(literal 1 binary64)) z)) (*.f64 (-.f64 t #s(literal 1 binary64)) a)) (*.f64 (-.f64 (+.f64 y t) #s(literal 2 binary64)) b)) Initial program 0.0%
Taylor expanded in t around inf 33.3%
mul-1-neg33.3%
distribute-rgt-neg-in33.3%
Simplified33.3%
Taylor expanded in t around inf 66.7%
associate-+r+66.7%
mul-1-neg66.7%
sub-neg66.7%
associate-/l*88.9%
sub-neg88.9%
metadata-eval88.9%
Simplified88.9%
Final simplification99.6%
(FPCore (x y z t a b) :precision binary64 (fma (+ y (+ t -2.0)) b (- x (fma (+ y -1.0) z (* a (+ t -1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
return fma((y + (t + -2.0)), b, (x - fma((y + -1.0), z, (a * (t + -1.0)))));
}
function code(x, y, z, t, a, b) return fma(Float64(y + Float64(t + -2.0)), b, Float64(x - fma(Float64(y + -1.0), z, Float64(a * Float64(t + -1.0))))) end
code[x_, y_, z_, t_, a_, b_] := N[(N[(y + N[(t + -2.0), $MachinePrecision]), $MachinePrecision] * b + N[(x - N[(N[(y + -1.0), $MachinePrecision] * z + N[(a * N[(t + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\mathsf{fma}\left(y + \left(t + -2\right), b, x - \mathsf{fma}\left(y + -1, z, a \cdot \left(t + -1\right)\right)\right)
\end{array}
Initial program 96.5%
+-commutative96.5%
fma-define98.0%
associate--l+98.0%
sub-neg98.0%
metadata-eval98.0%
sub-neg98.0%
associate-+l-98.0%
fma-neg98.8%
sub-neg98.8%
metadata-eval98.8%
remove-double-neg98.8%
sub-neg98.8%
metadata-eval98.8%
Simplified98.8%
Final simplification98.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))) (t_2 (* b (- (+ y t) 2.0))))
(if (<= b -3.2e+49)
t_2
(if (<= b -6.6e+36)
t_1
(if (<= b -3.2e-19)
t_2
(if (<= b 2.65e-187)
(- x (* y z))
(if (<= b 5.9e-24) t_1 (if (<= b 3e+26) (+ x z) t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double t_2 = b * ((y + t) - 2.0);
double tmp;
if (b <= -3.2e+49) {
tmp = t_2;
} else if (b <= -6.6e+36) {
tmp = t_1;
} else if (b <= -3.2e-19) {
tmp = t_2;
} else if (b <= 2.65e-187) {
tmp = x - (y * z);
} else if (b <= 5.9e-24) {
tmp = t_1;
} else if (b <= 3e+26) {
tmp = x + z;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * (1.0d0 - t)
t_2 = b * ((y + t) - 2.0d0)
if (b <= (-3.2d+49)) then
tmp = t_2
else if (b <= (-6.6d+36)) then
tmp = t_1
else if (b <= (-3.2d-19)) then
tmp = t_2
else if (b <= 2.65d-187) then
tmp = x - (y * z)
else if (b <= 5.9d-24) then
tmp = t_1
else if (b <= 3d+26) then
tmp = x + z
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double t_2 = b * ((y + t) - 2.0);
double tmp;
if (b <= -3.2e+49) {
tmp = t_2;
} else if (b <= -6.6e+36) {
tmp = t_1;
} else if (b <= -3.2e-19) {
tmp = t_2;
} else if (b <= 2.65e-187) {
tmp = x - (y * z);
} else if (b <= 5.9e-24) {
tmp = t_1;
} else if (b <= 3e+26) {
tmp = x + z;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) t_2 = b * ((y + t) - 2.0) tmp = 0 if b <= -3.2e+49: tmp = t_2 elif b <= -6.6e+36: tmp = t_1 elif b <= -3.2e-19: tmp = t_2 elif b <= 2.65e-187: tmp = x - (y * z) elif b <= 5.9e-24: tmp = t_1 elif b <= 3e+26: tmp = x + z else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) t_2 = Float64(b * Float64(Float64(y + t) - 2.0)) tmp = 0.0 if (b <= -3.2e+49) tmp = t_2; elseif (b <= -6.6e+36) tmp = t_1; elseif (b <= -3.2e-19) tmp = t_2; elseif (b <= 2.65e-187) tmp = Float64(x - Float64(y * z)); elseif (b <= 5.9e-24) tmp = t_1; elseif (b <= 3e+26) tmp = Float64(x + z); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); t_2 = b * ((y + t) - 2.0); tmp = 0.0; if (b <= -3.2e+49) tmp = t_2; elseif (b <= -6.6e+36) tmp = t_1; elseif (b <= -3.2e-19) tmp = t_2; elseif (b <= 2.65e-187) tmp = x - (y * z); elseif (b <= 5.9e-24) tmp = t_1; elseif (b <= 3e+26) tmp = x + z; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.2e+49], t$95$2, If[LessEqual[b, -6.6e+36], t$95$1, If[LessEqual[b, -3.2e-19], t$95$2, If[LessEqual[b, 2.65e-187], N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5.9e-24], t$95$1, If[LessEqual[b, 3e+26], N[(x + z), $MachinePrecision], t$95$2]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -3.2 \cdot 10^{+49}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -6.6 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -3.2 \cdot 10^{-19}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 2.65 \cdot 10^{-187}:\\
\;\;\;\;x - y \cdot z\\
\mathbf{elif}\;b \leq 5.9 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 3 \cdot 10^{+26}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -3.20000000000000014e49 or -6.5999999999999997e36 < b < -3.19999999999999982e-19 or 2.99999999999999997e26 < b Initial program 93.1%
Taylor expanded in b around inf 70.1%
if -3.20000000000000014e49 < b < -6.5999999999999997e36 or 2.65000000000000001e-187 < b < 5.9000000000000002e-24Initial program 100.0%
Taylor expanded in a around inf 58.4%
if -3.19999999999999982e-19 < b < 2.65000000000000001e-187Initial program 98.8%
Taylor expanded in a around 0 66.3%
Taylor expanded in b around 0 60.0%
Taylor expanded in y around inf 51.7%
if 5.9000000000000002e-24 < b < 2.99999999999999997e26Initial program 100.0%
Taylor expanded in a around 0 88.7%
Taylor expanded in y around 0 81.8%
associate--l+81.8%
sub-neg81.8%
metadata-eval81.8%
neg-mul-181.8%
Simplified81.8%
Taylor expanded in b around 0 68.6%
Final simplification62.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t)))
(t_2 (* b (- (+ y t) 2.0)))
(t_3 (+ x (* z (- 1.0 y)))))
(if (<= b -2.25e+49)
t_2
(if (<= b -7.8e+36)
t_1
(if (<= b -2.5e-15)
t_2
(if (<= b 1.76e-190)
t_3
(if (<= b 1.1e-24) t_1 (if (<= b 2.6e+28) t_3 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double t_2 = b * ((y + t) - 2.0);
double t_3 = x + (z * (1.0 - y));
double tmp;
if (b <= -2.25e+49) {
tmp = t_2;
} else if (b <= -7.8e+36) {
tmp = t_1;
} else if (b <= -2.5e-15) {
tmp = t_2;
} else if (b <= 1.76e-190) {
tmp = t_3;
} else if (b <= 1.1e-24) {
tmp = t_1;
} else if (b <= 2.6e+28) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = a * (1.0d0 - t)
t_2 = b * ((y + t) - 2.0d0)
t_3 = x + (z * (1.0d0 - y))
if (b <= (-2.25d+49)) then
tmp = t_2
else if (b <= (-7.8d+36)) then
tmp = t_1
else if (b <= (-2.5d-15)) then
tmp = t_2
else if (b <= 1.76d-190) then
tmp = t_3
else if (b <= 1.1d-24) then
tmp = t_1
else if (b <= 2.6d+28) then
tmp = t_3
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double t_2 = b * ((y + t) - 2.0);
double t_3 = x + (z * (1.0 - y));
double tmp;
if (b <= -2.25e+49) {
tmp = t_2;
} else if (b <= -7.8e+36) {
tmp = t_1;
} else if (b <= -2.5e-15) {
tmp = t_2;
} else if (b <= 1.76e-190) {
tmp = t_3;
} else if (b <= 1.1e-24) {
tmp = t_1;
} else if (b <= 2.6e+28) {
tmp = t_3;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) t_2 = b * ((y + t) - 2.0) t_3 = x + (z * (1.0 - y)) tmp = 0 if b <= -2.25e+49: tmp = t_2 elif b <= -7.8e+36: tmp = t_1 elif b <= -2.5e-15: tmp = t_2 elif b <= 1.76e-190: tmp = t_3 elif b <= 1.1e-24: tmp = t_1 elif b <= 2.6e+28: tmp = t_3 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) t_2 = Float64(b * Float64(Float64(y + t) - 2.0)) t_3 = Float64(x + Float64(z * Float64(1.0 - y))) tmp = 0.0 if (b <= -2.25e+49) tmp = t_2; elseif (b <= -7.8e+36) tmp = t_1; elseif (b <= -2.5e-15) tmp = t_2; elseif (b <= 1.76e-190) tmp = t_3; elseif (b <= 1.1e-24) tmp = t_1; elseif (b <= 2.6e+28) tmp = t_3; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); t_2 = b * ((y + t) - 2.0); t_3 = x + (z * (1.0 - y)); tmp = 0.0; if (b <= -2.25e+49) tmp = t_2; elseif (b <= -7.8e+36) tmp = t_1; elseif (b <= -2.5e-15) tmp = t_2; elseif (b <= 1.76e-190) tmp = t_3; elseif (b <= 1.1e-24) tmp = t_1; elseif (b <= 2.6e+28) tmp = t_3; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.25e+49], t$95$2, If[LessEqual[b, -7.8e+36], t$95$1, If[LessEqual[b, -2.5e-15], t$95$2, If[LessEqual[b, 1.76e-190], t$95$3, If[LessEqual[b, 1.1e-24], t$95$1, If[LessEqual[b, 2.6e+28], t$95$3, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
t_2 := b \cdot \left(\left(y + t\right) - 2\right)\\
t_3 := x + z \cdot \left(1 - y\right)\\
\mathbf{if}\;b \leq -2.25 \cdot 10^{+49}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq -7.8 \cdot 10^{+36}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq -2.5 \cdot 10^{-15}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 1.76 \cdot 10^{-190}:\\
\;\;\;\;t\_3\\
\mathbf{elif}\;b \leq 1.1 \cdot 10^{-24}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 2.6 \cdot 10^{+28}:\\
\;\;\;\;t\_3\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -2.24999999999999991e49 or -7.80000000000000042e36 < b < -2.5e-15 or 2.6000000000000002e28 < b Initial program 93.1%
Taylor expanded in b around inf 70.1%
if -2.24999999999999991e49 < b < -7.80000000000000042e36 or 1.75999999999999998e-190 < b < 1.10000000000000001e-24Initial program 100.0%
Taylor expanded in a around inf 58.4%
if -2.5e-15 < b < 1.75999999999999998e-190 or 1.10000000000000001e-24 < b < 2.6000000000000002e28Initial program 99.0%
Taylor expanded in a around 0 69.4%
Taylor expanded in b around 0 62.2%
Final simplification65.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -1.06e+48)
t_1
(if (<= t -5e-33)
(+ x z)
(if (<= t -8e-260)
(* y (- b z))
(if (<= t 9e-218)
(+ x z)
(if (<= t 1.3e-102)
(* b (- y 2.0))
(if (<= t 2.8e+124) (- x (* y z)) t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double tmp;
if (t <= -1.06e+48) {
tmp = t_1;
} else if (t <= -5e-33) {
tmp = x + z;
} else if (t <= -8e-260) {
tmp = y * (b - z);
} else if (t <= 9e-218) {
tmp = x + z;
} else if (t <= 1.3e-102) {
tmp = b * (y - 2.0);
} else if (t <= 2.8e+124) {
tmp = x - (y * z);
} 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 = t * (b - a)
if (t <= (-1.06d+48)) then
tmp = t_1
else if (t <= (-5d-33)) then
tmp = x + z
else if (t <= (-8d-260)) then
tmp = y * (b - z)
else if (t <= 9d-218) then
tmp = x + z
else if (t <= 1.3d-102) then
tmp = b * (y - 2.0d0)
else if (t <= 2.8d+124) then
tmp = x - (y * z)
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 = t * (b - a);
double tmp;
if (t <= -1.06e+48) {
tmp = t_1;
} else if (t <= -5e-33) {
tmp = x + z;
} else if (t <= -8e-260) {
tmp = y * (b - z);
} else if (t <= 9e-218) {
tmp = x + z;
} else if (t <= 1.3e-102) {
tmp = b * (y - 2.0);
} else if (t <= 2.8e+124) {
tmp = x - (y * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) tmp = 0 if t <= -1.06e+48: tmp = t_1 elif t <= -5e-33: tmp = x + z elif t <= -8e-260: tmp = y * (b - z) elif t <= 9e-218: tmp = x + z elif t <= 1.3e-102: tmp = b * (y - 2.0) elif t <= 2.8e+124: tmp = x - (y * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -1.06e+48) tmp = t_1; elseif (t <= -5e-33) tmp = Float64(x + z); elseif (t <= -8e-260) tmp = Float64(y * Float64(b - z)); elseif (t <= 9e-218) tmp = Float64(x + z); elseif (t <= 1.3e-102) tmp = Float64(b * Float64(y - 2.0)); elseif (t <= 2.8e+124) tmp = Float64(x - Float64(y * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); tmp = 0.0; if (t <= -1.06e+48) tmp = t_1; elseif (t <= -5e-33) tmp = x + z; elseif (t <= -8e-260) tmp = y * (b - z); elseif (t <= 9e-218) tmp = x + z; elseif (t <= 1.3e-102) tmp = b * (y - 2.0); elseif (t <= 2.8e+124) tmp = x - (y * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.06e+48], t$95$1, If[LessEqual[t, -5e-33], N[(x + z), $MachinePrecision], If[LessEqual[t, -8e-260], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 9e-218], N[(x + z), $MachinePrecision], If[LessEqual[t, 1.3e-102], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+124], N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -1.06 \cdot 10^{+48}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -5 \cdot 10^{-33}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;t \leq -8 \cdot 10^{-260}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\mathbf{elif}\;t \leq 9 \cdot 10^{-218}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-102}:\\
\;\;\;\;b \cdot \left(y - 2\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+124}:\\
\;\;\;\;x - y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.06e48 or 2.8e124 < t Initial program 92.8%
Taylor expanded in t around inf 75.0%
if -1.06e48 < t < -5.00000000000000028e-33 or -7.99999999999999969e-260 < t < 8.99999999999999953e-218Initial program 100.0%
Taylor expanded in a around 0 80.4%
Taylor expanded in y around 0 59.1%
associate--l+59.1%
sub-neg59.1%
metadata-eval59.1%
neg-mul-159.1%
Simplified59.1%
Taylor expanded in b around 0 49.6%
if -5.00000000000000028e-33 < t < -7.99999999999999969e-260Initial program 95.6%
Taylor expanded in y around inf 49.8%
if 8.99999999999999953e-218 < t < 1.29999999999999993e-102Initial program 100.0%
Taylor expanded in t around inf 54.5%
mul-1-neg54.5%
distribute-rgt-neg-in54.5%
Simplified54.5%
Taylor expanded in t around 0 54.5%
if 1.29999999999999993e-102 < t < 2.8e124Initial program 99.9%
Taylor expanded in a around 0 73.8%
Taylor expanded in b around 0 54.1%
Taylor expanded in y around inf 42.7%
Final simplification58.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- y 2.0))) (t_2 (* t (- b a))))
(if (<= t -8.5e+47)
t_2
(if (<= t -5.8e-31)
(+ x z)
(if (<= t -4.4e-274)
t_1
(if (<= t 1.25e-216) (+ x z) (if (<= t 1.3e+38) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (y - 2.0);
double t_2 = t * (b - a);
double tmp;
if (t <= -8.5e+47) {
tmp = t_2;
} else if (t <= -5.8e-31) {
tmp = x + z;
} else if (t <= -4.4e-274) {
tmp = t_1;
} else if (t <= 1.25e-216) {
tmp = x + z;
} else if (t <= 1.3e+38) {
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 = b * (y - 2.0d0)
t_2 = t * (b - a)
if (t <= (-8.5d+47)) then
tmp = t_2
else if (t <= (-5.8d-31)) then
tmp = x + z
else if (t <= (-4.4d-274)) then
tmp = t_1
else if (t <= 1.25d-216) then
tmp = x + z
else if (t <= 1.3d+38) 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 = b * (y - 2.0);
double t_2 = t * (b - a);
double tmp;
if (t <= -8.5e+47) {
tmp = t_2;
} else if (t <= -5.8e-31) {
tmp = x + z;
} else if (t <= -4.4e-274) {
tmp = t_1;
} else if (t <= 1.25e-216) {
tmp = x + z;
} else if (t <= 1.3e+38) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (y - 2.0) t_2 = t * (b - a) tmp = 0 if t <= -8.5e+47: tmp = t_2 elif t <= -5.8e-31: tmp = x + z elif t <= -4.4e-274: tmp = t_1 elif t <= 1.25e-216: tmp = x + z elif t <= 1.3e+38: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(y - 2.0)) t_2 = Float64(t * Float64(b - a)) tmp = 0.0 if (t <= -8.5e+47) tmp = t_2; elseif (t <= -5.8e-31) tmp = Float64(x + z); elseif (t <= -4.4e-274) tmp = t_1; elseif (t <= 1.25e-216) tmp = Float64(x + z); elseif (t <= 1.3e+38) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (y - 2.0); t_2 = t * (b - a); tmp = 0.0; if (t <= -8.5e+47) tmp = t_2; elseif (t <= -5.8e-31) tmp = x + z; elseif (t <= -4.4e-274) tmp = t_1; elseif (t <= 1.25e-216) tmp = x + z; elseif (t <= 1.3e+38) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -8.5e+47], t$95$2, If[LessEqual[t, -5.8e-31], N[(x + z), $MachinePrecision], If[LessEqual[t, -4.4e-274], t$95$1, If[LessEqual[t, 1.25e-216], N[(x + z), $MachinePrecision], If[LessEqual[t, 1.3e+38], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(y - 2\right)\\
t_2 := t \cdot \left(b - a\right)\\
\mathbf{if}\;t \leq -8.5 \cdot 10^{+47}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{-31}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;t \leq -4.4 \cdot 10^{-274}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.25 \cdot 10^{-216}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{+38}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if t < -8.5000000000000008e47 or 1.3e38 < t Initial program 93.9%
Taylor expanded in t around inf 67.9%
if -8.5000000000000008e47 < t < -5.8000000000000001e-31 or -4.3999999999999999e-274 < t < 1.25000000000000005e-216Initial program 100.0%
Taylor expanded in a around 0 80.8%
Taylor expanded in y around 0 57.4%
associate--l+57.4%
sub-neg57.4%
metadata-eval57.4%
neg-mul-157.4%
Simplified57.4%
Taylor expanded in b around 0 52.1%
if -5.8000000000000001e-31 < t < -4.3999999999999999e-274 or 1.25000000000000005e-216 < t < 1.3e38Initial program 98.0%
Taylor expanded in t around inf 40.1%
mul-1-neg40.1%
distribute-rgt-neg-in40.1%
Simplified40.1%
Taylor expanded in t around 0 39.4%
Final simplification54.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))) (t_2 (* y (- b z))))
(if (<= y -7.5e+31)
t_2
(if (<= y -5e-186)
t_1
(if (<= y -1.9e-269)
(+ x z)
(if (<= y 3.9e-283) t_1 (if (<= y 1.85e+23) (+ x z) t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double t_2 = y * (b - z);
double tmp;
if (y <= -7.5e+31) {
tmp = t_2;
} else if (y <= -5e-186) {
tmp = t_1;
} else if (y <= -1.9e-269) {
tmp = x + z;
} else if (y <= 3.9e-283) {
tmp = t_1;
} else if (y <= 1.85e+23) {
tmp = x + z;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = t * (b - a)
t_2 = y * (b - z)
if (y <= (-7.5d+31)) then
tmp = t_2
else if (y <= (-5d-186)) then
tmp = t_1
else if (y <= (-1.9d-269)) then
tmp = x + z
else if (y <= 3.9d-283) then
tmp = t_1
else if (y <= 1.85d+23) then
tmp = x + z
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * (b - a);
double t_2 = y * (b - z);
double tmp;
if (y <= -7.5e+31) {
tmp = t_2;
} else if (y <= -5e-186) {
tmp = t_1;
} else if (y <= -1.9e-269) {
tmp = x + z;
} else if (y <= 3.9e-283) {
tmp = t_1;
} else if (y <= 1.85e+23) {
tmp = x + z;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = t * (b - a) t_2 = y * (b - z) tmp = 0 if y <= -7.5e+31: tmp = t_2 elif y <= -5e-186: tmp = t_1 elif y <= -1.9e-269: tmp = x + z elif y <= 3.9e-283: tmp = t_1 elif y <= 1.85e+23: tmp = x + z else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(b - a)) t_2 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -7.5e+31) tmp = t_2; elseif (y <= -5e-186) tmp = t_1; elseif (y <= -1.9e-269) tmp = Float64(x + z); elseif (y <= 3.9e-283) tmp = t_1; elseif (y <= 1.85e+23) tmp = Float64(x + z); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = t * (b - a); t_2 = y * (b - z); tmp = 0.0; if (y <= -7.5e+31) tmp = t_2; elseif (y <= -5e-186) tmp = t_1; elseif (y <= -1.9e-269) tmp = x + z; elseif (y <= 3.9e-283) tmp = t_1; elseif (y <= 1.85e+23) tmp = x + z; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.5e+31], t$95$2, If[LessEqual[y, -5e-186], t$95$1, If[LessEqual[y, -1.9e-269], N[(x + z), $MachinePrecision], If[LessEqual[y, 3.9e-283], t$95$1, If[LessEqual[y, 1.85e+23], N[(x + z), $MachinePrecision], t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := t \cdot \left(b - a\right)\\
t_2 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{+31}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-186}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -1.9 \cdot 10^{-269}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 3.9 \cdot 10^{-283}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq 1.85 \cdot 10^{+23}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -7.5e31 or 1.85000000000000006e23 < y Initial program 92.6%
Taylor expanded in y around inf 64.8%
if -7.5e31 < y < -5e-186 or -1.9000000000000001e-269 < y < 3.9000000000000002e-283Initial program 100.0%
Taylor expanded in t around inf 48.9%
if -5e-186 < y < -1.9000000000000001e-269 or 3.9000000000000002e-283 < y < 1.85000000000000006e23Initial program 98.8%
Taylor expanded in a around 0 73.8%
Taylor expanded in y around 0 71.9%
associate--l+71.9%
sub-neg71.9%
metadata-eval71.9%
neg-mul-171.9%
Simplified71.9%
Taylor expanded in b around 0 50.3%
Final simplification56.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* z (- 1.0 y)))) (t_2 (+ x (* b (- (+ y t) 2.0)))))
(if (<= b -4.4e-14)
t_2
(if (<= b 7.2e-187)
t_1
(if (<= b 4.5e-21) (* a (- 1.0 t)) (if (<= b 5e+14) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (1.0 - y));
double t_2 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -4.4e-14) {
tmp = t_2;
} else if (b <= 7.2e-187) {
tmp = t_1;
} else if (b <= 4.5e-21) {
tmp = a * (1.0 - t);
} else if (b <= 5e+14) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = x + (z * (1.0d0 - y))
t_2 = x + (b * ((y + t) - 2.0d0))
if (b <= (-4.4d-14)) then
tmp = t_2
else if (b <= 7.2d-187) then
tmp = t_1
else if (b <= 4.5d-21) then
tmp = a * (1.0d0 - t)
else if (b <= 5d+14) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z * (1.0 - y));
double t_2 = x + (b * ((y + t) - 2.0));
double tmp;
if (b <= -4.4e-14) {
tmp = t_2;
} else if (b <= 7.2e-187) {
tmp = t_1;
} else if (b <= 4.5e-21) {
tmp = a * (1.0 - t);
} else if (b <= 5e+14) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z * (1.0 - y)) t_2 = x + (b * ((y + t) - 2.0)) tmp = 0 if b <= -4.4e-14: tmp = t_2 elif b <= 7.2e-187: tmp = t_1 elif b <= 4.5e-21: tmp = a * (1.0 - t) elif b <= 5e+14: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z * Float64(1.0 - y))) t_2 = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) tmp = 0.0 if (b <= -4.4e-14) tmp = t_2; elseif (b <= 7.2e-187) tmp = t_1; elseif (b <= 4.5e-21) tmp = Float64(a * Float64(1.0 - t)); elseif (b <= 5e+14) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z * (1.0 - y)); t_2 = x + (b * ((y + t) - 2.0)); tmp = 0.0; if (b <= -4.4e-14) tmp = t_2; elseif (b <= 7.2e-187) tmp = t_1; elseif (b <= 4.5e-21) tmp = a * (1.0 - t); elseif (b <= 5e+14) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -4.4e-14], t$95$2, If[LessEqual[b, 7.2e-187], t$95$1, If[LessEqual[b, 4.5e-21], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 5e+14], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + z \cdot \left(1 - y\right)\\
t_2 := x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -4.4 \cdot 10^{-14}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 7.2 \cdot 10^{-187}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{-21}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{elif}\;b \leq 5 \cdot 10^{+14}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if b < -4.4000000000000002e-14 or 5e14 < b Initial program 93.5%
Taylor expanded in a around 0 81.0%
Taylor expanded in z around 0 78.2%
if -4.4000000000000002e-14 < b < 7.19999999999999989e-187 or 4.49999999999999968e-21 < b < 5e14Initial program 99.0%
Taylor expanded in a around 0 69.1%
Taylor expanded in b around 0 61.8%
if 7.19999999999999989e-187 < b < 4.49999999999999968e-21Initial program 99.9%
Taylor expanded in a around inf 53.3%
Final simplification68.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -1.3e+74)
t_1
(if (<= y -2.8e-51)
(+ x (* b (- (+ y t) 2.0)))
(if (<= y -5.4e-74)
(* a (- 1.0 t))
(if (<= y 1.78e+25) (+ x (+ z (* (+ t -2.0) b))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double tmp;
if (y <= -1.3e+74) {
tmp = t_1;
} else if (y <= -2.8e-51) {
tmp = x + (b * ((y + t) - 2.0));
} else if (y <= -5.4e-74) {
tmp = a * (1.0 - t);
} else if (y <= 1.78e+25) {
tmp = x + (z + ((t + -2.0) * 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 = y * (b - z)
if (y <= (-1.3d+74)) then
tmp = t_1
else if (y <= (-2.8d-51)) then
tmp = x + (b * ((y + t) - 2.0d0))
else if (y <= (-5.4d-74)) then
tmp = a * (1.0d0 - t)
else if (y <= 1.78d+25) then
tmp = x + (z + ((t + (-2.0d0)) * 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 = y * (b - z);
double tmp;
if (y <= -1.3e+74) {
tmp = t_1;
} else if (y <= -2.8e-51) {
tmp = x + (b * ((y + t) - 2.0));
} else if (y <= -5.4e-74) {
tmp = a * (1.0 - t);
} else if (y <= 1.78e+25) {
tmp = x + (z + ((t + -2.0) * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -1.3e+74: tmp = t_1 elif y <= -2.8e-51: tmp = x + (b * ((y + t) - 2.0)) elif y <= -5.4e-74: tmp = a * (1.0 - t) elif y <= 1.78e+25: tmp = x + (z + ((t + -2.0) * b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -1.3e+74) tmp = t_1; elseif (y <= -2.8e-51) tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))); elseif (y <= -5.4e-74) tmp = Float64(a * Float64(1.0 - t)); elseif (y <= 1.78e+25) tmp = Float64(x + Float64(z + Float64(Float64(t + -2.0) * b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); tmp = 0.0; if (y <= -1.3e+74) tmp = t_1; elseif (y <= -2.8e-51) tmp = x + (b * ((y + t) - 2.0)); elseif (y <= -5.4e-74) tmp = a * (1.0 - t); elseif (y <= 1.78e+25) tmp = x + (z + ((t + -2.0) * b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.3e+74], t$95$1, If[LessEqual[y, -2.8e-51], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -5.4e-74], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.78e+25], N[(x + N[(z + N[(N[(t + -2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-51}:\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{elif}\;y \leq -5.4 \cdot 10^{-74}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{elif}\;y \leq 1.78 \cdot 10^{+25}:\\
\;\;\;\;x + \left(z + \left(t + -2\right) \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.3e74 or 1.78000000000000005e25 < y Initial program 91.9%
Taylor expanded in y around inf 66.1%
if -1.3e74 < y < -2.8e-51Initial program 99.9%
Taylor expanded in a around 0 73.4%
Taylor expanded in z around 0 69.2%
if -2.8e-51 < y < -5.40000000000000036e-74Initial program 100.0%
Taylor expanded in a around inf 75.4%
if -5.40000000000000036e-74 < y < 1.78000000000000005e25Initial program 99.2%
Taylor expanded in a around 0 73.2%
Taylor expanded in y around 0 71.9%
associate--l+71.9%
sub-neg71.9%
metadata-eval71.9%
neg-mul-171.9%
Simplified71.9%
sub-neg71.9%
add-sqr-sqrt28.3%
sqrt-unprod51.9%
sqr-neg51.9%
sqrt-unprod35.8%
add-sqr-sqrt56.7%
add-sqr-sqrt20.9%
sqrt-unprod52.8%
sqr-neg52.8%
sqrt-unprod43.5%
add-sqr-sqrt71.9%
Applied egg-rr71.9%
Final simplification69.5%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (+ z (* -2.0 b)))) (t_2 (* y (- b z))))
(if (<= y -4500000000.0)
t_2
(if (<= y -2.8e-51)
t_1
(if (<= y -2e-156) (* a (- 1.0 t)) (if (<= y 9.5e+24) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z + (-2.0 * b));
double t_2 = y * (b - z);
double tmp;
if (y <= -4500000000.0) {
tmp = t_2;
} else if (y <= -2.8e-51) {
tmp = t_1;
} else if (y <= -2e-156) {
tmp = a * (1.0 - t);
} else if (y <= 9.5e+24) {
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 = x + (z + ((-2.0d0) * b))
t_2 = y * (b - z)
if (y <= (-4500000000.0d0)) then
tmp = t_2
else if (y <= (-2.8d-51)) then
tmp = t_1
else if (y <= (-2d-156)) then
tmp = a * (1.0d0 - t)
else if (y <= 9.5d+24) 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 = x + (z + (-2.0 * b));
double t_2 = y * (b - z);
double tmp;
if (y <= -4500000000.0) {
tmp = t_2;
} else if (y <= -2.8e-51) {
tmp = t_1;
} else if (y <= -2e-156) {
tmp = a * (1.0 - t);
} else if (y <= 9.5e+24) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z + (-2.0 * b)) t_2 = y * (b - z) tmp = 0 if y <= -4500000000.0: tmp = t_2 elif y <= -2.8e-51: tmp = t_1 elif y <= -2e-156: tmp = a * (1.0 - t) elif y <= 9.5e+24: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z + Float64(-2.0 * b))) t_2 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -4500000000.0) tmp = t_2; elseif (y <= -2.8e-51) tmp = t_1; elseif (y <= -2e-156) tmp = Float64(a * Float64(1.0 - t)); elseif (y <= 9.5e+24) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (z + (-2.0 * b)); t_2 = y * (b - z); tmp = 0.0; if (y <= -4500000000.0) tmp = t_2; elseif (y <= -2.8e-51) tmp = t_1; elseif (y <= -2e-156) tmp = a * (1.0 - t); elseif (y <= 9.5e+24) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(z + N[(-2.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4500000000.0], t$95$2, If[LessEqual[y, -2.8e-51], t$95$1, If[LessEqual[y, -2e-156], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.5e+24], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z + -2 \cdot b\right)\\
t_2 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -4500000000:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;y \leq -2.8 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-156}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{elif}\;y \leq 9.5 \cdot 10^{+24}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if y < -4.5e9 or 9.5000000000000001e24 < y Initial program 92.9%
Taylor expanded in y around inf 63.8%
if -4.5e9 < y < -2.8e-51 or -2.00000000000000008e-156 < y < 9.5000000000000001e24Initial program 99.1%
Taylor expanded in a around 0 75.9%
Taylor expanded in y around 0 74.5%
associate--l+74.5%
sub-neg74.5%
metadata-eval74.5%
neg-mul-174.5%
Simplified74.5%
Taylor expanded in t around 0 56.6%
*-commutative56.6%
Simplified56.6%
if -2.8e-51 < y < -2.00000000000000008e-156Initial program 100.0%
Taylor expanded in a around inf 58.3%
Final simplification59.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))))
(if (<= a -2.5e-51)
t_1
(if (<= a -6.5e-153)
(+ x z)
(if (<= a -9.5e-170) (* y b) (if (<= a 3.6e+25) (+ x z) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double tmp;
if (a <= -2.5e-51) {
tmp = t_1;
} else if (a <= -6.5e-153) {
tmp = x + z;
} else if (a <= -9.5e-170) {
tmp = y * b;
} else if (a <= 3.6e+25) {
tmp = x + z;
} 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 * (1.0d0 - t)
if (a <= (-2.5d-51)) then
tmp = t_1
else if (a <= (-6.5d-153)) then
tmp = x + z
else if (a <= (-9.5d-170)) then
tmp = y * b
else if (a <= 3.6d+25) then
tmp = x + z
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 * (1.0 - t);
double tmp;
if (a <= -2.5e-51) {
tmp = t_1;
} else if (a <= -6.5e-153) {
tmp = x + z;
} else if (a <= -9.5e-170) {
tmp = y * b;
} else if (a <= 3.6e+25) {
tmp = x + z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) tmp = 0 if a <= -2.5e-51: tmp = t_1 elif a <= -6.5e-153: tmp = x + z elif a <= -9.5e-170: tmp = y * b elif a <= 3.6e+25: tmp = x + z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) tmp = 0.0 if (a <= -2.5e-51) tmp = t_1; elseif (a <= -6.5e-153) tmp = Float64(x + z); elseif (a <= -9.5e-170) tmp = Float64(y * b); elseif (a <= 3.6e+25) tmp = Float64(x + z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); tmp = 0.0; if (a <= -2.5e-51) tmp = t_1; elseif (a <= -6.5e-153) tmp = x + z; elseif (a <= -9.5e-170) tmp = y * b; elseif (a <= 3.6e+25) tmp = x + z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.5e-51], t$95$1, If[LessEqual[a, -6.5e-153], N[(x + z), $MachinePrecision], If[LessEqual[a, -9.5e-170], N[(y * b), $MachinePrecision], If[LessEqual[a, 3.6e+25], N[(x + z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;a \leq -2.5 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -6.5 \cdot 10^{-153}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;a \leq -9.5 \cdot 10^{-170}:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;a \leq 3.6 \cdot 10^{+25}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -2.50000000000000002e-51 or 3.60000000000000015e25 < a Initial program 94.4%
Taylor expanded in a around inf 50.2%
if -2.50000000000000002e-51 < a < -6.50000000000000032e-153 or -9.5000000000000001e-170 < a < 3.60000000000000015e25Initial program 99.2%
Taylor expanded in a around 0 91.6%
Taylor expanded in y around 0 62.0%
associate--l+62.0%
sub-neg62.0%
metadata-eval62.0%
neg-mul-162.0%
Simplified62.0%
Taylor expanded in b around 0 39.0%
if -6.50000000000000032e-153 < a < -9.5000000000000001e-170Initial program 83.3%
Taylor expanded in y around inf 69.5%
Taylor expanded in b around inf 69.6%
Final simplification45.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))))
(if (<= a -1.8e-51)
t_1
(if (<= a -2.35e-225)
(+ x z)
(if (<= a -2.4e-279)
(* b (- y 2.0))
(if (<= a 3.2e+25) (+ x z) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (1.0 - t);
double tmp;
if (a <= -1.8e-51) {
tmp = t_1;
} else if (a <= -2.35e-225) {
tmp = x + z;
} else if (a <= -2.4e-279) {
tmp = b * (y - 2.0);
} else if (a <= 3.2e+25) {
tmp = x + z;
} 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 * (1.0d0 - t)
if (a <= (-1.8d-51)) then
tmp = t_1
else if (a <= (-2.35d-225)) then
tmp = x + z
else if (a <= (-2.4d-279)) then
tmp = b * (y - 2.0d0)
else if (a <= 3.2d+25) then
tmp = x + z
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 * (1.0 - t);
double tmp;
if (a <= -1.8e-51) {
tmp = t_1;
} else if (a <= -2.35e-225) {
tmp = x + z;
} else if (a <= -2.4e-279) {
tmp = b * (y - 2.0);
} else if (a <= 3.2e+25) {
tmp = x + z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) tmp = 0 if a <= -1.8e-51: tmp = t_1 elif a <= -2.35e-225: tmp = x + z elif a <= -2.4e-279: tmp = b * (y - 2.0) elif a <= 3.2e+25: tmp = x + z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) tmp = 0.0 if (a <= -1.8e-51) tmp = t_1; elseif (a <= -2.35e-225) tmp = Float64(x + z); elseif (a <= -2.4e-279) tmp = Float64(b * Float64(y - 2.0)); elseif (a <= 3.2e+25) tmp = Float64(x + z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = a * (1.0 - t); tmp = 0.0; if (a <= -1.8e-51) tmp = t_1; elseif (a <= -2.35e-225) tmp = x + z; elseif (a <= -2.4e-279) tmp = b * (y - 2.0); elseif (a <= 3.2e+25) tmp = x + z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.8e-51], t$95$1, If[LessEqual[a, -2.35e-225], N[(x + z), $MachinePrecision], If[LessEqual[a, -2.4e-279], N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.2e+25], N[(x + z), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;a \leq -1.8 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq -2.35 \cdot 10^{-225}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;a \leq -2.4 \cdot 10^{-279}:\\
\;\;\;\;b \cdot \left(y - 2\right)\\
\mathbf{elif}\;a \leq 3.2 \cdot 10^{+25}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -1.8e-51 or 3.1999999999999999e25 < a Initial program 94.4%
Taylor expanded in a around inf 50.2%
if -1.8e-51 < a < -2.35000000000000007e-225 or -2.3999999999999999e-279 < a < 3.1999999999999999e25Initial program 98.3%
Taylor expanded in a around 0 89.9%
Taylor expanded in y around 0 62.3%
associate--l+62.3%
sub-neg62.3%
metadata-eval62.3%
neg-mul-162.3%
Simplified62.3%
Taylor expanded in b around 0 39.5%
if -2.35000000000000007e-225 < a < -2.3999999999999999e-279Initial program 100.0%
Taylor expanded in t around inf 64.1%
mul-1-neg64.1%
distribute-rgt-neg-in64.1%
Simplified64.1%
Taylor expanded in t around 0 64.1%
Final simplification45.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.1e-17) (not (<= b 200000000000.0))) (+ (+ x (* b (- (+ y t) 2.0))) (* a (- 1.0 t))) (+ (- x (* t a)) (+ a (* z (- 1.0 y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.1e-17) || !(b <= 200000000000.0)) {
tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t));
} else {
tmp = (x - (t * a)) + (a + (z * (1.0 - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-1.1d-17)) .or. (.not. (b <= 200000000000.0d0))) then
tmp = (x + (b * ((y + t) - 2.0d0))) + (a * (1.0d0 - t))
else
tmp = (x - (t * a)) + (a + (z * (1.0d0 - y)))
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.1e-17) || !(b <= 200000000000.0)) {
tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t));
} else {
tmp = (x - (t * a)) + (a + (z * (1.0 - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.1e-17) or not (b <= 200000000000.0): tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t)) else: tmp = (x - (t * a)) + (a + (z * (1.0 - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.1e-17) || !(b <= 200000000000.0)) tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) + Float64(a * Float64(1.0 - t))); else tmp = Float64(Float64(x - Float64(t * a)) + Float64(a + Float64(z * Float64(1.0 - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.1e-17) || ~((b <= 200000000000.0))) tmp = (x + (b * ((y + t) - 2.0))) + (a * (1.0 - t)); else tmp = (x - (t * a)) + (a + (z * (1.0 - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.1e-17], N[Not[LessEqual[b, 200000000000.0]], $MachinePrecision]], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(a + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.1 \cdot 10^{-17} \lor \neg \left(b \leq 200000000000\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + a \cdot \left(1 - t\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x - t \cdot a\right) + \left(a + z \cdot \left(1 - y\right)\right)\\
\end{array}
\end{array}
if b < -1.1e-17 or 2e11 < b Initial program 93.5%
Taylor expanded in z around 0 90.8%
if -1.1e-17 < b < 2e11Initial program 99.2%
Taylor expanded in t around 0 99.2%
Taylor expanded in b around 0 90.6%
sub-neg90.6%
mul-1-neg90.6%
*-commutative90.6%
unsub-neg90.6%
sub-neg90.6%
metadata-eval90.6%
*-commutative90.6%
distribute-neg-in90.6%
mul-1-neg90.6%
remove-double-neg90.6%
sub-neg90.6%
*-commutative90.6%
Simplified90.6%
Final simplification90.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -6.2e+74)
t_1
(if (<= y -51000000.0)
(- (* b (- (+ y t) 2.0)) (* t a))
(if (<= y 6e+24) (+ x (+ z (* (+ t -2.0) b))) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double tmp;
if (y <= -6.2e+74) {
tmp = t_1;
} else if (y <= -51000000.0) {
tmp = (b * ((y + t) - 2.0)) - (t * a);
} else if (y <= 6e+24) {
tmp = x + (z + ((t + -2.0) * 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 = y * (b - z)
if (y <= (-6.2d+74)) then
tmp = t_1
else if (y <= (-51000000.0d0)) then
tmp = (b * ((y + t) - 2.0d0)) - (t * a)
else if (y <= 6d+24) then
tmp = x + (z + ((t + (-2.0d0)) * 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 = y * (b - z);
double tmp;
if (y <= -6.2e+74) {
tmp = t_1;
} else if (y <= -51000000.0) {
tmp = (b * ((y + t) - 2.0)) - (t * a);
} else if (y <= 6e+24) {
tmp = x + (z + ((t + -2.0) * b));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -6.2e+74: tmp = t_1 elif y <= -51000000.0: tmp = (b * ((y + t) - 2.0)) - (t * a) elif y <= 6e+24: tmp = x + (z + ((t + -2.0) * b)) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -6.2e+74) tmp = t_1; elseif (y <= -51000000.0) tmp = Float64(Float64(b * Float64(Float64(y + t) - 2.0)) - Float64(t * a)); elseif (y <= 6e+24) tmp = Float64(x + Float64(z + Float64(Float64(t + -2.0) * b))); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); tmp = 0.0; if (y <= -6.2e+74) tmp = t_1; elseif (y <= -51000000.0) tmp = (b * ((y + t) - 2.0)) - (t * a); elseif (y <= 6e+24) tmp = x + (z + ((t + -2.0) * b)); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -6.2e+74], t$95$1, If[LessEqual[y, -51000000.0], N[(N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision] - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e+24], N[(x + N[(z + N[(N[(t + -2.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -6.2 \cdot 10^{+74}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -51000000:\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right) - t \cdot a\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+24}:\\
\;\;\;\;x + \left(z + \left(t + -2\right) \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -6.20000000000000043e74 or 5.9999999999999999e24 < y Initial program 91.9%
Taylor expanded in y around inf 66.1%
if -6.20000000000000043e74 < y < -5.1e7Initial program 99.9%
Taylor expanded in t around inf 80.7%
mul-1-neg80.7%
distribute-rgt-neg-in80.7%
Simplified80.7%
if -5.1e7 < y < 5.9999999999999999e24Initial program 99.3%
Taylor expanded in a around 0 71.6%
Taylor expanded in y around 0 70.4%
associate--l+70.4%
sub-neg70.4%
metadata-eval70.4%
neg-mul-170.4%
Simplified70.4%
sub-neg70.4%
add-sqr-sqrt28.8%
sqrt-unprod51.9%
sqr-neg51.9%
sqrt-unprod34.0%
add-sqr-sqrt56.2%
add-sqr-sqrt22.2%
sqrt-unprod54.1%
sqr-neg54.1%
sqrt-unprod41.5%
add-sqr-sqrt70.4%
Applied egg-rr70.4%
Final simplification69.3%
(FPCore (x y z t a b)
:precision binary64
(if (<= y -46000000.0)
(* y b)
(if (<= y -1.25e-269)
(+ x z)
(if (<= y 7.8e-283) (* t b) (if (<= y 1.02e+25) (+ x z) (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y <= -46000000.0) {
tmp = y * b;
} else if (y <= -1.25e-269) {
tmp = x + z;
} else if (y <= 7.8e-283) {
tmp = t * b;
} else if (y <= 1.02e+25) {
tmp = x + z;
} else {
tmp = y * 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 (y <= (-46000000.0d0)) then
tmp = y * b
else if (y <= (-1.25d-269)) then
tmp = x + z
else if (y <= 7.8d-283) then
tmp = t * b
else if (y <= 1.02d+25) then
tmp = x + z
else
tmp = y * 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 (y <= -46000000.0) {
tmp = y * b;
} else if (y <= -1.25e-269) {
tmp = x + z;
} else if (y <= 7.8e-283) {
tmp = t * b;
} else if (y <= 1.02e+25) {
tmp = x + z;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y <= -46000000.0: tmp = y * b elif y <= -1.25e-269: tmp = x + z elif y <= 7.8e-283: tmp = t * b elif y <= 1.02e+25: tmp = x + z else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y <= -46000000.0) tmp = Float64(y * b); elseif (y <= -1.25e-269) tmp = Float64(x + z); elseif (y <= 7.8e-283) tmp = Float64(t * b); elseif (y <= 1.02e+25) tmp = Float64(x + z); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y <= -46000000.0) tmp = y * b; elseif (y <= -1.25e-269) tmp = x + z; elseif (y <= 7.8e-283) tmp = t * b; elseif (y <= 1.02e+25) tmp = x + z; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -46000000.0], N[(y * b), $MachinePrecision], If[LessEqual[y, -1.25e-269], N[(x + z), $MachinePrecision], If[LessEqual[y, 7.8e-283], N[(t * b), $MachinePrecision], If[LessEqual[y, 1.02e+25], N[(x + z), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -46000000:\\
\;\;\;\;y \cdot b\\
\mathbf{elif}\;y \leq -1.25 \cdot 10^{-269}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 7.8 \cdot 10^{-283}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;y \leq 1.02 \cdot 10^{+25}:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if y < -4.6e7 or 1.0199999999999999e25 < y Initial program 92.9%
Taylor expanded in y around inf 63.3%
Taylor expanded in b around inf 37.7%
if -4.6e7 < y < -1.24999999999999995e-269 or 7.8000000000000004e-283 < y < 1.0199999999999999e25Initial program 99.2%
Taylor expanded in a around 0 70.9%
Taylor expanded in y around 0 69.6%
associate--l+69.6%
sub-neg69.6%
metadata-eval69.6%
neg-mul-169.6%
Simplified69.6%
Taylor expanded in b around 0 44.5%
if -1.24999999999999995e-269 < y < 7.8000000000000004e-283Initial program 100.0%
Taylor expanded in t around inf 60.8%
Taylor expanded in b around inf 41.7%
Final simplification41.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -5e+49) (not (<= b 1.1e+57))) (+ x (* b (- (+ y t) 2.0))) (+ (- x (* t a)) (+ a (* z (- 1.0 y))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -5e+49) || !(b <= 1.1e+57)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = (x - (t * a)) + (a + (z * (1.0 - y)));
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((b <= (-5d+49)) .or. (.not. (b <= 1.1d+57))) then
tmp = x + (b * ((y + t) - 2.0d0))
else
tmp = (x - (t * a)) + (a + (z * (1.0d0 - y)))
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 <= -5e+49) || !(b <= 1.1e+57)) {
tmp = x + (b * ((y + t) - 2.0));
} else {
tmp = (x - (t * a)) + (a + (z * (1.0 - y)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -5e+49) or not (b <= 1.1e+57): tmp = x + (b * ((y + t) - 2.0)) else: tmp = (x - (t * a)) + (a + (z * (1.0 - y))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -5e+49) || !(b <= 1.1e+57)) tmp = Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))); else tmp = Float64(Float64(x - Float64(t * a)) + Float64(a + Float64(z * Float64(1.0 - y)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -5e+49) || ~((b <= 1.1e+57))) tmp = x + (b * ((y + t) - 2.0)); else tmp = (x - (t * a)) + (a + (z * (1.0 - y))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -5e+49], N[Not[LessEqual[b, 1.1e+57]], $MachinePrecision]], N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(a + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{+49} \lor \neg \left(b \leq 1.1 \cdot 10^{+57}\right):\\
\;\;\;\;x + b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x - t \cdot a\right) + \left(a + z \cdot \left(1 - y\right)\right)\\
\end{array}
\end{array}
if b < -5.0000000000000004e49 or 1.1e57 < b Initial program 92.2%
Taylor expanded in a around 0 86.2%
Taylor expanded in z around 0 84.7%
if -5.0000000000000004e49 < b < 1.1e57Initial program 99.3%
Taylor expanded in t around 0 99.3%
Taylor expanded in b around 0 86.4%
sub-neg86.4%
mul-1-neg86.4%
*-commutative86.4%
unsub-neg86.4%
sub-neg86.4%
metadata-eval86.4%
*-commutative86.4%
distribute-neg-in86.4%
mul-1-neg86.4%
remove-double-neg86.4%
sub-neg86.4%
*-commutative86.4%
Simplified86.4%
Final simplification85.8%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -13200000000.0) (not (<= y 1.26e+26))) (* y b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -13200000000.0) || !(y <= 1.26e+26)) {
tmp = y * b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-13200000000.0d0)) .or. (.not. (y <= 1.26d+26))) then
tmp = y * b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -13200000000.0) || !(y <= 1.26e+26)) {
tmp = y * b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -13200000000.0) or not (y <= 1.26e+26): tmp = y * b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -13200000000.0) || !(y <= 1.26e+26)) tmp = Float64(y * b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -13200000000.0) || ~((y <= 1.26e+26))) tmp = y * b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -13200000000.0], N[Not[LessEqual[y, 1.26e+26]], $MachinePrecision]], N[(y * b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -13200000000 \lor \neg \left(y \leq 1.26 \cdot 10^{+26}\right):\\
\;\;\;\;y \cdot b\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if y < -1.32e10 or 1.25999999999999995e26 < y Initial program 92.8%
Taylor expanded in y around inf 64.3%
Taylor expanded in b around inf 38.3%
if -1.32e10 < y < 1.25999999999999995e26Initial program 99.3%
Taylor expanded in x around inf 27.1%
Final simplification32.0%
(FPCore (x y z t a b) :precision binary64 (if (<= x -2.15e+111) x (if (<= x 7.8e+101) (* -2.0 b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.15e+111) {
tmp = x;
} else if (x <= 7.8e+101) {
tmp = -2.0 * b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-2.15d+111)) then
tmp = x
else if (x <= 7.8d+101) then
tmp = (-2.0d0) * b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -2.15e+111) {
tmp = x;
} else if (x <= 7.8e+101) {
tmp = -2.0 * b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -2.15e+111: tmp = x elif x <= 7.8e+101: tmp = -2.0 * b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -2.15e+111) tmp = x; elseif (x <= 7.8e+101) tmp = Float64(-2.0 * b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -2.15e+111) tmp = x; elseif (x <= 7.8e+101) tmp = -2.0 * b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.15e+111], x, If[LessEqual[x, 7.8e+101], N[(-2.0 * b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.15 \cdot 10^{+111}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 7.8 \cdot 10^{+101}:\\
\;\;\;\;-2 \cdot b\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -2.14999999999999997e111 or 7.8e101 < x Initial program 100.0%
Taylor expanded in x around inf 49.1%
if -2.14999999999999997e111 < x < 7.8e101Initial program 94.8%
Taylor expanded in t around inf 55.4%
mul-1-neg55.4%
distribute-rgt-neg-in55.4%
Simplified55.4%
Taylor expanded in t around 0 28.1%
Taylor expanded in y around 0 11.5%
*-commutative11.5%
Simplified11.5%
Final simplification23.4%
(FPCore (x y z t a b) :precision binary64 (if (<= x -9.5e+154) x (if (<= x 1.8e-142) (* t b) x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -9.5e+154) {
tmp = x;
} else if (x <= 1.8e-142) {
tmp = t * b;
} else {
tmp = x;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (x <= (-9.5d+154)) then
tmp = x
else if (x <= 1.8d-142) then
tmp = t * b
else
tmp = x
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -9.5e+154) {
tmp = x;
} else if (x <= 1.8e-142) {
tmp = t * b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -9.5e+154: tmp = x elif x <= 1.8e-142: tmp = t * b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -9.5e+154) tmp = x; elseif (x <= 1.8e-142) tmp = Float64(t * b); else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -9.5e+154) tmp = x; elseif (x <= 1.8e-142) tmp = t * b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -9.5e+154], x, If[LessEqual[x, 1.8e-142], N[(t * b), $MachinePrecision], x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+154}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.8 \cdot 10^{-142}:\\
\;\;\;\;t \cdot b\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -9.5000000000000001e154 or 1.8e-142 < x Initial program 99.2%
Taylor expanded in x around inf 33.9%
if -9.5000000000000001e154 < x < 1.8e-142Initial program 93.7%
Taylor expanded in t around inf 42.1%
Taylor expanded in b around inf 22.3%
Final simplification28.1%
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
return x;
}
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
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return x;
}
def code(x, y, z, t, a, b): return x
function code(x, y, z, t, a, b) return x end
function tmp = code(x, y, z, t, a, b) tmp = x; end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}
\\
x
\end{array}
Initial program 96.5%
Taylor expanded in x around inf 19.2%
Final simplification19.2%
herbie shell --seed 2024082
(FPCore (x y z t a b)
:name "Statistics.Distribution.Beta:$centropy from math-functions-0.1.5.2"
:precision binary64
(+ (- (- x (* (- y 1.0) z)) (* (- t 1.0) a)) (* (- (+ y t) 2.0) b)))