
(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 24 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
(+ (+ (- x (* z (- y 1.0))) (* a (- 1.0 t))) (* b (- (+ t y) 2.0)))))
(if (<= t_1 INFINITY) t_1 (fma y (- b z) (* b (+ t -2.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x - (z * (y - 1.0))) + (a * (1.0 - t))) + (b * ((t + y) - 2.0));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = fma(y, (b - z), (b * (t + -2.0)));
}
return tmp;
}
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x - Float64(z * Float64(y - 1.0))) + Float64(a * Float64(1.0 - t))) + Float64(b * Float64(Float64(t + y) - 2.0))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = fma(y, Float64(b - z), Float64(b * Float64(t + -2.0))); end return tmp end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(y * N[(b - z), $MachinePrecision] + N[(b * N[(t + -2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x - z \cdot \left(y - 1\right)\right) + a \cdot \left(1 - t\right)\right) + b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y, b - z, b \cdot \left(t + -2\right)\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b)) Initial program 0.0%
Taylor expanded in y around inf 23.1%
mul-1-neg23.1%
distribute-rgt-neg-in23.1%
Simplified23.1%
Taylor expanded in y around 0 46.2%
*-commutative46.2%
sub-neg46.2%
metadata-eval46.2%
*-commutative46.2%
fma-def61.5%
+-commutative61.5%
mul-1-neg61.5%
unsub-neg61.5%
Simplified61.5%
Final simplification98.0%
(FPCore (x y z t a b) :precision binary64 (fma (+ t (- y 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((t + (y - 2.0)), b, (x - fma((y - 1.0), z, (a * (t + -1.0)))));
}
function code(x, y, z, t, a, b) return fma(Float64(t + Float64(y - 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[(t + N[(y - 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(t + \left(y - 2\right), b, x - \mathsf{fma}\left(y - 1, z, a \cdot \left(t + -1\right)\right)\right)
\end{array}
Initial program 94.9%
+-commutative94.9%
fma-def97.2%
+-commutative97.2%
associate--l+97.2%
sub-neg97.2%
associate-+l-97.2%
fma-neg97.6%
sub-neg97.6%
metadata-eval97.6%
distribute-lft-neg-in97.6%
distribute-lft-neg-in97.6%
remove-double-neg97.6%
sub-neg97.6%
metadata-eval97.6%
Simplified97.6%
Final simplification97.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1
(+ (+ (- x (* z (- y 1.0))) (* a (- 1.0 t))) (* b (- (+ t y) 2.0)))))
(if (<= t_1 INFINITY) t_1 (* y (- b z)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x - (z * (y - 1.0))) + (a * (1.0 - t))) + (b * ((t + y) - 2.0));
double tmp;
if (t_1 <= ((double) INFINITY)) {
tmp = t_1;
} else {
tmp = y * (b - z);
}
return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x - (z * (y - 1.0))) + (a * (1.0 - t))) + (b * ((t + y) - 2.0));
double tmp;
if (t_1 <= Double.POSITIVE_INFINITY) {
tmp = t_1;
} else {
tmp = y * (b - z);
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = ((x - (z * (y - 1.0))) + (a * (1.0 - t))) + (b * ((t + y) - 2.0)) tmp = 0 if t_1 <= math.inf: tmp = t_1 else: tmp = y * (b - z) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(Float64(Float64(x - Float64(z * Float64(y - 1.0))) + Float64(a * Float64(1.0 - t))) + Float64(b * Float64(Float64(t + y) - 2.0))) tmp = 0.0 if (t_1 <= Inf) tmp = t_1; else tmp = Float64(y * Float64(b - z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = ((x - (z * (y - 1.0))) + (a * (1.0 - t))) + (b * ((t + y) - 2.0)); tmp = 0.0; if (t_1 <= Inf) tmp = t_1; else tmp = y * (b - z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, Infinity], t$95$1, N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := \left(\left(x - z \cdot \left(y - 1\right)\right) + a \cdot \left(1 - t\right)\right) + b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;t_1 \leq \infty:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(b - z\right)\\
\end{array}
\end{array}
if (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b)) < +inf.0Initial program 100.0%
if +inf.0 < (+.f64 (-.f64 (-.f64 x (*.f64 (-.f64 y 1) z)) (*.f64 (-.f64 t 1) a)) (*.f64 (-.f64 (+.f64 y t) 2) b)) Initial program 0.0%
Taylor expanded in y around inf 54.3%
Final simplification97.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (- z (* y z))))
(t_2 (+ x (* b (- (+ t y) 2.0))))
(t_3 (+ x (- a (* t a)))))
(if (<= b -1.2e+32)
t_2
(if (<= b -9.2e-265)
t_1
(if (<= b 1e-256)
t_3
(if (<= b 9.5e-212)
(- (+ z a) (* y z))
(if (<= b 6e-70) t_3 (if (<= b 1.56e+44) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z - (y * z));
double t_2 = x + (b * ((t + y) - 2.0));
double t_3 = x + (a - (t * a));
double tmp;
if (b <= -1.2e+32) {
tmp = t_2;
} else if (b <= -9.2e-265) {
tmp = t_1;
} else if (b <= 1e-256) {
tmp = t_3;
} else if (b <= 9.5e-212) {
tmp = (z + a) - (y * z);
} else if (b <= 6e-70) {
tmp = t_3;
} else if (b <= 1.56e+44) {
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) :: t_3
real(8) :: tmp
t_1 = x + (z - (y * z))
t_2 = x + (b * ((t + y) - 2.0d0))
t_3 = x + (a - (t * a))
if (b <= (-1.2d+32)) then
tmp = t_2
else if (b <= (-9.2d-265)) then
tmp = t_1
else if (b <= 1d-256) then
tmp = t_3
else if (b <= 9.5d-212) then
tmp = (z + a) - (y * z)
else if (b <= 6d-70) then
tmp = t_3
else if (b <= 1.56d+44) 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 - (y * z));
double t_2 = x + (b * ((t + y) - 2.0));
double t_3 = x + (a - (t * a));
double tmp;
if (b <= -1.2e+32) {
tmp = t_2;
} else if (b <= -9.2e-265) {
tmp = t_1;
} else if (b <= 1e-256) {
tmp = t_3;
} else if (b <= 9.5e-212) {
tmp = (z + a) - (y * z);
} else if (b <= 6e-70) {
tmp = t_3;
} else if (b <= 1.56e+44) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z - (y * z)) t_2 = x + (b * ((t + y) - 2.0)) t_3 = x + (a - (t * a)) tmp = 0 if b <= -1.2e+32: tmp = t_2 elif b <= -9.2e-265: tmp = t_1 elif b <= 1e-256: tmp = t_3 elif b <= 9.5e-212: tmp = (z + a) - (y * z) elif b <= 6e-70: tmp = t_3 elif b <= 1.56e+44: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z - Float64(y * z))) t_2 = Float64(x + Float64(b * Float64(Float64(t + y) - 2.0))) t_3 = Float64(x + Float64(a - Float64(t * a))) tmp = 0.0 if (b <= -1.2e+32) tmp = t_2; elseif (b <= -9.2e-265) tmp = t_1; elseif (b <= 1e-256) tmp = t_3; elseif (b <= 9.5e-212) tmp = Float64(Float64(z + a) - Float64(y * z)); elseif (b <= 6e-70) tmp = t_3; elseif (b <= 1.56e+44) 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 - (y * z)); t_2 = x + (b * ((t + y) - 2.0)); t_3 = x + (a - (t * a)); tmp = 0.0; if (b <= -1.2e+32) tmp = t_2; elseif (b <= -9.2e-265) tmp = t_1; elseif (b <= 1e-256) tmp = t_3; elseif (b <= 9.5e-212) tmp = (z + a) - (y * z); elseif (b <= 6e-70) tmp = t_3; elseif (b <= 1.56e+44) 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[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.2e+32], t$95$2, If[LessEqual[b, -9.2e-265], t$95$1, If[LessEqual[b, 1e-256], t$95$3, If[LessEqual[b, 9.5e-212], N[(N[(z + a), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6e-70], t$95$3, If[LessEqual[b, 1.56e+44], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z - y \cdot z\right)\\
t_2 := x + b \cdot \left(\left(t + y\right) - 2\right)\\
t_3 := x + \left(a - t \cdot a\right)\\
\mathbf{if}\;b \leq -1.2 \cdot 10^{+32}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -9.2 \cdot 10^{-265}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 10^{-256}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{-212}:\\
\;\;\;\;\left(z + a\right) - y \cdot z\\
\mathbf{elif}\;b \leq 6 \cdot 10^{-70}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 1.56 \cdot 10^{+44}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -1.19999999999999996e32 or 1.56e44 < b Initial program 89.0%
Taylor expanded in a around 0 85.2%
Taylor expanded in z around 0 83.0%
if -1.19999999999999996e32 < b < -9.1999999999999996e-265 or 6.0000000000000003e-70 < b < 1.56e44Initial program 99.0%
Taylor expanded in b around 0 89.9%
Taylor expanded in a around 0 64.4%
sub-neg64.4%
metadata-eval64.4%
distribute-rgt-in64.4%
neg-mul-164.4%
unsub-neg64.4%
*-commutative64.4%
Simplified64.4%
if -9.1999999999999996e-265 < b < 9.99999999999999977e-257 or 9.50000000000000029e-212 < b < 6.0000000000000003e-70Initial program 100.0%
Taylor expanded in b around 0 87.3%
Taylor expanded in a around inf 67.7%
sub-neg67.7%
metadata-eval67.7%
*-commutative67.7%
distribute-rgt-in67.7%
neg-mul-167.7%
unsub-neg67.7%
*-commutative67.7%
Simplified67.7%
if 9.99999999999999977e-257 < b < 9.50000000000000029e-212Initial program 100.0%
Taylor expanded in b around 0 100.0%
Taylor expanded in t around 0 83.9%
fma-def84.0%
sub-neg84.0%
metadata-eval84.0%
fma-def83.9%
neg-mul-183.9%
unsub-neg83.9%
distribute-rgt-in83.9%
neg-mul-183.9%
unsub-neg83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in x around 0 75.4%
Final simplification73.3%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (- z (* y z))))
(t_2 (* b (- (+ t y) 2.0)))
(t_3 (+ x (- a (* t a)))))
(if (<= b -1.05e+32)
t_2
(if (<= b -3.6e-264)
t_1
(if (<= b 2.35e-282)
t_3
(if (<= b 2.1e-211)
t_1
(if (<= b 6e-70) t_3 (if (<= b 1.05e+110) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z - (y * z));
double t_2 = b * ((t + y) - 2.0);
double t_3 = x + (a - (t * a));
double tmp;
if (b <= -1.05e+32) {
tmp = t_2;
} else if (b <= -3.6e-264) {
tmp = t_1;
} else if (b <= 2.35e-282) {
tmp = t_3;
} else if (b <= 2.1e-211) {
tmp = t_1;
} else if (b <= 6e-70) {
tmp = t_3;
} else if (b <= 1.05e+110) {
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) :: t_3
real(8) :: tmp
t_1 = x + (z - (y * z))
t_2 = b * ((t + y) - 2.0d0)
t_3 = x + (a - (t * a))
if (b <= (-1.05d+32)) then
tmp = t_2
else if (b <= (-3.6d-264)) then
tmp = t_1
else if (b <= 2.35d-282) then
tmp = t_3
else if (b <= 2.1d-211) then
tmp = t_1
else if (b <= 6d-70) then
tmp = t_3
else if (b <= 1.05d+110) 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 - (y * z));
double t_2 = b * ((t + y) - 2.0);
double t_3 = x + (a - (t * a));
double tmp;
if (b <= -1.05e+32) {
tmp = t_2;
} else if (b <= -3.6e-264) {
tmp = t_1;
} else if (b <= 2.35e-282) {
tmp = t_3;
} else if (b <= 2.1e-211) {
tmp = t_1;
} else if (b <= 6e-70) {
tmp = t_3;
} else if (b <= 1.05e+110) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z - (y * z)) t_2 = b * ((t + y) - 2.0) t_3 = x + (a - (t * a)) tmp = 0 if b <= -1.05e+32: tmp = t_2 elif b <= -3.6e-264: tmp = t_1 elif b <= 2.35e-282: tmp = t_3 elif b <= 2.1e-211: tmp = t_1 elif b <= 6e-70: tmp = t_3 elif b <= 1.05e+110: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z - Float64(y * z))) t_2 = Float64(b * Float64(Float64(t + y) - 2.0)) t_3 = Float64(x + Float64(a - Float64(t * a))) tmp = 0.0 if (b <= -1.05e+32) tmp = t_2; elseif (b <= -3.6e-264) tmp = t_1; elseif (b <= 2.35e-282) tmp = t_3; elseif (b <= 2.1e-211) tmp = t_1; elseif (b <= 6e-70) tmp = t_3; elseif (b <= 1.05e+110) 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 - (y * z)); t_2 = b * ((t + y) - 2.0); t_3 = x + (a - (t * a)); tmp = 0.0; if (b <= -1.05e+32) tmp = t_2; elseif (b <= -3.6e-264) tmp = t_1; elseif (b <= 2.35e-282) tmp = t_3; elseif (b <= 2.1e-211) tmp = t_1; elseif (b <= 6e-70) tmp = t_3; elseif (b <= 1.05e+110) 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[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.05e+32], t$95$2, If[LessEqual[b, -3.6e-264], t$95$1, If[LessEqual[b, 2.35e-282], t$95$3, If[LessEqual[b, 2.1e-211], t$95$1, If[LessEqual[b, 6e-70], t$95$3, If[LessEqual[b, 1.05e+110], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z - y \cdot z\right)\\
t_2 := b \cdot \left(\left(t + y\right) - 2\right)\\
t_3 := x + \left(a - t \cdot a\right)\\
\mathbf{if}\;b \leq -1.05 \cdot 10^{+32}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -3.6 \cdot 10^{-264}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 2.35 \cdot 10^{-282}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 2.1 \cdot 10^{-211}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 6 \cdot 10^{-70}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 1.05 \cdot 10^{+110}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -1.05e32 or 1.05000000000000007e110 < b Initial program 89.9%
Taylor expanded in b around inf 82.4%
if -1.05e32 < b < -3.6000000000000002e-264 or 2.35e-282 < b < 2.10000000000000008e-211 or 6.0000000000000003e-70 < b < 1.05000000000000007e110Initial program 97.5%
Taylor expanded in b around 0 88.2%
Taylor expanded in a around 0 63.8%
sub-neg63.8%
metadata-eval63.8%
distribute-rgt-in63.8%
neg-mul-163.8%
unsub-neg63.8%
*-commutative63.8%
Simplified63.8%
if -3.6000000000000002e-264 < b < 2.35e-282 or 2.10000000000000008e-211 < b < 6.0000000000000003e-70Initial program 100.0%
Taylor expanded in b around 0 87.0%
Taylor expanded in a around inf 66.8%
sub-neg66.8%
metadata-eval66.8%
*-commutative66.8%
distribute-rgt-in66.8%
neg-mul-166.8%
unsub-neg66.8%
*-commutative66.8%
Simplified66.8%
Final simplification71.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (- z (* y z))))
(t_2 (* b (- (+ t y) 2.0)))
(t_3 (+ x (- a (* t a)))))
(if (<= b -1.3e+32)
t_2
(if (<= b -1.1e-264)
t_1
(if (<= b 1.8e-266)
t_3
(if (<= b 1.25e-211)
(- (+ z a) (* y z))
(if (<= b 2.6e-67) t_3 (if (<= b 9.6e+109) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (z - (y * z));
double t_2 = b * ((t + y) - 2.0);
double t_3 = x + (a - (t * a));
double tmp;
if (b <= -1.3e+32) {
tmp = t_2;
} else if (b <= -1.1e-264) {
tmp = t_1;
} else if (b <= 1.8e-266) {
tmp = t_3;
} else if (b <= 1.25e-211) {
tmp = (z + a) - (y * z);
} else if (b <= 2.6e-67) {
tmp = t_3;
} else if (b <= 9.6e+109) {
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) :: t_3
real(8) :: tmp
t_1 = x + (z - (y * z))
t_2 = b * ((t + y) - 2.0d0)
t_3 = x + (a - (t * a))
if (b <= (-1.3d+32)) then
tmp = t_2
else if (b <= (-1.1d-264)) then
tmp = t_1
else if (b <= 1.8d-266) then
tmp = t_3
else if (b <= 1.25d-211) then
tmp = (z + a) - (y * z)
else if (b <= 2.6d-67) then
tmp = t_3
else if (b <= 9.6d+109) 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 - (y * z));
double t_2 = b * ((t + y) - 2.0);
double t_3 = x + (a - (t * a));
double tmp;
if (b <= -1.3e+32) {
tmp = t_2;
} else if (b <= -1.1e-264) {
tmp = t_1;
} else if (b <= 1.8e-266) {
tmp = t_3;
} else if (b <= 1.25e-211) {
tmp = (z + a) - (y * z);
} else if (b <= 2.6e-67) {
tmp = t_3;
} else if (b <= 9.6e+109) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (z - (y * z)) t_2 = b * ((t + y) - 2.0) t_3 = x + (a - (t * a)) tmp = 0 if b <= -1.3e+32: tmp = t_2 elif b <= -1.1e-264: tmp = t_1 elif b <= 1.8e-266: tmp = t_3 elif b <= 1.25e-211: tmp = (z + a) - (y * z) elif b <= 2.6e-67: tmp = t_3 elif b <= 9.6e+109: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(z - Float64(y * z))) t_2 = Float64(b * Float64(Float64(t + y) - 2.0)) t_3 = Float64(x + Float64(a - Float64(t * a))) tmp = 0.0 if (b <= -1.3e+32) tmp = t_2; elseif (b <= -1.1e-264) tmp = t_1; elseif (b <= 1.8e-266) tmp = t_3; elseif (b <= 1.25e-211) tmp = Float64(Float64(z + a) - Float64(y * z)); elseif (b <= 2.6e-67) tmp = t_3; elseif (b <= 9.6e+109) 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 - (y * z)); t_2 = b * ((t + y) - 2.0); t_3 = x + (a - (t * a)); tmp = 0.0; if (b <= -1.3e+32) tmp = t_2; elseif (b <= -1.1e-264) tmp = t_1; elseif (b <= 1.8e-266) tmp = t_3; elseif (b <= 1.25e-211) tmp = (z + a) - (y * z); elseif (b <= 2.6e-67) tmp = t_3; elseif (b <= 9.6e+109) 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[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.3e+32], t$95$2, If[LessEqual[b, -1.1e-264], t$95$1, If[LessEqual[b, 1.8e-266], t$95$3, If[LessEqual[b, 1.25e-211], N[(N[(z + a), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.6e-67], t$95$3, If[LessEqual[b, 9.6e+109], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + \left(z - y \cdot z\right)\\
t_2 := b \cdot \left(\left(t + y\right) - 2\right)\\
t_3 := x + \left(a - t \cdot a\right)\\
\mathbf{if}\;b \leq -1.3 \cdot 10^{+32}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -1.1 \cdot 10^{-264}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.8 \cdot 10^{-266}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{-211}:\\
\;\;\;\;\left(z + a\right) - y \cdot z\\
\mathbf{elif}\;b \leq 2.6 \cdot 10^{-67}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;b \leq 9.6 \cdot 10^{+109}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -1.3000000000000001e32 or 9.59999999999999949e109 < b Initial program 89.9%
Taylor expanded in b around inf 82.4%
if -1.3000000000000001e32 < b < -1.09999999999999997e-264 or 2.5999999999999999e-67 < b < 9.59999999999999949e109Initial program 97.2%
Taylor expanded in b around 0 86.7%
Taylor expanded in a around 0 62.7%
sub-neg62.7%
metadata-eval62.7%
distribute-rgt-in62.7%
neg-mul-162.7%
unsub-neg62.7%
*-commutative62.7%
Simplified62.7%
if -1.09999999999999997e-264 < b < 1.8e-266 or 1.2500000000000001e-211 < b < 2.5999999999999999e-67Initial program 100.0%
Taylor expanded in b around 0 87.3%
Taylor expanded in a around inf 67.7%
sub-neg67.7%
metadata-eval67.7%
*-commutative67.7%
distribute-rgt-in67.7%
neg-mul-167.7%
unsub-neg67.7%
*-commutative67.7%
Simplified67.7%
if 1.8e-266 < b < 1.2500000000000001e-211Initial program 100.0%
Taylor expanded in b around 0 100.0%
Taylor expanded in t around 0 83.9%
fma-def84.0%
sub-neg84.0%
metadata-eval84.0%
fma-def83.9%
neg-mul-183.9%
unsub-neg83.9%
distribute-rgt-in83.9%
neg-mul-183.9%
unsub-neg83.9%
*-commutative83.9%
Simplified83.9%
Taylor expanded in x around 0 75.4%
Final simplification71.6%
(FPCore (x y z t a b) :precision binary64 (if (or (<= a -7e+165) (not (<= a 1.15e+99))) (+ x (- (* a (- 1.0 t)) (* z (- y 1.0)))) (+ (+ x (* b (- (+ t y) 2.0))) (* z (- 1.0 y)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -7e+165) || !(a <= 1.15e+99)) {
tmp = x + ((a * (1.0 - t)) - (z * (y - 1.0)));
} else {
tmp = (x + (b * ((t + y) - 2.0))) + (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 ((a <= (-7d+165)) .or. (.not. (a <= 1.15d+99))) then
tmp = x + ((a * (1.0d0 - t)) - (z * (y - 1.0d0)))
else
tmp = (x + (b * ((t + y) - 2.0d0))) + (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 ((a <= -7e+165) || !(a <= 1.15e+99)) {
tmp = x + ((a * (1.0 - t)) - (z * (y - 1.0)));
} else {
tmp = (x + (b * ((t + y) - 2.0))) + (z * (1.0 - y));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (a <= -7e+165) or not (a <= 1.15e+99): tmp = x + ((a * (1.0 - t)) - (z * (y - 1.0))) else: tmp = (x + (b * ((t + y) - 2.0))) + (z * (1.0 - y)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -7e+165) || !(a <= 1.15e+99)) tmp = Float64(x + Float64(Float64(a * Float64(1.0 - t)) - Float64(z * Float64(y - 1.0)))); else tmp = Float64(Float64(x + Float64(b * Float64(Float64(t + y) - 2.0))) + Float64(z * Float64(1.0 - y))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((a <= -7e+165) || ~((a <= 1.15e+99))) tmp = x + ((a * (1.0 - t)) - (z * (y - 1.0))); else tmp = (x + (b * ((t + y) - 2.0))) + (z * (1.0 - y)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -7e+165], N[Not[LessEqual[a, 1.15e+99]], $MachinePrecision]], N[(x + N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7 \cdot 10^{+165} \lor \neg \left(a \leq 1.15 \cdot 10^{+99}\right):\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) - z \cdot \left(y - 1\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + b \cdot \left(\left(t + y\right) - 2\right)\right) + z \cdot \left(1 - y\right)\\
\end{array}
\end{array}
if a < -6.99999999999999991e165 or 1.1500000000000001e99 < a Initial program 89.7%
Taylor expanded in b around 0 88.0%
if -6.99999999999999991e165 < a < 1.1500000000000001e99Initial program 97.2%
Taylor expanded in a around 0 89.1%
Final simplification88.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))) (t_2 (* b (- t 2.0))))
(if (<= y -7.5e+36)
t_1
(if (<= y -6e-126)
(* t (- b a))
(if (<= y -4.2e-207)
(+ x z)
(if (<= y -1.15e-267)
t_2
(if (<= y 4.6e-141) (+ x z) (if (<= y 3.5) t_2 t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double t_2 = b * (t - 2.0);
double tmp;
if (y <= -7.5e+36) {
tmp = t_1;
} else if (y <= -6e-126) {
tmp = t * (b - a);
} else if (y <= -4.2e-207) {
tmp = x + z;
} else if (y <= -1.15e-267) {
tmp = t_2;
} else if (y <= 4.6e-141) {
tmp = x + z;
} else if (y <= 3.5) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = y * (b - z)
t_2 = b * (t - 2.0d0)
if (y <= (-7.5d+36)) then
tmp = t_1
else if (y <= (-6d-126)) then
tmp = t * (b - a)
else if (y <= (-4.2d-207)) then
tmp = x + z
else if (y <= (-1.15d-267)) then
tmp = t_2
else if (y <= 4.6d-141) then
tmp = x + z
else if (y <= 3.5d0) then
tmp = t_2
else
tmp = t_1
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * (b - z);
double t_2 = b * (t - 2.0);
double tmp;
if (y <= -7.5e+36) {
tmp = t_1;
} else if (y <= -6e-126) {
tmp = t * (b - a);
} else if (y <= -4.2e-207) {
tmp = x + z;
} else if (y <= -1.15e-267) {
tmp = t_2;
} else if (y <= 4.6e-141) {
tmp = x + z;
} else if (y <= 3.5) {
tmp = t_2;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) t_2 = b * (t - 2.0) tmp = 0 if y <= -7.5e+36: tmp = t_1 elif y <= -6e-126: tmp = t * (b - a) elif y <= -4.2e-207: tmp = x + z elif y <= -1.15e-267: tmp = t_2 elif y <= 4.6e-141: tmp = x + z elif y <= 3.5: tmp = t_2 else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(b - z)) t_2 = Float64(b * Float64(t - 2.0)) tmp = 0.0 if (y <= -7.5e+36) tmp = t_1; elseif (y <= -6e-126) tmp = Float64(t * Float64(b - a)); elseif (y <= -4.2e-207) tmp = Float64(x + z); elseif (y <= -1.15e-267) tmp = t_2; elseif (y <= 4.6e-141) tmp = Float64(x + z); elseif (y <= 3.5) tmp = t_2; else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * (b - z); t_2 = b * (t - 2.0); tmp = 0.0; if (y <= -7.5e+36) tmp = t_1; elseif (y <= -6e-126) tmp = t * (b - a); elseif (y <= -4.2e-207) tmp = x + z; elseif (y <= -1.15e-267) tmp = t_2; elseif (y <= 4.6e-141) tmp = x + z; elseif (y <= 3.5) tmp = t_2; 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]}, Block[{t$95$2 = N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.5e+36], t$95$1, If[LessEqual[y, -6e-126], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -4.2e-207], N[(x + z), $MachinePrecision], If[LessEqual[y, -1.15e-267], t$95$2, If[LessEqual[y, 4.6e-141], N[(x + z), $MachinePrecision], If[LessEqual[y, 3.5], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
t_2 := b \cdot \left(t - 2\right)\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{+36}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -6 \cdot 10^{-126}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-207}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{-267}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{-141}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 3.5:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\end{array}
if y < -7.50000000000000054e36 or 3.5 < y Initial program 92.0%
Taylor expanded in y around inf 70.9%
if -7.50000000000000054e36 < y < -6.0000000000000003e-126Initial program 97.2%
Taylor expanded in t around inf 51.1%
if -6.0000000000000003e-126 < y < -4.20000000000000007e-207 or -1.15000000000000003e-267 < y < 4.5999999999999999e-141Initial program 98.1%
Taylor expanded in b around 0 71.6%
Taylor expanded in a around 0 51.2%
sub-neg51.2%
metadata-eval51.2%
distribute-rgt-in51.2%
neg-mul-151.2%
unsub-neg51.2%
*-commutative51.2%
Simplified51.2%
Taylor expanded in y around 0 51.2%
if -4.20000000000000007e-207 < y < -1.15000000000000003e-267 or 4.5999999999999999e-141 < y < 3.5Initial program 97.6%
Taylor expanded in b around inf 51.5%
Taylor expanded in y around 0 51.5%
Final simplification60.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ x (* b (- (+ t y) 2.0)))))
(if (<= b -3e+31)
t_1
(if (<= b 1.4e-98)
(- (* a (- 1.0 t)) (* z (- y 1.0)))
(if (or (<= b 7.5e-82) (not (<= b 1.06e+55)))
t_1
(+ x (+ a (- z (* y z)))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x + (b * ((t + y) - 2.0));
double tmp;
if (b <= -3e+31) {
tmp = t_1;
} else if (b <= 1.4e-98) {
tmp = (a * (1.0 - t)) - (z * (y - 1.0));
} else if ((b <= 7.5e-82) || !(b <= 1.06e+55)) {
tmp = t_1;
} else {
tmp = x + (a + (z - (y * 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 = x + (b * ((t + y) - 2.0d0))
if (b <= (-3d+31)) then
tmp = t_1
else if (b <= 1.4d-98) then
tmp = (a * (1.0d0 - t)) - (z * (y - 1.0d0))
else if ((b <= 7.5d-82) .or. (.not. (b <= 1.06d+55))) then
tmp = t_1
else
tmp = x + (a + (z - (y * 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 = x + (b * ((t + y) - 2.0));
double tmp;
if (b <= -3e+31) {
tmp = t_1;
} else if (b <= 1.4e-98) {
tmp = (a * (1.0 - t)) - (z * (y - 1.0));
} else if ((b <= 7.5e-82) || !(b <= 1.06e+55)) {
tmp = t_1;
} else {
tmp = x + (a + (z - (y * z)));
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x + (b * ((t + y) - 2.0)) tmp = 0 if b <= -3e+31: tmp = t_1 elif b <= 1.4e-98: tmp = (a * (1.0 - t)) - (z * (y - 1.0)) elif (b <= 7.5e-82) or not (b <= 1.06e+55): tmp = t_1 else: tmp = x + (a + (z - (y * z))) return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x + Float64(b * Float64(Float64(t + y) - 2.0))) tmp = 0.0 if (b <= -3e+31) tmp = t_1; elseif (b <= 1.4e-98) tmp = Float64(Float64(a * Float64(1.0 - t)) - Float64(z * Float64(y - 1.0))); elseif ((b <= 7.5e-82) || !(b <= 1.06e+55)) tmp = t_1; else tmp = Float64(x + Float64(a + Float64(z - Float64(y * z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x + (b * ((t + y) - 2.0)); tmp = 0.0; if (b <= -3e+31) tmp = t_1; elseif (b <= 1.4e-98) tmp = (a * (1.0 - t)) - (z * (y - 1.0)); elseif ((b <= 7.5e-82) || ~((b <= 1.06e+55))) tmp = t_1; else tmp = x + (a + (z - (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3e+31], t$95$1, If[LessEqual[b, 1.4e-98], N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 7.5e-82], N[Not[LessEqual[b, 1.06e+55]], $MachinePrecision]], t$95$1, N[(x + N[(a + N[(z - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x + b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -3 \cdot 10^{+31}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.4 \cdot 10^{-98}:\\
\;\;\;\;a \cdot \left(1 - t\right) - z \cdot \left(y - 1\right)\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{-82} \lor \neg \left(b \leq 1.06 \cdot 10^{+55}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + \left(a + \left(z - y \cdot z\right)\right)\\
\end{array}
\end{array}
if b < -2.99999999999999989e31 or 1.3999999999999999e-98 < b < 7.4999999999999997e-82 or 1.06000000000000004e55 < b Initial program 89.4%
Taylor expanded in a around 0 86.6%
Taylor expanded in z around 0 84.4%
if -2.99999999999999989e31 < b < 1.3999999999999999e-98Initial program 99.1%
sub-neg99.1%
+-commutative99.1%
associate-+l+99.1%
*-commutative99.1%
distribute-rgt-neg-in99.1%
+-commutative99.1%
fma-def100.0%
neg-sub0100.0%
associate--r-100.0%
neg-sub0100.0%
+-commutative100.0%
sub-neg100.0%
fma-def100.0%
sub-neg100.0%
associate-+l+100.0%
metadata-eval100.0%
sub-neg100.0%
+-commutative100.0%
Simplified100.0%
Taylor expanded in x around 0 82.3%
+-commutative82.3%
fma-def82.3%
sub-neg82.3%
metadata-eval82.3%
associate-+r+82.3%
*-commutative82.3%
Simplified82.3%
Taylor expanded in b around 0 75.3%
if 7.4999999999999997e-82 < b < 1.06000000000000004e55Initial program 100.0%
Taylor expanded in b around 0 87.7%
Taylor expanded in t around 0 75.0%
fma-def75.0%
sub-neg75.0%
metadata-eval75.0%
fma-def75.0%
neg-mul-175.0%
unsub-neg75.0%
distribute-rgt-in75.0%
neg-mul-175.0%
unsub-neg75.0%
*-commutative75.0%
Simplified75.0%
Final simplification79.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.3e+32) (not (<= b 5.8e+52))) (+ x (* b (- (+ t y) 2.0))) (+ x (- (* a (- 1.0 t)) (* z (- y 1.0))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.3e+32) || !(b <= 5.8e+52)) {
tmp = x + (b * ((t + y) - 2.0));
} else {
tmp = x + ((a * (1.0 - t)) - (z * (y - 1.0)));
}
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.3d+32)) .or. (.not. (b <= 5.8d+52))) then
tmp = x + (b * ((t + y) - 2.0d0))
else
tmp = x + ((a * (1.0d0 - t)) - (z * (y - 1.0d0)))
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.3e+32) || !(b <= 5.8e+52)) {
tmp = x + (b * ((t + y) - 2.0));
} else {
tmp = x + ((a * (1.0 - t)) - (z * (y - 1.0)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.3e+32) or not (b <= 5.8e+52): tmp = x + (b * ((t + y) - 2.0)) else: tmp = x + ((a * (1.0 - t)) - (z * (y - 1.0))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.3e+32) || !(b <= 5.8e+52)) tmp = Float64(x + Float64(b * Float64(Float64(t + y) - 2.0))); else tmp = Float64(x + Float64(Float64(a * Float64(1.0 - t)) - Float64(z * Float64(y - 1.0)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.3e+32) || ~((b <= 5.8e+52))) tmp = x + (b * ((t + y) - 2.0)); else tmp = x + ((a * (1.0 - t)) - (z * (y - 1.0))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.3e+32], N[Not[LessEqual[b, 5.8e+52]], $MachinePrecision]], N[(x + N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] - N[(z * N[(y - 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.3 \cdot 10^{+32} \lor \neg \left(b \leq 5.8 \cdot 10^{+52}\right):\\
\;\;\;\;x + b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) - z \cdot \left(y - 1\right)\right)\\
\end{array}
\end{array}
if b < -1.3000000000000001e32 or 5.8e52 < b Initial program 88.9%
Taylor expanded in a around 0 85.9%
Taylor expanded in z around 0 83.7%
if -1.3000000000000001e32 < b < 5.8e52Initial program 99.3%
Taylor expanded in b around 0 90.1%
Final simplification87.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- t 2.0))))
(if (<= b -1.26e+32)
t_1
(if (<= b -2.15e-147)
(* z (- y))
(if (<= b -3.4e-264)
(+ x z)
(if (<= b 8.5e+65) (+ x a) (if (<= b 2.15e+170) t_1 (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (t - 2.0);
double tmp;
if (b <= -1.26e+32) {
tmp = t_1;
} else if (b <= -2.15e-147) {
tmp = z * -y;
} else if (b <= -3.4e-264) {
tmp = x + z;
} else if (b <= 8.5e+65) {
tmp = x + a;
} else if (b <= 2.15e+170) {
tmp = t_1;
} 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) :: t_1
real(8) :: tmp
t_1 = b * (t - 2.0d0)
if (b <= (-1.26d+32)) then
tmp = t_1
else if (b <= (-2.15d-147)) then
tmp = z * -y
else if (b <= (-3.4d-264)) then
tmp = x + z
else if (b <= 8.5d+65) then
tmp = x + a
else if (b <= 2.15d+170) then
tmp = t_1
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 t_1 = b * (t - 2.0);
double tmp;
if (b <= -1.26e+32) {
tmp = t_1;
} else if (b <= -2.15e-147) {
tmp = z * -y;
} else if (b <= -3.4e-264) {
tmp = x + z;
} else if (b <= 8.5e+65) {
tmp = x + a;
} else if (b <= 2.15e+170) {
tmp = t_1;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (t - 2.0) tmp = 0 if b <= -1.26e+32: tmp = t_1 elif b <= -2.15e-147: tmp = z * -y elif b <= -3.4e-264: tmp = x + z elif b <= 8.5e+65: tmp = x + a elif b <= 2.15e+170: tmp = t_1 else: tmp = y * b return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(t - 2.0)) tmp = 0.0 if (b <= -1.26e+32) tmp = t_1; elseif (b <= -2.15e-147) tmp = Float64(z * Float64(-y)); elseif (b <= -3.4e-264) tmp = Float64(x + z); elseif (b <= 8.5e+65) tmp = Float64(x + a); elseif (b <= 2.15e+170) tmp = t_1; else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (t - 2.0); tmp = 0.0; if (b <= -1.26e+32) tmp = t_1; elseif (b <= -2.15e-147) tmp = z * -y; elseif (b <= -3.4e-264) tmp = x + z; elseif (b <= 8.5e+65) tmp = x + a; elseif (b <= 2.15e+170) tmp = t_1; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.26e+32], t$95$1, If[LessEqual[b, -2.15e-147], N[(z * (-y)), $MachinePrecision], If[LessEqual[b, -3.4e-264], N[(x + z), $MachinePrecision], If[LessEqual[b, 8.5e+65], N[(x + a), $MachinePrecision], If[LessEqual[b, 2.15e+170], t$95$1, N[(y * b), $MachinePrecision]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(t - 2\right)\\
\mathbf{if}\;b \leq -1.26 \cdot 10^{+32}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -2.15 \cdot 10^{-147}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\mathbf{elif}\;b \leq -3.4 \cdot 10^{-264}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{+65}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;b \leq 2.15 \cdot 10^{+170}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if b < -1.26e32 or 8.50000000000000075e65 < b < 2.1499999999999999e170Initial program 88.4%
Taylor expanded in b around inf 73.6%
Taylor expanded in y around 0 56.3%
if -1.26e32 < b < -2.1500000000000001e-147Initial program 97.3%
Taylor expanded in y around inf 39.4%
Taylor expanded in b around 0 39.4%
mul-1-neg39.4%
*-commutative39.4%
distribute-rgt-neg-in39.4%
Simplified39.4%
if -2.1500000000000001e-147 < b < -3.3999999999999999e-264Initial program 100.0%
Taylor expanded in b around 0 93.6%
Taylor expanded in a around 0 67.3%
sub-neg67.3%
metadata-eval67.3%
distribute-rgt-in67.3%
neg-mul-167.3%
unsub-neg67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in y around 0 44.9%
if -3.3999999999999999e-264 < b < 8.50000000000000075e65Initial program 100.0%
Taylor expanded in b around 0 89.2%
Taylor expanded in t around 0 72.1%
fma-def72.2%
sub-neg72.2%
metadata-eval72.2%
fma-def72.1%
neg-mul-172.1%
unsub-neg72.1%
distribute-rgt-in72.1%
neg-mul-172.1%
unsub-neg72.1%
*-commutative72.1%
Simplified72.1%
Taylor expanded in z around 0 36.8%
+-commutative36.8%
Simplified36.8%
if 2.1499999999999999e170 < b Initial program 89.9%
Taylor expanded in b around inf 93.9%
Taylor expanded in y around inf 64.9%
Final simplification47.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- t 2.0))) (t_2 (* y (- b z))))
(if (<= y -1.3e+37)
t_2
(if (<= y -1.55e-71)
(- a (* t a))
(if (<= y 2.1e-293)
t_1
(if (<= y 7.2e-144) (+ x z) (if (<= y 175000.0) t_1 t_2)))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (t - 2.0);
double t_2 = y * (b - z);
double tmp;
if (y <= -1.3e+37) {
tmp = t_2;
} else if (y <= -1.55e-71) {
tmp = a - (t * a);
} else if (y <= 2.1e-293) {
tmp = t_1;
} else if (y <= 7.2e-144) {
tmp = x + z;
} else if (y <= 175000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = b * (t - 2.0d0)
t_2 = y * (b - z)
if (y <= (-1.3d+37)) then
tmp = t_2
else if (y <= (-1.55d-71)) then
tmp = a - (t * a)
else if (y <= 2.1d-293) then
tmp = t_1
else if (y <= 7.2d-144) then
tmp = x + z
else if (y <= 175000.0d0) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * (t - 2.0);
double t_2 = y * (b - z);
double tmp;
if (y <= -1.3e+37) {
tmp = t_2;
} else if (y <= -1.55e-71) {
tmp = a - (t * a);
} else if (y <= 2.1e-293) {
tmp = t_1;
} else if (y <= 7.2e-144) {
tmp = x + z;
} else if (y <= 175000.0) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * (t - 2.0) t_2 = y * (b - z) tmp = 0 if y <= -1.3e+37: tmp = t_2 elif y <= -1.55e-71: tmp = a - (t * a) elif y <= 2.1e-293: tmp = t_1 elif y <= 7.2e-144: tmp = x + z elif y <= 175000.0: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(t - 2.0)) t_2 = Float64(y * Float64(b - z)) tmp = 0.0 if (y <= -1.3e+37) tmp = t_2; elseif (y <= -1.55e-71) tmp = Float64(a - Float64(t * a)); elseif (y <= 2.1e-293) tmp = t_1; elseif (y <= 7.2e-144) tmp = Float64(x + z); elseif (y <= 175000.0) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * (t - 2.0); t_2 = y * (b - z); tmp = 0.0; if (y <= -1.3e+37) tmp = t_2; elseif (y <= -1.55e-71) tmp = a - (t * a); elseif (y <= 2.1e-293) tmp = t_1; elseif (y <= 7.2e-144) tmp = x + z; elseif (y <= 175000.0) tmp = t_1; else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -1.3e+37], t$95$2, If[LessEqual[y, -1.55e-71], N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.1e-293], t$95$1, If[LessEqual[y, 7.2e-144], N[(x + z), $MachinePrecision], If[LessEqual[y, 175000.0], t$95$1, t$95$2]]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(t - 2\right)\\
t_2 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -1.3 \cdot 10^{+37}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.55 \cdot 10^{-71}:\\
\;\;\;\;a - t \cdot a\\
\mathbf{elif}\;y \leq 2.1 \cdot 10^{-293}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 7.2 \cdot 10^{-144}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;y \leq 175000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if y < -1.3e37 or 175000 < y Initial program 92.0%
Taylor expanded in y around inf 70.9%
if -1.3e37 < y < -1.55000000000000001e-71Initial program 95.8%
Taylor expanded in a around inf 63.8%
sub-neg63.8%
distribute-lft-in63.8%
*-rgt-identity63.8%
distribute-rgt-neg-in63.8%
sub-neg63.8%
*-commutative63.8%
Simplified63.8%
if -1.55000000000000001e-71 < y < 2.10000000000000005e-293 or 7.2000000000000001e-144 < y < 175000Initial program 98.7%
Taylor expanded in b around inf 46.5%
Taylor expanded in y around 0 46.5%
if 2.10000000000000005e-293 < y < 7.2000000000000001e-144Initial program 96.4%
Taylor expanded in b around 0 75.7%
Taylor expanded in a around 0 51.6%
sub-neg51.6%
metadata-eval51.6%
distribute-rgt-in51.6%
neg-mul-151.6%
unsub-neg51.6%
*-commutative51.6%
Simplified51.6%
Taylor expanded in y around 0 51.6%
Final simplification60.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (- x (* y z))) (t_2 (* b (- (+ t y) 2.0))))
(if (<= b -5.5e+31)
t_2
(if (<= b -2.8e-241)
t_1
(if (<= b -6.2e-307) (- a (* t a)) (if (<= b 7.6e+21) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = x - (y * z);
double t_2 = b * ((t + y) - 2.0);
double tmp;
if (b <= -5.5e+31) {
tmp = t_2;
} else if (b <= -2.8e-241) {
tmp = t_1;
} else if (b <= -6.2e-307) {
tmp = a - (t * a);
} else if (b <= 7.6e+21) {
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 - (y * z)
t_2 = b * ((t + y) - 2.0d0)
if (b <= (-5.5d+31)) then
tmp = t_2
else if (b <= (-2.8d-241)) then
tmp = t_1
else if (b <= (-6.2d-307)) then
tmp = a - (t * a)
else if (b <= 7.6d+21) 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 - (y * z);
double t_2 = b * ((t + y) - 2.0);
double tmp;
if (b <= -5.5e+31) {
tmp = t_2;
} else if (b <= -2.8e-241) {
tmp = t_1;
} else if (b <= -6.2e-307) {
tmp = a - (t * a);
} else if (b <= 7.6e+21) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = x - (y * z) t_2 = b * ((t + y) - 2.0) tmp = 0 if b <= -5.5e+31: tmp = t_2 elif b <= -2.8e-241: tmp = t_1 elif b <= -6.2e-307: tmp = a - (t * a) elif b <= 7.6e+21: tmp = t_1 else: tmp = t_2 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(x - Float64(y * z)) t_2 = Float64(b * Float64(Float64(t + y) - 2.0)) tmp = 0.0 if (b <= -5.5e+31) tmp = t_2; elseif (b <= -2.8e-241) tmp = t_1; elseif (b <= -6.2e-307) tmp = Float64(a - Float64(t * a)); elseif (b <= 7.6e+21) tmp = t_1; else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = x - (y * z); t_2 = b * ((t + y) - 2.0); tmp = 0.0; if (b <= -5.5e+31) tmp = t_2; elseif (b <= -2.8e-241) tmp = t_1; elseif (b <= -6.2e-307) tmp = a - (t * a); elseif (b <= 7.6e+21) 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[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.5e+31], t$95$2, If[LessEqual[b, -2.8e-241], t$95$1, If[LessEqual[b, -6.2e-307], N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.6e+21], t$95$1, t$95$2]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := x - y \cdot z\\
t_2 := b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{if}\;b \leq -5.5 \cdot 10^{+31}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -2.8 \cdot 10^{-241}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -6.2 \cdot 10^{-307}:\\
\;\;\;\;a - t \cdot a\\
\mathbf{elif}\;b \leq 7.6 \cdot 10^{+21}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\end{array}
if b < -5.50000000000000002e31 or 7.6e21 < b Initial program 89.3%
Taylor expanded in b around inf 77.4%
if -5.50000000000000002e31 < b < -2.7999999999999999e-241 or -6.1999999999999996e-307 < b < 7.6e21Initial program 99.2%
Taylor expanded in b around 0 90.3%
Taylor expanded in y around inf 51.8%
*-commutative51.8%
Simplified51.8%
if -2.7999999999999999e-241 < b < -6.1999999999999996e-307Initial program 100.0%
Taylor expanded in a around inf 55.7%
sub-neg55.7%
distribute-lft-in55.7%
*-rgt-identity55.7%
distribute-rgt-neg-in55.7%
sub-neg55.7%
*-commutative55.7%
Simplified55.7%
Final simplification63.2%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -4.4e+86)
(* t b)
(if (<= b -29000000.0)
(+ x a)
(if (<= b -2.3e-149)
(* z (- y))
(if (<= b -1.05e-264) (+ x z) (if (<= b 4.9e+128) (+ x a) (* y b)))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -4.4e+86) {
tmp = t * b;
} else if (b <= -29000000.0) {
tmp = x + a;
} else if (b <= -2.3e-149) {
tmp = z * -y;
} else if (b <= -1.05e-264) {
tmp = x + z;
} else if (b <= 4.9e+128) {
tmp = x + a;
} 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 (b <= (-4.4d+86)) then
tmp = t * b
else if (b <= (-29000000.0d0)) then
tmp = x + a
else if (b <= (-2.3d-149)) then
tmp = z * -y
else if (b <= (-1.05d-264)) then
tmp = x + z
else if (b <= 4.9d+128) then
tmp = x + a
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 (b <= -4.4e+86) {
tmp = t * b;
} else if (b <= -29000000.0) {
tmp = x + a;
} else if (b <= -2.3e-149) {
tmp = z * -y;
} else if (b <= -1.05e-264) {
tmp = x + z;
} else if (b <= 4.9e+128) {
tmp = x + a;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -4.4e+86: tmp = t * b elif b <= -29000000.0: tmp = x + a elif b <= -2.3e-149: tmp = z * -y elif b <= -1.05e-264: tmp = x + z elif b <= 4.9e+128: tmp = x + a else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -4.4e+86) tmp = Float64(t * b); elseif (b <= -29000000.0) tmp = Float64(x + a); elseif (b <= -2.3e-149) tmp = Float64(z * Float64(-y)); elseif (b <= -1.05e-264) tmp = Float64(x + z); elseif (b <= 4.9e+128) tmp = Float64(x + a); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -4.4e+86) tmp = t * b; elseif (b <= -29000000.0) tmp = x + a; elseif (b <= -2.3e-149) tmp = z * -y; elseif (b <= -1.05e-264) tmp = x + z; elseif (b <= 4.9e+128) tmp = x + a; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -4.4e+86], N[(t * b), $MachinePrecision], If[LessEqual[b, -29000000.0], N[(x + a), $MachinePrecision], If[LessEqual[b, -2.3e-149], N[(z * (-y)), $MachinePrecision], If[LessEqual[b, -1.05e-264], N[(x + z), $MachinePrecision], If[LessEqual[b, 4.9e+128], N[(x + a), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.4 \cdot 10^{+86}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;b \leq -29000000:\\
\;\;\;\;x + a\\
\mathbf{elif}\;b \leq -2.3 \cdot 10^{-149}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\mathbf{elif}\;b \leq -1.05 \cdot 10^{-264}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;b \leq 4.9 \cdot 10^{+128}:\\
\;\;\;\;x + a\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if b < -4.40000000000000006e86Initial program 88.0%
Taylor expanded in b around inf 83.0%
Taylor expanded in t around inf 43.9%
if -4.40000000000000006e86 < b < -2.9e7 or -1.0500000000000001e-264 < b < 4.90000000000000018e128Initial program 97.2%
Taylor expanded in b around 0 80.5%
Taylor expanded in t around 0 66.3%
fma-def66.3%
sub-neg66.3%
metadata-eval66.3%
fma-def66.3%
neg-mul-166.3%
unsub-neg66.3%
distribute-rgt-in66.3%
neg-mul-166.3%
unsub-neg66.3%
*-commutative66.3%
Simplified66.3%
Taylor expanded in z around 0 36.3%
+-commutative36.3%
Simplified36.3%
if -2.9e7 < b < -2.3e-149Initial program 97.1%
Taylor expanded in y around inf 42.8%
Taylor expanded in b around 0 42.7%
mul-1-neg42.7%
*-commutative42.7%
distribute-rgt-neg-in42.7%
Simplified42.7%
if -2.3e-149 < b < -1.0500000000000001e-264Initial program 100.0%
Taylor expanded in b around 0 93.6%
Taylor expanded in a around 0 67.3%
sub-neg67.3%
metadata-eval67.3%
distribute-rgt-in67.3%
neg-mul-167.3%
unsub-neg67.3%
*-commutative67.3%
Simplified67.3%
Taylor expanded in y around 0 44.9%
if 4.90000000000000018e128 < b Initial program 91.4%
Taylor expanded in b around inf 94.3%
Taylor expanded in y around inf 61.1%
Final simplification43.0%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.25e+32) (not (<= b 2.9e+59))) (+ x (* b (- (+ t y) 2.0))) (+ x (+ a (- z (* y z))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.25e+32) || !(b <= 2.9e+59)) {
tmp = x + (b * ((t + y) - 2.0));
} else {
tmp = x + (a + (z - (y * 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 ((b <= (-1.25d+32)) .or. (.not. (b <= 2.9d+59))) then
tmp = x + (b * ((t + y) - 2.0d0))
else
tmp = x + (a + (z - (y * 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 ((b <= -1.25e+32) || !(b <= 2.9e+59)) {
tmp = x + (b * ((t + y) - 2.0));
} else {
tmp = x + (a + (z - (y * z)));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.25e+32) or not (b <= 2.9e+59): tmp = x + (b * ((t + y) - 2.0)) else: tmp = x + (a + (z - (y * z))) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.25e+32) || !(b <= 2.9e+59)) tmp = Float64(x + Float64(b * Float64(Float64(t + y) - 2.0))); else tmp = Float64(x + Float64(a + Float64(z - Float64(y * z)))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.25e+32) || ~((b <= 2.9e+59))) tmp = x + (b * ((t + y) - 2.0)); else tmp = x + (a + (z - (y * z))); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.25e+32], N[Not[LessEqual[b, 2.9e+59]], $MachinePrecision]], N[(x + N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + N[(a + N[(z - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.25 \cdot 10^{+32} \lor \neg \left(b \leq 2.9 \cdot 10^{+59}\right):\\
\;\;\;\;x + b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a + \left(z - y \cdot z\right)\right)\\
\end{array}
\end{array}
if b < -1.2499999999999999e32 or 2.89999999999999991e59 < b Initial program 88.9%
Taylor expanded in a around 0 85.9%
Taylor expanded in z around 0 83.7%
if -1.2499999999999999e32 < b < 2.89999999999999991e59Initial program 99.3%
Taylor expanded in b around 0 90.1%
Taylor expanded in t around 0 72.2%
fma-def72.2%
sub-neg72.2%
metadata-eval72.2%
fma-def72.2%
neg-mul-172.2%
unsub-neg72.2%
distribute-rgt-in72.2%
neg-mul-172.2%
unsub-neg72.2%
*-commutative72.2%
Simplified72.2%
Final simplification77.0%
(FPCore (x y z t a b)
:precision binary64
(if (<= b -6.8e+88)
(* t b)
(if (<= b -7.2e-42)
(+ x a)
(if (<= b -2.3e-264) (+ x z) (if (<= b 6.9e+133) (+ x a) (* y b))))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -6.8e+88) {
tmp = t * b;
} else if (b <= -7.2e-42) {
tmp = x + a;
} else if (b <= -2.3e-264) {
tmp = x + z;
} else if (b <= 6.9e+133) {
tmp = x + a;
} 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 (b <= (-6.8d+88)) then
tmp = t * b
else if (b <= (-7.2d-42)) then
tmp = x + a
else if (b <= (-2.3d-264)) then
tmp = x + z
else if (b <= 6.9d+133) then
tmp = x + a
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 (b <= -6.8e+88) {
tmp = t * b;
} else if (b <= -7.2e-42) {
tmp = x + a;
} else if (b <= -2.3e-264) {
tmp = x + z;
} else if (b <= 6.9e+133) {
tmp = x + a;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -6.8e+88: tmp = t * b elif b <= -7.2e-42: tmp = x + a elif b <= -2.3e-264: tmp = x + z elif b <= 6.9e+133: tmp = x + a else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -6.8e+88) tmp = Float64(t * b); elseif (b <= -7.2e-42) tmp = Float64(x + a); elseif (b <= -2.3e-264) tmp = Float64(x + z); elseif (b <= 6.9e+133) tmp = Float64(x + a); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -6.8e+88) tmp = t * b; elseif (b <= -7.2e-42) tmp = x + a; elseif (b <= -2.3e-264) tmp = x + z; elseif (b <= 6.9e+133) tmp = x + a; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -6.8e+88], N[(t * b), $MachinePrecision], If[LessEqual[b, -7.2e-42], N[(x + a), $MachinePrecision], If[LessEqual[b, -2.3e-264], N[(x + z), $MachinePrecision], If[LessEqual[b, 6.9e+133], N[(x + a), $MachinePrecision], N[(y * b), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.8 \cdot 10^{+88}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;b \leq -7.2 \cdot 10^{-42}:\\
\;\;\;\;x + a\\
\mathbf{elif}\;b \leq -2.3 \cdot 10^{-264}:\\
\;\;\;\;x + z\\
\mathbf{elif}\;b \leq 6.9 \cdot 10^{+133}:\\
\;\;\;\;x + a\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if b < -6.80000000000000008e88Initial program 88.0%
Taylor expanded in b around inf 83.0%
Taylor expanded in t around inf 43.9%
if -6.80000000000000008e88 < b < -7.2000000000000004e-42 or -2.30000000000000012e-264 < b < 6.9000000000000002e133Initial program 96.5%
Taylor expanded in b around 0 81.3%
Taylor expanded in t around 0 67.6%
fma-def67.6%
sub-neg67.6%
metadata-eval67.6%
fma-def67.6%
neg-mul-167.6%
unsub-neg67.6%
distribute-rgt-in67.6%
neg-mul-167.6%
unsub-neg67.6%
*-commutative67.6%
Simplified67.6%
Taylor expanded in z around 0 35.2%
+-commutative35.2%
Simplified35.2%
if -7.2000000000000004e-42 < b < -2.30000000000000012e-264Initial program 100.0%
Taylor expanded in b around 0 91.1%
Taylor expanded in a around 0 65.6%
sub-neg65.6%
metadata-eval65.6%
distribute-rgt-in65.6%
neg-mul-165.6%
unsub-neg65.6%
*-commutative65.6%
Simplified65.6%
Taylor expanded in y around 0 38.6%
if 6.9000000000000002e133 < b Initial program 91.4%
Taylor expanded in b around inf 94.3%
Taylor expanded in y around inf 61.1%
Final simplification41.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1.25e+90) (not (<= b 3.5e+63))) (* b (- (+ t y) 2.0)) (+ x (- a (* t a)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -1.25e+90) || !(b <= 3.5e+63)) {
tmp = b * ((t + y) - 2.0);
} else {
tmp = x + (a - (t * 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 ((b <= (-1.25d+90)) .or. (.not. (b <= 3.5d+63))) then
tmp = b * ((t + y) - 2.0d0)
else
tmp = x + (a - (t * 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 ((b <= -1.25e+90) || !(b <= 3.5e+63)) {
tmp = b * ((t + y) - 2.0);
} else {
tmp = x + (a - (t * a));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -1.25e+90) or not (b <= 3.5e+63): tmp = b * ((t + y) - 2.0) else: tmp = x + (a - (t * a)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -1.25e+90) || !(b <= 3.5e+63)) tmp = Float64(b * Float64(Float64(t + y) - 2.0)); else tmp = Float64(x + Float64(a - Float64(t * a))); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -1.25e+90) || ~((b <= 3.5e+63))) tmp = b * ((t + y) - 2.0); else tmp = x + (a - (t * a)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -1.25e+90], N[Not[LessEqual[b, 3.5e+63]], $MachinePrecision]], N[(b * N[(N[(t + y), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], N[(x + N[(a - N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.25 \cdot 10^{+90} \lor \neg \left(b \leq 3.5 \cdot 10^{+63}\right):\\
\;\;\;\;b \cdot \left(\left(t + y\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a - t \cdot a\right)\\
\end{array}
\end{array}
if b < -1.2500000000000001e90 or 3.50000000000000029e63 < b Initial program 88.6%
Taylor expanded in b around inf 83.0%
if -1.2500000000000001e90 < b < 3.50000000000000029e63Initial program 98.7%
Taylor expanded in b around 0 87.2%
Taylor expanded in a around inf 53.2%
sub-neg53.2%
metadata-eval53.2%
*-commutative53.2%
distribute-rgt-in53.2%
neg-mul-153.2%
unsub-neg53.2%
*-commutative53.2%
Simplified53.2%
Final simplification64.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= t -3.6e+14) (not (<= t 20000.0))) (* t (- b a)) (+ x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((t <= -3.6e+14) || !(t <= 20000.0)) {
tmp = t * (b - a);
} else {
tmp = x + 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 <= (-3.6d+14)) .or. (.not. (t <= 20000.0d0))) then
tmp = t * (b - a)
else
tmp = x + 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 <= -3.6e+14) || !(t <= 20000.0)) {
tmp = t * (b - a);
} else {
tmp = x + a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (t <= -3.6e+14) or not (t <= 20000.0): tmp = t * (b - a) else: tmp = x + a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((t <= -3.6e+14) || !(t <= 20000.0)) tmp = Float64(t * Float64(b - a)); else tmp = Float64(x + a); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((t <= -3.6e+14) || ~((t <= 20000.0))) tmp = t * (b - a); else tmp = x + a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -3.6e+14], N[Not[LessEqual[t, 20000.0]], $MachinePrecision]], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], N[(x + a), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.6 \cdot 10^{+14} \lor \neg \left(t \leq 20000\right):\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{else}:\\
\;\;\;\;x + a\\
\end{array}
\end{array}
if t < -3.6e14 or 2e4 < t Initial program 90.7%
Taylor expanded in t around inf 65.8%
if -3.6e14 < t < 2e4Initial program 98.5%
Taylor expanded in b around 0 65.7%
Taylor expanded in t around 0 65.1%
fma-def65.1%
sub-neg65.1%
metadata-eval65.1%
fma-def65.1%
neg-mul-165.1%
unsub-neg65.1%
distribute-rgt-in65.1%
neg-mul-165.1%
unsub-neg65.1%
*-commutative65.1%
Simplified65.1%
Taylor expanded in z around 0 35.4%
+-commutative35.4%
Simplified35.4%
Final simplification49.4%
(FPCore (x y z t a b) :precision binary64 (if (<= x -4.2e+86) x (if (<= x 5.8e-116) (* b -2.0) (if (<= x 7.5e+76) a x))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -4.2e+86) {
tmp = x;
} else if (x <= 5.8e-116) {
tmp = b * -2.0;
} else if (x <= 7.5e+76) {
tmp = a;
} 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 <= (-4.2d+86)) then
tmp = x
else if (x <= 5.8d-116) then
tmp = b * (-2.0d0)
else if (x <= 7.5d+76) then
tmp = a
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 <= -4.2e+86) {
tmp = x;
} else if (x <= 5.8e-116) {
tmp = b * -2.0;
} else if (x <= 7.5e+76) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -4.2e+86: tmp = x elif x <= 5.8e-116: tmp = b * -2.0 elif x <= 7.5e+76: tmp = a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -4.2e+86) tmp = x; elseif (x <= 5.8e-116) tmp = Float64(b * -2.0); elseif (x <= 7.5e+76) tmp = a; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -4.2e+86) tmp = x; elseif (x <= 5.8e-116) tmp = b * -2.0; elseif (x <= 7.5e+76) tmp = a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -4.2e+86], x, If[LessEqual[x, 5.8e-116], N[(b * -2.0), $MachinePrecision], If[LessEqual[x, 7.5e+76], a, x]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.2 \cdot 10^{+86}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{-116}:\\
\;\;\;\;b \cdot -2\\
\mathbf{elif}\;x \leq 7.5 \cdot 10^{+76}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -4.1999999999999998e86 or 7.4999999999999995e76 < x Initial program 94.0%
Taylor expanded in x around inf 35.5%
if -4.1999999999999998e86 < x < 5.7999999999999996e-116Initial program 93.6%
Taylor expanded in y around inf 62.2%
mul-1-neg62.2%
distribute-rgt-neg-in62.2%
Simplified62.2%
Taylor expanded in y around 0 31.5%
Taylor expanded in t around 0 14.0%
*-commutative14.0%
Simplified14.0%
if 5.7999999999999996e-116 < x < 7.4999999999999995e76Initial program 100.0%
Taylor expanded in a around inf 33.0%
sub-neg33.0%
distribute-lft-in33.0%
*-rgt-identity33.0%
distribute-rgt-neg-in33.0%
sub-neg33.0%
*-commutative33.0%
Simplified33.0%
Taylor expanded in t around 0 23.7%
Final simplification22.8%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.7e+19) (* t b) (if (<= b 5.5e+16) x (* t b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.7e+19) {
tmp = t * b;
} else if (b <= 5.5e+16) {
tmp = x;
} else {
tmp = t * 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.7d+19)) then
tmp = t * b
else if (b <= 5.5d+16) then
tmp = x
else
tmp = t * 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.7e+19) {
tmp = t * b;
} else if (b <= 5.5e+16) {
tmp = x;
} else {
tmp = t * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.7e+19: tmp = t * b elif b <= 5.5e+16: tmp = x else: tmp = t * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.7e+19) tmp = Float64(t * b); elseif (b <= 5.5e+16) tmp = x; else tmp = Float64(t * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.7e+19) tmp = t * b; elseif (b <= 5.5e+16) tmp = x; else tmp = t * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.7e+19], N[(t * b), $MachinePrecision], If[LessEqual[b, 5.5e+16], x, N[(t * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.7 \cdot 10^{+19}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;b \leq 5.5 \cdot 10^{+16}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;t \cdot b\\
\end{array}
\end{array}
if b < -1.7e19 or 5.5e16 < b Initial program 89.6%
Taylor expanded in b around inf 74.8%
Taylor expanded in t around inf 30.5%
if -1.7e19 < b < 5.5e16Initial program 99.3%
Taylor expanded in x around inf 20.5%
Final simplification25.0%
(FPCore (x y z t a b) :precision binary64 (if (<= b -1.8e+14) (* t b) (if (<= b 2.6e+108) x (* y b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.8e+14) {
tmp = t * b;
} else if (b <= 2.6e+108) {
tmp = x;
} 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 (b <= (-1.8d+14)) then
tmp = t * b
else if (b <= 2.6d+108) then
tmp = x
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 (b <= -1.8e+14) {
tmp = t * b;
} else if (b <= 2.6e+108) {
tmp = x;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -1.8e+14: tmp = t * b elif b <= 2.6e+108: tmp = x else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.8e+14) tmp = Float64(t * b); elseif (b <= 2.6e+108) tmp = x; else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -1.8e+14) tmp = t * b; elseif (b <= 2.6e+108) tmp = x; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.8e+14], N[(t * b), $MachinePrecision], If[LessEqual[b, 2.6e+108], x, N[(y * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.8 \cdot 10^{+14}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;b \leq 2.6 \cdot 10^{+108}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if b < -1.8e14Initial program 88.9%
Taylor expanded in b around inf 73.9%
Taylor expanded in t around inf 38.4%
if -1.8e14 < b < 2.6000000000000002e108Initial program 98.0%
Taylor expanded in x around inf 19.3%
if 2.6000000000000002e108 < b Initial program 92.1%
Taylor expanded in b around inf 92.1%
Taylor expanded in y around inf 59.0%
Final simplification29.9%
(FPCore (x y z t a b) :precision binary64 (if (<= b -7.5e+89) (* t b) (if (<= b 1.6e+128) (+ x a) (* y b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -7.5e+89) {
tmp = t * b;
} else if (b <= 1.6e+128) {
tmp = x + a;
} 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 (b <= (-7.5d+89)) then
tmp = t * b
else if (b <= 1.6d+128) then
tmp = x + a
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 (b <= -7.5e+89) {
tmp = t * b;
} else if (b <= 1.6e+128) {
tmp = x + a;
} else {
tmp = y * b;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if b <= -7.5e+89: tmp = t * b elif b <= 1.6e+128: tmp = x + a else: tmp = y * b return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -7.5e+89) tmp = Float64(t * b); elseif (b <= 1.6e+128) tmp = Float64(x + a); else tmp = Float64(y * b); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (b <= -7.5e+89) tmp = t * b; elseif (b <= 1.6e+128) tmp = x + a; else tmp = y * b; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -7.5e+89], N[(t * b), $MachinePrecision], If[LessEqual[b, 1.6e+128], N[(x + a), $MachinePrecision], N[(y * b), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.5 \cdot 10^{+89}:\\
\;\;\;\;t \cdot b\\
\mathbf{elif}\;b \leq 1.6 \cdot 10^{+128}:\\
\;\;\;\;x + a\\
\mathbf{else}:\\
\;\;\;\;y \cdot b\\
\end{array}
\end{array}
if b < -7.49999999999999947e89Initial program 88.0%
Taylor expanded in b around inf 83.0%
Taylor expanded in t around inf 43.9%
if -7.49999999999999947e89 < b < 1.59999999999999993e128Initial program 97.6%
Taylor expanded in b around 0 84.4%
Taylor expanded in t around 0 68.0%
fma-def68.0%
sub-neg68.0%
metadata-eval68.0%
fma-def68.0%
neg-mul-168.0%
unsub-neg68.0%
distribute-rgt-in68.0%
neg-mul-168.0%
unsub-neg68.0%
*-commutative68.0%
Simplified68.0%
Taylor expanded in z around 0 31.9%
+-commutative31.9%
Simplified31.9%
if 1.59999999999999993e128 < b Initial program 91.4%
Taylor expanded in b around inf 94.3%
Taylor expanded in y around inf 61.1%
Final simplification38.2%
(FPCore (x y z t a b) :precision binary64 (if (<= x -1.85e+86) x (if (<= x 2.6e+75) a x)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (x <= -1.85e+86) {
tmp = x;
} else if (x <= 2.6e+75) {
tmp = a;
} 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 <= (-1.85d+86)) then
tmp = x
else if (x <= 2.6d+75) then
tmp = a
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 <= -1.85e+86) {
tmp = x;
} else if (x <= 2.6e+75) {
tmp = a;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if x <= -1.85e+86: tmp = x elif x <= 2.6e+75: tmp = a else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (x <= -1.85e+86) tmp = x; elseif (x <= 2.6e+75) tmp = a; else tmp = x; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (x <= -1.85e+86) tmp = x; elseif (x <= 2.6e+75) tmp = a; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -1.85e+86], x, If[LessEqual[x, 2.6e+75], a, x]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{+86}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.6 \cdot 10^{+75}:\\
\;\;\;\;a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if x < -1.84999999999999996e86 or 2.59999999999999985e75 < x Initial program 94.0%
Taylor expanded in x around inf 35.5%
if -1.84999999999999996e86 < x < 2.59999999999999985e75Initial program 95.3%
Taylor expanded in a around inf 33.1%
sub-neg33.1%
distribute-lft-in33.1%
*-rgt-identity33.1%
distribute-rgt-neg-in33.1%
sub-neg33.1%
*-commutative33.1%
Simplified33.1%
Taylor expanded in t around 0 14.2%
Final simplification21.2%
(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 94.9%
Taylor expanded in a around inf 27.9%
sub-neg27.9%
distribute-lft-in27.9%
*-rgt-identity27.9%
distribute-rgt-neg-in27.9%
sub-neg27.9%
*-commutative27.9%
Simplified27.9%
Taylor expanded in t around 0 11.4%
Final simplification11.4%
herbie shell --seed 2023192
(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)))