
(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 22 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))) (t_2 (* b (- (+ y t) 2.0))))
(if (<= (+ (+ (- x (* z (+ y -1.0))) t_1) t_2) INFINITY)
(+ (+ (- x (* y z)) (+ z t_1)) t_2)
(* y (- b z)))))
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 ((((x - (z * (y + -1.0))) + t_1) + t_2) <= ((double) INFINITY)) {
tmp = ((x - (y * z)) + (z + t_1)) + t_2;
} 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 = a * (1.0 - t);
double t_2 = b * ((y + t) - 2.0);
double tmp;
if ((((x - (z * (y + -1.0))) + t_1) + t_2) <= Double.POSITIVE_INFINITY) {
tmp = ((x - (y * z)) + (z + t_1)) + t_2;
} else {
tmp = y * (b - z);
}
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 (((x - (z * (y + -1.0))) + t_1) + t_2) <= math.inf: tmp = ((x - (y * z)) + (z + t_1)) + t_2 else: tmp = y * (b - z) 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 (Float64(Float64(Float64(x - Float64(z * Float64(y + -1.0))) + t_1) + t_2) <= Inf) tmp = Float64(Float64(Float64(x - Float64(y * z)) + Float64(z + t_1)) + t_2); else tmp = Float64(y * Float64(b - z)); 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 ((((x - (z * (y + -1.0))) + t_1) + t_2) <= Inf) tmp = ((x - (y * z)) + (z + t_1)) + t_2; else tmp = y * (b - z); 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[N[(N[(N[(x - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] + t$95$2), $MachinePrecision], Infinity], N[(N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(z + t$95$1), $MachinePrecision]), $MachinePrecision] + t$95$2), $MachinePrecision], N[(y * N[(b - z), $MachinePrecision]), $MachinePrecision]]]]
\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}\;\left(\left(x - z \cdot \left(y + -1\right)\right) + t\_1\right) + t\_2 \leq \infty:\\
\;\;\;\;\left(\left(x - y \cdot z\right) + \left(z + t\_1\right)\right) + t\_2\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(b - z\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%
Taylor expanded in y around 0 100.0%
sub-neg100.0%
mul-1-neg100.0%
unsub-neg100.0%
*-commutative100.0%
sub-neg100.0%
metadata-eval100.0%
*-commutative100.0%
distribute-neg-in100.0%
mul-1-neg100.0%
remove-double-neg100.0%
distribute-lft-neg-in100.0%
+-commutative100.0%
distribute-neg-in100.0%
metadata-eval100.0%
sub-neg100.0%
*-commutative100.0%
Simplified100.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 y around inf 61.6%
Final simplification98.0%
(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 94.9%
+-commutative94.9%
fma-define97.2%
associate--l+97.2%
sub-neg97.2%
metadata-eval97.2%
sub-neg97.2%
associate-+l-97.2%
fmm-def98.0%
sub-neg98.0%
metadata-eval98.0%
remove-double-neg98.0%
sub-neg98.0%
metadata-eval98.0%
Simplified98.0%
Final simplification98.0%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (- 1.0 t))))
(if (<= t -1.6e+251)
(* t (- b a))
(if (<= t -1.35e+19)
(+ x (- t_1 (* z (+ y -1.0))))
(if (<= t 0.00027)
(- (+ a (+ (* b (+ y -2.0)) (+ x z))) (* y z))
(+ (+ x (* b (- (+ y t) 2.0))) 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 (t <= -1.6e+251) {
tmp = t * (b - a);
} else if (t <= -1.35e+19) {
tmp = x + (t_1 - (z * (y + -1.0)));
} else if (t <= 0.00027) {
tmp = (a + ((b * (y + -2.0)) + (x + z))) - (y * z);
} else {
tmp = (x + (b * ((y + t) - 2.0))) + 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 (t <= (-1.6d+251)) then
tmp = t * (b - a)
else if (t <= (-1.35d+19)) then
tmp = x + (t_1 - (z * (y + (-1.0d0))))
else if (t <= 0.00027d0) then
tmp = (a + ((b * (y + (-2.0d0))) + (x + z))) - (y * z)
else
tmp = (x + (b * ((y + t) - 2.0d0))) + 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 (t <= -1.6e+251) {
tmp = t * (b - a);
} else if (t <= -1.35e+19) {
tmp = x + (t_1 - (z * (y + -1.0)));
} else if (t <= 0.00027) {
tmp = (a + ((b * (y + -2.0)) + (x + z))) - (y * z);
} else {
tmp = (x + (b * ((y + t) - 2.0))) + t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = a * (1.0 - t) tmp = 0 if t <= -1.6e+251: tmp = t * (b - a) elif t <= -1.35e+19: tmp = x + (t_1 - (z * (y + -1.0))) elif t <= 0.00027: tmp = (a + ((b * (y + -2.0)) + (x + z))) - (y * z) else: tmp = (x + (b * ((y + t) - 2.0))) + t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(1.0 - t)) tmp = 0.0 if (t <= -1.6e+251) tmp = Float64(t * Float64(b - a)); elseif (t <= -1.35e+19) tmp = Float64(x + Float64(t_1 - Float64(z * Float64(y + -1.0)))); elseif (t <= 0.00027) tmp = Float64(Float64(a + Float64(Float64(b * Float64(y + -2.0)) + Float64(x + z))) - Float64(y * z)); else tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) + 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 (t <= -1.6e+251) tmp = t * (b - a); elseif (t <= -1.35e+19) tmp = x + (t_1 - (z * (y + -1.0))); elseif (t <= 0.00027) tmp = (a + ((b * (y + -2.0)) + (x + z))) - (y * z); else tmp = (x + (b * ((y + t) - 2.0))) + 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[t, -1.6e+251], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.35e+19], N[(x + N[(t$95$1 - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.00027], N[(N[(a + N[(N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := a \cdot \left(1 - t\right)\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+251}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{+19}:\\
\;\;\;\;x + \left(t\_1 - z \cdot \left(y + -1\right)\right)\\
\mathbf{elif}\;t \leq 0.00027:\\
\;\;\;\;\left(a + \left(b \cdot \left(y + -2\right) + \left(x + z\right)\right)\right) - y \cdot z\\
\mathbf{else}:\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + t\_1\\
\end{array}
\end{array}
if t < -1.5999999999999999e251Initial program 72.7%
Taylor expanded in t around inf 81.9%
if -1.5999999999999999e251 < t < -1.35e19Initial program 90.7%
Taylor expanded in b around 0 82.5%
if -1.35e19 < t < 2.70000000000000003e-4Initial program 97.9%
Taylor expanded in y around 0 97.9%
sub-neg97.9%
mul-1-neg97.9%
unsub-neg97.9%
*-commutative97.9%
sub-neg97.9%
metadata-eval97.9%
*-commutative97.9%
distribute-neg-in97.9%
mul-1-neg97.9%
remove-double-neg97.9%
distribute-lft-neg-in97.9%
+-commutative97.9%
distribute-neg-in97.9%
metadata-eval97.9%
sub-neg97.9%
*-commutative97.9%
Simplified97.9%
Taylor expanded in t around 0 97.4%
associate-+r+97.4%
+-commutative97.4%
sub-neg97.4%
metadata-eval97.4%
Simplified97.4%
if 2.70000000000000003e-4 < t Initial program 94.9%
Taylor expanded in z around 0 86.7%
Final simplification91.8%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* t (- b a))))
(if (<= t -1.15e+251)
t_1
(if (<= t -5.8e+19)
(+ x (- (* a (- 1.0 t)) (* z (+ y -1.0))))
(if (<= t 4.6e+122)
(- (+ a (+ (* b (+ y -2.0)) (+ x z))) (* 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.15e+251) {
tmp = t_1;
} else if (t <= -5.8e+19) {
tmp = x + ((a * (1.0 - t)) - (z * (y + -1.0)));
} else if (t <= 4.6e+122) {
tmp = (a + ((b * (y + -2.0)) + (x + z))) - (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.15d+251)) then
tmp = t_1
else if (t <= (-5.8d+19)) then
tmp = x + ((a * (1.0d0 - t)) - (z * (y + (-1.0d0))))
else if (t <= 4.6d+122) then
tmp = (a + ((b * (y + (-2.0d0))) + (x + z))) - (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.15e+251) {
tmp = t_1;
} else if (t <= -5.8e+19) {
tmp = x + ((a * (1.0 - t)) - (z * (y + -1.0)));
} else if (t <= 4.6e+122) {
tmp = (a + ((b * (y + -2.0)) + (x + z))) - (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.15e+251: tmp = t_1 elif t <= -5.8e+19: tmp = x + ((a * (1.0 - t)) - (z * (y + -1.0))) elif t <= 4.6e+122: tmp = (a + ((b * (y + -2.0)) + (x + z))) - (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.15e+251) tmp = t_1; elseif (t <= -5.8e+19) tmp = Float64(x + Float64(Float64(a * Float64(1.0 - t)) - Float64(z * Float64(y + -1.0)))); elseif (t <= 4.6e+122) tmp = Float64(Float64(a + Float64(Float64(b * Float64(y + -2.0)) + Float64(x + z))) - 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.15e+251) tmp = t_1; elseif (t <= -5.8e+19) tmp = x + ((a * (1.0 - t)) - (z * (y + -1.0))); elseif (t <= 4.6e+122) tmp = (a + ((b * (y + -2.0)) + (x + z))) - (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.15e+251], t$95$1, If[LessEqual[t, -5.8e+19], N[(x + N[(N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision] - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e+122], N[(N[(a + N[(N[(b * N[(y + -2.0), $MachinePrecision]), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 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.15 \cdot 10^{+251}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq -5.8 \cdot 10^{+19}:\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) - z \cdot \left(y + -1\right)\right)\\
\mathbf{elif}\;t \leq 4.6 \cdot 10^{+122}:\\
\;\;\;\;\left(a + \left(b \cdot \left(y + -2\right) + \left(x + z\right)\right)\right) - y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -1.14999999999999994e251 or 4.6000000000000001e122 < t Initial program 87.5%
Taylor expanded in t around inf 82.1%
if -1.14999999999999994e251 < t < -5.8e19Initial program 90.7%
Taylor expanded in b around 0 82.5%
if -5.8e19 < t < 4.6000000000000001e122Initial program 98.1%
Taylor expanded in y around 0 98.2%
sub-neg98.2%
mul-1-neg98.2%
unsub-neg98.2%
*-commutative98.2%
sub-neg98.2%
metadata-eval98.2%
*-commutative98.2%
distribute-neg-in98.2%
mul-1-neg98.2%
remove-double-neg98.2%
distribute-lft-neg-in98.2%
+-commutative98.2%
distribute-neg-in98.2%
metadata-eval98.2%
sub-neg98.2%
*-commutative98.2%
Simplified98.2%
Taylor expanded in t around 0 93.0%
associate-+r+93.0%
+-commutative93.0%
sub-neg93.0%
metadata-eval93.0%
Simplified93.0%
Final simplification89.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -1e+18) (not (<= b 3.4e-47))) (+ (+ x (* b (- (+ y t) 2.0))) (* z (- 1.0 y))) (+ 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 <= -1e+18) || !(b <= 3.4e-47)) {
tmp = (x + (b * ((y + t) - 2.0))) + (z * (1.0 - y));
} 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 <= (-1d+18)) .or. (.not. (b <= 3.4d-47))) then
tmp = (x + (b * ((y + t) - 2.0d0))) + (z * (1.0d0 - y))
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 <= -1e+18) || !(b <= 3.4e-47)) {
tmp = (x + (b * ((y + t) - 2.0))) + (z * (1.0 - y));
} 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 <= -1e+18) or not (b <= 3.4e-47): tmp = (x + (b * ((y + t) - 2.0))) + (z * (1.0 - y)) 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 <= -1e+18) || !(b <= 3.4e-47)) tmp = Float64(Float64(x + Float64(b * Float64(Float64(y + t) - 2.0))) + Float64(z * Float64(1.0 - y))); 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 <= -1e+18) || ~((b <= 3.4e-47))) tmp = (x + (b * ((y + t) - 2.0))) + (z * (1.0 - y)); 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, -1e+18], N[Not[LessEqual[b, 3.4e-47]], $MachinePrecision]], N[(N[(x + N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(z * N[(1.0 - y), $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 \cdot 10^{+18} \lor \neg \left(b \leq 3.4 \cdot 10^{-47}\right):\\
\;\;\;\;\left(x + b \cdot \left(\left(y + t\right) - 2\right)\right) + z \cdot \left(1 - y\right)\\
\mathbf{else}:\\
\;\;\;\;x + \left(a \cdot \left(1 - t\right) - z \cdot \left(y + -1\right)\right)\\
\end{array}
\end{array}
if b < -1e18 or 3.4000000000000002e-47 < b Initial program 90.8%
Taylor expanded in a around 0 86.0%
if -1e18 < b < 3.4000000000000002e-47Initial program 99.2%
Taylor expanded in b around 0 95.4%
Final simplification90.6%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -9.2e+92)
t_1
(if (<= y -7.5e+15)
(+ a (+ x (* b (- y 2.0))))
(if (<= y 7.5e+37) (+ z (+ x (* (+ 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 <= -9.2e+92) {
tmp = t_1;
} else if (y <= -7.5e+15) {
tmp = a + (x + (b * (y - 2.0)));
} else if (y <= 7.5e+37) {
tmp = z + (x + ((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 <= (-9.2d+92)) then
tmp = t_1
else if (y <= (-7.5d+15)) then
tmp = a + (x + (b * (y - 2.0d0)))
else if (y <= 7.5d+37) then
tmp = z + (x + ((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 <= -9.2e+92) {
tmp = t_1;
} else if (y <= -7.5e+15) {
tmp = a + (x + (b * (y - 2.0)));
} else if (y <= 7.5e+37) {
tmp = z + (x + ((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 <= -9.2e+92: tmp = t_1 elif y <= -7.5e+15: tmp = a + (x + (b * (y - 2.0))) elif y <= 7.5e+37: tmp = z + (x + ((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 <= -9.2e+92) tmp = t_1; elseif (y <= -7.5e+15) tmp = Float64(a + Float64(x + Float64(b * Float64(y - 2.0)))); elseif (y <= 7.5e+37) tmp = Float64(z + Float64(x + 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 <= -9.2e+92) tmp = t_1; elseif (y <= -7.5e+15) tmp = a + (x + (b * (y - 2.0))); elseif (y <= 7.5e+37) tmp = z + (x + ((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, -9.2e+92], t$95$1, If[LessEqual[y, -7.5e+15], N[(a + N[(x + N[(b * N[(y - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 7.5e+37], N[(z + N[(x + 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 -9.2 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -7.5 \cdot 10^{+15}:\\
\;\;\;\;a + \left(x + b \cdot \left(y - 2\right)\right)\\
\mathbf{elif}\;y \leq 7.5 \cdot 10^{+37}:\\
\;\;\;\;z + \left(x + \left(t + -2\right) \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9.19999999999999994e92 or 7.5000000000000003e37 < y Initial program 89.8%
Taylor expanded in y around inf 77.3%
if -9.19999999999999994e92 < y < -7.5e15Initial program 94.7%
Taylor expanded in y around 0 94.7%
sub-neg94.7%
mul-1-neg94.7%
unsub-neg94.7%
*-commutative94.7%
sub-neg94.7%
metadata-eval94.7%
*-commutative94.7%
distribute-neg-in94.7%
mul-1-neg94.7%
remove-double-neg94.7%
distribute-lft-neg-in94.7%
+-commutative94.7%
distribute-neg-in94.7%
metadata-eval94.7%
sub-neg94.7%
*-commutative94.7%
Simplified94.7%
Taylor expanded in t around 0 63.9%
associate-+r+63.9%
+-commutative63.9%
sub-neg63.9%
metadata-eval63.9%
Simplified63.9%
Taylor expanded in z around 0 58.9%
if -7.5e15 < y < 7.5000000000000003e37Initial program 99.2%
Taylor expanded in a around 0 76.8%
Taylor expanded in y around 0 74.5%
sub-neg74.5%
sub-neg74.5%
metadata-eval74.5%
neg-mul-174.5%
remove-double-neg74.5%
Simplified74.5%
Final simplification74.5%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -7.5e+133) (not (<= b 1.62e+134))) (* b (- (+ y t) 2.0)) (- (+ x (+ z (* a (- 1.0 t)))) (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -7.5e+133) || !(b <= 1.62e+134)) {
tmp = b * ((y + t) - 2.0);
} else {
tmp = (x + (z + (a * (1.0 - t)))) - (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 <= (-7.5d+133)) .or. (.not. (b <= 1.62d+134))) then
tmp = b * ((y + t) - 2.0d0)
else
tmp = (x + (z + (a * (1.0d0 - t)))) - (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 <= -7.5e+133) || !(b <= 1.62e+134)) {
tmp = b * ((y + t) - 2.0);
} else {
tmp = (x + (z + (a * (1.0 - t)))) - (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -7.5e+133) or not (b <= 1.62e+134): tmp = b * ((y + t) - 2.0) else: tmp = (x + (z + (a * (1.0 - t)))) - (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -7.5e+133) || !(b <= 1.62e+134)) tmp = Float64(b * Float64(Float64(y + t) - 2.0)); else tmp = Float64(Float64(x + Float64(z + Float64(a * Float64(1.0 - t)))) - Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -7.5e+133) || ~((b <= 1.62e+134))) tmp = b * ((y + t) - 2.0); else tmp = (x + (z + (a * (1.0 - t)))) - (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -7.5e+133], N[Not[LessEqual[b, 1.62e+134]], $MachinePrecision]], N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z + N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -7.5 \cdot 10^{+133} \lor \neg \left(b \leq 1.62 \cdot 10^{+134}\right):\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \left(z + a \cdot \left(1 - t\right)\right)\right) - y \cdot z\\
\end{array}
\end{array}
if b < -7.49999999999999992e133 or 1.6199999999999999e134 < b Initial program 91.5%
Taylor expanded in b around inf 88.1%
if -7.49999999999999992e133 < b < 1.6199999999999999e134Initial program 96.2%
Taylor expanded in y around 0 96.2%
sub-neg96.2%
mul-1-neg96.2%
unsub-neg96.2%
*-commutative96.2%
sub-neg96.2%
metadata-eval96.2%
*-commutative96.2%
distribute-neg-in96.2%
mul-1-neg96.2%
remove-double-neg96.2%
distribute-lft-neg-in96.2%
+-commutative96.2%
distribute-neg-in96.2%
metadata-eval96.2%
sub-neg96.2%
*-commutative96.2%
Simplified96.2%
Taylor expanded in b around 0 85.8%
Final simplification86.4%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -8e+133) (not (<= b 1.85e+133))) (* b (- (+ y t) 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 <= -8e+133) || !(b <= 1.85e+133)) {
tmp = b * ((y + t) - 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 <= (-8d+133)) .or. (.not. (b <= 1.85d+133))) then
tmp = b * ((y + t) - 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 <= -8e+133) || !(b <= 1.85e+133)) {
tmp = b * ((y + t) - 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 <= -8e+133) or not (b <= 1.85e+133): tmp = b * ((y + t) - 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 <= -8e+133) || !(b <= 1.85e+133)) tmp = Float64(b * Float64(Float64(y + t) - 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 <= -8e+133) || ~((b <= 1.85e+133))) tmp = b * ((y + t) - 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, -8e+133], N[Not[LessEqual[b, 1.85e+133]], $MachinePrecision]], N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $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 -8 \cdot 10^{+133} \lor \neg \left(b \leq 1.85 \cdot 10^{+133}\right):\\
\;\;\;\;b \cdot \left(\left(y + t\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 < -8.0000000000000002e133 or 1.85000000000000012e133 < b Initial program 91.5%
Taylor expanded in b around inf 88.1%
if -8.0000000000000002e133 < b < 1.85000000000000012e133Initial program 96.2%
Taylor expanded in b around 0 85.8%
Final simplification86.4%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -1.2e+95)
t_1
(if (<= y -2e-30)
(* t (- b a))
(if (<= y 180000000.0) (+ z (+ x (* -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.2e+95) {
tmp = t_1;
} else if (y <= -2e-30) {
tmp = t * (b - a);
} else if (y <= 180000000.0) {
tmp = z + (x + (-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.2d+95)) then
tmp = t_1
else if (y <= (-2d-30)) then
tmp = t * (b - a)
else if (y <= 180000000.0d0) then
tmp = z + (x + ((-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.2e+95) {
tmp = t_1;
} else if (y <= -2e-30) {
tmp = t * (b - a);
} else if (y <= 180000000.0) {
tmp = z + (x + (-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.2e+95: tmp = t_1 elif y <= -2e-30: tmp = t * (b - a) elif y <= 180000000.0: tmp = z + (x + (-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.2e+95) tmp = t_1; elseif (y <= -2e-30) tmp = Float64(t * Float64(b - a)); elseif (y <= 180000000.0) tmp = Float64(z + Float64(x + Float64(-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.2e+95) tmp = t_1; elseif (y <= -2e-30) tmp = t * (b - a); elseif (y <= 180000000.0) tmp = z + (x + (-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.2e+95], t$95$1, If[LessEqual[y, -2e-30], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 180000000.0], N[(z + N[(x + N[(-2.0 * 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.2 \cdot 10^{+95}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-30}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{elif}\;y \leq 180000000:\\
\;\;\;\;z + \left(x + -2 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.2e95 or 1.8e8 < y Initial program 90.1%
Taylor expanded in y around inf 76.3%
if -1.2e95 < y < -2e-30Initial program 96.8%
Taylor expanded in t around inf 49.7%
if -2e-30 < y < 1.8e8Initial program 99.1%
Taylor expanded in a around 0 77.9%
Taylor expanded in y around 0 76.7%
sub-neg76.7%
sub-neg76.7%
metadata-eval76.7%
neg-mul-176.7%
remove-double-neg76.7%
Simplified76.7%
Taylor expanded in t around 0 60.4%
*-commutative60.4%
Simplified60.4%
Final simplification65.9%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -3.15e+88)
t_1
(if (<= y -5.5e-15)
(* a (- 1.0 t))
(if (<= y 1.46e+38) (+ x (* b (- t 2.0))) 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 <= -3.15e+88) {
tmp = t_1;
} else if (y <= -5.5e-15) {
tmp = a * (1.0 - t);
} else if (y <= 1.46e+38) {
tmp = x + (b * (t - 2.0));
} 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 <= (-3.15d+88)) then
tmp = t_1
else if (y <= (-5.5d-15)) then
tmp = a * (1.0d0 - t)
else if (y <= 1.46d+38) then
tmp = x + (b * (t - 2.0d0))
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 <= -3.15e+88) {
tmp = t_1;
} else if (y <= -5.5e-15) {
tmp = a * (1.0 - t);
} else if (y <= 1.46e+38) {
tmp = x + (b * (t - 2.0));
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -3.15e+88: tmp = t_1 elif y <= -5.5e-15: tmp = a * (1.0 - t) elif y <= 1.46e+38: tmp = x + (b * (t - 2.0)) 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 <= -3.15e+88) tmp = t_1; elseif (y <= -5.5e-15) tmp = Float64(a * Float64(1.0 - t)); elseif (y <= 1.46e+38) tmp = Float64(x + Float64(b * Float64(t - 2.0))); 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 <= -3.15e+88) tmp = t_1; elseif (y <= -5.5e-15) tmp = a * (1.0 - t); elseif (y <= 1.46e+38) tmp = x + (b * (t - 2.0)); 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, -3.15e+88], t$95$1, If[LessEqual[y, -5.5e-15], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.46e+38], N[(x + N[(b * N[(t - 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -3.15 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -5.5 \cdot 10^{-15}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{elif}\;y \leq 1.46 \cdot 10^{+38}:\\
\;\;\;\;x + b \cdot \left(t - 2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -3.15e88 or 1.46000000000000008e38 < y Initial program 89.8%
Taylor expanded in y around inf 77.3%
if -3.15e88 < y < -5.5000000000000002e-15Initial program 96.5%
Taylor expanded in a around inf 51.3%
if -5.5000000000000002e-15 < y < 1.46000000000000008e38Initial program 99.1%
Taylor expanded in a around 0 78.2%
Taylor expanded in y around 0 76.5%
sub-neg76.5%
sub-neg76.5%
metadata-eval76.5%
neg-mul-176.5%
remove-double-neg76.5%
Simplified76.5%
Taylor expanded in z around 0 56.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- b z))))
(if (<= y -9e+88)
t_1
(if (<= y -2.1e-51) (* t (- b a)) (if (<= y 1720000000.0) (+ x z) 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 <= -9e+88) {
tmp = t_1;
} else if (y <= -2.1e-51) {
tmp = t * (b - a);
} else if (y <= 1720000000.0) {
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 = y * (b - z)
if (y <= (-9d+88)) then
tmp = t_1
else if (y <= (-2.1d-51)) then
tmp = t * (b - a)
else if (y <= 1720000000.0d0) 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 = y * (b - z);
double tmp;
if (y <= -9e+88) {
tmp = t_1;
} else if (y <= -2.1e-51) {
tmp = t * (b - a);
} else if (y <= 1720000000.0) {
tmp = x + z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * (b - z) tmp = 0 if y <= -9e+88: tmp = t_1 elif y <= -2.1e-51: tmp = t * (b - a) elif y <= 1720000000.0: tmp = x + z 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 <= -9e+88) tmp = t_1; elseif (y <= -2.1e-51) tmp = Float64(t * Float64(b - a)); elseif (y <= 1720000000.0) tmp = Float64(x + z); 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 <= -9e+88) tmp = t_1; elseif (y <= -2.1e-51) tmp = t * (b - a); elseif (y <= 1720000000.0) tmp = x + z; 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, -9e+88], t$95$1, If[LessEqual[y, -2.1e-51], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1720000000.0], N[(x + z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(b - z\right)\\
\mathbf{if}\;y \leq -9 \cdot 10^{+88}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.1 \cdot 10^{-51}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{elif}\;y \leq 1720000000:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -9e88 or 1.72e9 < y Initial program 90.1%
Taylor expanded in y around inf 76.3%
if -9e88 < y < -2.10000000000000002e-51Initial program 97.1%
Taylor expanded in t around inf 49.8%
if -2.10000000000000002e-51 < y < 1.72e9Initial program 99.1%
Taylor expanded in a around 0 78.8%
Taylor expanded in b around 0 48.3%
Taylor expanded in y around 0 47.1%
sub-neg47.1%
neg-mul-147.1%
remove-double-neg47.1%
Simplified47.1%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -3.4e+18) (not (<= b 1.6e+134))) (* b (- (+ y t) 2.0)) (- (+ x (+ z a)) (* y z))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.4e+18) || !(b <= 1.6e+134)) {
tmp = b * ((y + t) - 2.0);
} else {
tmp = (x + (z + a)) - (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 <= (-3.4d+18)) .or. (.not. (b <= 1.6d+134))) then
tmp = b * ((y + t) - 2.0d0)
else
tmp = (x + (z + a)) - (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 <= -3.4e+18) || !(b <= 1.6e+134)) {
tmp = b * ((y + t) - 2.0);
} else {
tmp = (x + (z + a)) - (y * z);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -3.4e+18) or not (b <= 1.6e+134): tmp = b * ((y + t) - 2.0) else: tmp = (x + (z + a)) - (y * z) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3.4e+18) || !(b <= 1.6e+134)) tmp = Float64(b * Float64(Float64(y + t) - 2.0)); else tmp = Float64(Float64(x + Float64(z + a)) - Float64(y * z)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((b <= -3.4e+18) || ~((b <= 1.6e+134))) tmp = b * ((y + t) - 2.0); else tmp = (x + (z + a)) - (y * z); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3.4e+18], N[Not[LessEqual[b, 1.6e+134]], $MachinePrecision]], N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.4 \cdot 10^{+18} \lor \neg \left(b \leq 1.6 \cdot 10^{+134}\right):\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x + \left(z + a\right)\right) - y \cdot z\\
\end{array}
\end{array}
if b < -3.4e18 or 1.6e134 < b Initial program 89.1%
Taylor expanded in b around inf 80.1%
if -3.4e18 < b < 1.6e134Initial program 98.1%
Taylor expanded in y around 0 98.1%
sub-neg98.1%
mul-1-neg98.1%
unsub-neg98.1%
*-commutative98.1%
sub-neg98.1%
metadata-eval98.1%
*-commutative98.1%
distribute-neg-in98.1%
mul-1-neg98.1%
remove-double-neg98.1%
distribute-lft-neg-in98.1%
+-commutative98.1%
distribute-neg-in98.1%
metadata-eval98.1%
sub-neg98.1%
*-commutative98.1%
Simplified98.1%
Taylor expanded in b around 0 89.2%
Taylor expanded in t around 0 71.6%
Final simplification74.7%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- z))))
(if (<= y -1.4e+100)
t_1
(if (<= y -5e-48) (* t (- b a)) (if (<= y 2850000000.0) (+ x z) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * -z;
double tmp;
if (y <= -1.4e+100) {
tmp = t_1;
} else if (y <= -5e-48) {
tmp = t * (b - a);
} else if (y <= 2850000000.0) {
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 = y * -z
if (y <= (-1.4d+100)) then
tmp = t_1
else if (y <= (-5d-48)) then
tmp = t * (b - a)
else if (y <= 2850000000.0d0) 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 = y * -z;
double tmp;
if (y <= -1.4e+100) {
tmp = t_1;
} else if (y <= -5e-48) {
tmp = t * (b - a);
} else if (y <= 2850000000.0) {
tmp = x + z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * -z tmp = 0 if y <= -1.4e+100: tmp = t_1 elif y <= -5e-48: tmp = t * (b - a) elif y <= 2850000000.0: tmp = x + z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(-z)) tmp = 0.0 if (y <= -1.4e+100) tmp = t_1; elseif (y <= -5e-48) tmp = Float64(t * Float64(b - a)); elseif (y <= 2850000000.0) tmp = Float64(x + z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * -z; tmp = 0.0; if (y <= -1.4e+100) tmp = t_1; elseif (y <= -5e-48) tmp = t * (b - a); elseif (y <= 2850000000.0) tmp = x + z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * (-z)), $MachinePrecision]}, If[LessEqual[y, -1.4e+100], t$95$1, If[LessEqual[y, -5e-48], N[(t * N[(b - a), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2850000000.0], N[(x + z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-z\right)\\
\mathbf{if}\;y \leq -1.4 \cdot 10^{+100}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -5 \cdot 10^{-48}:\\
\;\;\;\;t \cdot \left(b - a\right)\\
\mathbf{elif}\;y \leq 2850000000:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.3999999999999999e100 or 2.85e9 < y Initial program 90.1%
Taylor expanded in y around inf 76.3%
Taylor expanded in b around 0 46.9%
neg-mul-146.9%
Simplified46.9%
if -1.3999999999999999e100 < y < -4.9999999999999999e-48Initial program 97.1%
Taylor expanded in t around inf 49.8%
if -4.9999999999999999e-48 < y < 2.85e9Initial program 99.1%
Taylor expanded in a around 0 78.8%
Taylor expanded in b around 0 48.3%
Taylor expanded in y around 0 47.1%
sub-neg47.1%
neg-mul-147.1%
remove-double-neg47.1%
Simplified47.1%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- z))))
(if (<= y -1.06e+90)
t_1
(if (<= y -3.1e-14)
(* a (- 1.0 t))
(if (<= y 430000000000.0) (+ x z) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * -z;
double tmp;
if (y <= -1.06e+90) {
tmp = t_1;
} else if (y <= -3.1e-14) {
tmp = a * (1.0 - t);
} else if (y <= 430000000000.0) {
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 = y * -z
if (y <= (-1.06d+90)) then
tmp = t_1
else if (y <= (-3.1d-14)) then
tmp = a * (1.0d0 - t)
else if (y <= 430000000000.0d0) 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 = y * -z;
double tmp;
if (y <= -1.06e+90) {
tmp = t_1;
} else if (y <= -3.1e-14) {
tmp = a * (1.0 - t);
} else if (y <= 430000000000.0) {
tmp = x + z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * -z tmp = 0 if y <= -1.06e+90: tmp = t_1 elif y <= -3.1e-14: tmp = a * (1.0 - t) elif y <= 430000000000.0: tmp = x + z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(-z)) tmp = 0.0 if (y <= -1.06e+90) tmp = t_1; elseif (y <= -3.1e-14) tmp = Float64(a * Float64(1.0 - t)); elseif (y <= 430000000000.0) tmp = Float64(x + z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * -z; tmp = 0.0; if (y <= -1.06e+90) tmp = t_1; elseif (y <= -3.1e-14) tmp = a * (1.0 - t); elseif (y <= 430000000000.0) tmp = x + z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * (-z)), $MachinePrecision]}, If[LessEqual[y, -1.06e+90], t$95$1, If[LessEqual[y, -3.1e-14], N[(a * N[(1.0 - t), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 430000000000.0], N[(x + z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-z\right)\\
\mathbf{if}\;y \leq -1.06 \cdot 10^{+90}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -3.1 \cdot 10^{-14}:\\
\;\;\;\;a \cdot \left(1 - t\right)\\
\mathbf{elif}\;y \leq 430000000000:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -1.06e90 or 4.3e11 < y Initial program 90.1%
Taylor expanded in y around inf 76.3%
Taylor expanded in b around 0 46.9%
neg-mul-146.9%
Simplified46.9%
if -1.06e90 < y < -3.10000000000000004e-14Initial program 96.5%
Taylor expanded in a around inf 51.3%
if -3.10000000000000004e-14 < y < 4.3e11Initial program 99.1%
Taylor expanded in a around 0 78.4%
Taylor expanded in b around 0 47.4%
Taylor expanded in y around 0 46.2%
sub-neg46.2%
neg-mul-146.2%
remove-double-neg46.2%
Simplified46.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* y (- z))))
(if (<= y -4.3e+91)
t_1
(if (<= y -2.9e-15) (* t (- a)) (if (<= y 410000000000.0) (+ x z) t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = y * -z;
double tmp;
if (y <= -4.3e+91) {
tmp = t_1;
} else if (y <= -2.9e-15) {
tmp = t * -a;
} else if (y <= 410000000000.0) {
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 = y * -z
if (y <= (-4.3d+91)) then
tmp = t_1
else if (y <= (-2.9d-15)) then
tmp = t * -a
else if (y <= 410000000000.0d0) 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 = y * -z;
double tmp;
if (y <= -4.3e+91) {
tmp = t_1;
} else if (y <= -2.9e-15) {
tmp = t * -a;
} else if (y <= 410000000000.0) {
tmp = x + z;
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = y * -z tmp = 0 if y <= -4.3e+91: tmp = t_1 elif y <= -2.9e-15: tmp = t * -a elif y <= 410000000000.0: tmp = x + z else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(y * Float64(-z)) tmp = 0.0 if (y <= -4.3e+91) tmp = t_1; elseif (y <= -2.9e-15) tmp = Float64(t * Float64(-a)); elseif (y <= 410000000000.0) tmp = Float64(x + z); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = y * -z; tmp = 0.0; if (y <= -4.3e+91) tmp = t_1; elseif (y <= -2.9e-15) tmp = t * -a; elseif (y <= 410000000000.0) tmp = x + z; else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * (-z)), $MachinePrecision]}, If[LessEqual[y, -4.3e+91], t$95$1, If[LessEqual[y, -2.9e-15], N[(t * (-a)), $MachinePrecision], If[LessEqual[y, 410000000000.0], N[(x + z), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := y \cdot \left(-z\right)\\
\mathbf{if}\;y \leq -4.3 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;y \leq -2.9 \cdot 10^{-15}:\\
\;\;\;\;t \cdot \left(-a\right)\\
\mathbf{elif}\;y \leq 410000000000:\\
\;\;\;\;x + z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if y < -4.3000000000000001e91 or 4.1e11 < y Initial program 90.1%
Taylor expanded in y around inf 76.3%
Taylor expanded in b around 0 46.9%
neg-mul-146.9%
Simplified46.9%
if -4.3000000000000001e91 < y < -2.90000000000000019e-15Initial program 96.5%
Taylor expanded in t around inf 49.6%
Taylor expanded in b around 0 32.5%
neg-mul-132.5%
Simplified32.5%
if -2.90000000000000019e-15 < y < 4.1e11Initial program 99.1%
Taylor expanded in a around 0 78.4%
Taylor expanded in b around 0 47.4%
Taylor expanded in y around 0 46.2%
sub-neg46.2%
neg-mul-146.2%
remove-double-neg46.2%
Simplified46.2%
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (- (+ y t) 2.0))))
(if (<= b -6e-9)
(- t_1 (* y z))
(if (<= b 1.9e+133) (- (+ x (+ z a)) (* y z)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = b * ((y + t) - 2.0);
double tmp;
if (b <= -6e-9) {
tmp = t_1 - (y * z);
} else if (b <= 1.9e+133) {
tmp = (x + (z + a)) - (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 = b * ((y + t) - 2.0d0)
if (b <= (-6d-9)) then
tmp = t_1 - (y * z)
else if (b <= 1.9d+133) then
tmp = (x + (z + a)) - (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 = b * ((y + t) - 2.0);
double tmp;
if (b <= -6e-9) {
tmp = t_1 - (y * z);
} else if (b <= 1.9e+133) {
tmp = (x + (z + a)) - (y * z);
} else {
tmp = t_1;
}
return tmp;
}
def code(x, y, z, t, a, b): t_1 = b * ((y + t) - 2.0) tmp = 0 if b <= -6e-9: tmp = t_1 - (y * z) elif b <= 1.9e+133: tmp = (x + (z + a)) - (y * z) else: tmp = t_1 return tmp
function code(x, y, z, t, a, b) t_1 = Float64(b * Float64(Float64(y + t) - 2.0)) tmp = 0.0 if (b <= -6e-9) tmp = Float64(t_1 - Float64(y * z)); elseif (b <= 1.9e+133) tmp = Float64(Float64(x + Float64(z + a)) - Float64(y * z)); else tmp = t_1; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) t_1 = b * ((y + t) - 2.0); tmp = 0.0; if (b <= -6e-9) tmp = t_1 - (y * z); elseif (b <= 1.9e+133) tmp = (x + (z + a)) - (y * z); else tmp = t_1; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6e-9], N[(t$95$1 - N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.9e+133], N[(N[(x + N[(z + a), $MachinePrecision]), $MachinePrecision] - N[(y * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
\\
\begin{array}{l}
t_1 := b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{if}\;b \leq -6 \cdot 10^{-9}:\\
\;\;\;\;t\_1 - y \cdot z\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{+133}:\\
\;\;\;\;\left(x + \left(z + a\right)\right) - y \cdot z\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if b < -5.99999999999999996e-9Initial program 89.2%
Taylor expanded in y around inf 73.4%
mul-1-neg73.4%
*-commutative73.4%
distribute-lft-neg-in73.4%
Simplified73.4%
if -5.99999999999999996e-9 < b < 1.9000000000000001e133Initial program 98.1%
Taylor expanded in y around 0 98.1%
sub-neg98.1%
mul-1-neg98.1%
unsub-neg98.1%
*-commutative98.1%
sub-neg98.1%
metadata-eval98.1%
*-commutative98.1%
distribute-neg-in98.1%
mul-1-neg98.1%
remove-double-neg98.1%
distribute-lft-neg-in98.1%
+-commutative98.1%
distribute-neg-in98.1%
metadata-eval98.1%
sub-neg98.1%
*-commutative98.1%
Simplified98.1%
Taylor expanded in b around 0 89.6%
Taylor expanded in t around 0 72.5%
if 1.9000000000000001e133 < b Initial program 90.3%
Taylor expanded in b around inf 93.6%
Final simplification75.3%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -3.4e+18) (not (<= b 1.6e+133))) (* b (- (+ y t) 2.0)) (- x (* z (+ y -1.0)))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.4e+18) || !(b <= 1.6e+133)) {
tmp = b * ((y + t) - 2.0);
} else {
tmp = x - (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 <= (-3.4d+18)) .or. (.not. (b <= 1.6d+133))) then
tmp = b * ((y + t) - 2.0d0)
else
tmp = x - (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 <= -3.4e+18) || !(b <= 1.6e+133)) {
tmp = b * ((y + t) - 2.0);
} else {
tmp = x - (z * (y + -1.0));
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -3.4e+18) or not (b <= 1.6e+133): tmp = b * ((y + t) - 2.0) else: tmp = x - (z * (y + -1.0)) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3.4e+18) || !(b <= 1.6e+133)) tmp = Float64(b * Float64(Float64(y + t) - 2.0)); else tmp = Float64(x - 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 <= -3.4e+18) || ~((b <= 1.6e+133))) tmp = b * ((y + t) - 2.0); else tmp = x - (z * (y + -1.0)); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3.4e+18], N[Not[LessEqual[b, 1.6e+133]], $MachinePrecision]], N[(b * N[(N[(y + t), $MachinePrecision] - 2.0), $MachinePrecision]), $MachinePrecision], N[(x - N[(z * N[(y + -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.4 \cdot 10^{+18} \lor \neg \left(b \leq 1.6 \cdot 10^{+133}\right):\\
\;\;\;\;b \cdot \left(\left(y + t\right) - 2\right)\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \left(y + -1\right)\\
\end{array}
\end{array}
if b < -3.4e18 or 1.59999999999999999e133 < b Initial program 89.1%
Taylor expanded in b around inf 80.1%
if -3.4e18 < b < 1.59999999999999999e133Initial program 98.1%
Taylor expanded in a around 0 70.0%
Taylor expanded in b around 0 61.0%
Final simplification67.9%
(FPCore (x y z t a b) :precision binary64 (if (or (<= y -1660000.0) (not (<= y 4.1e+93))) (* y b) (+ x z)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1660000.0) || !(y <= 4.1e+93)) {
tmp = y * b;
} else {
tmp = x + z;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if ((y <= (-1660000.0d0)) .or. (.not. (y <= 4.1d+93))) then
tmp = y * b
else
tmp = x + z
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((y <= -1660000.0) || !(y <= 4.1e+93)) {
tmp = y * b;
} else {
tmp = x + z;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (y <= -1660000.0) or not (y <= 4.1e+93): tmp = y * b else: tmp = x + z return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((y <= -1660000.0) || !(y <= 4.1e+93)) tmp = Float64(y * b); else tmp = Float64(x + z); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if ((y <= -1660000.0) || ~((y <= 4.1e+93))) tmp = y * b; else tmp = x + z; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[y, -1660000.0], N[Not[LessEqual[y, 4.1e+93]], $MachinePrecision]], N[(y * b), $MachinePrecision], N[(x + z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1660000 \lor \neg \left(y \leq 4.1 \cdot 10^{+93}\right):\\
\;\;\;\;y \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + z\\
\end{array}
\end{array}
if y < -1.66e6 or 4.1000000000000001e93 < y Initial program 89.9%
Taylor expanded in y around inf 73.3%
Taylor expanded in b around inf 42.6%
*-commutative42.6%
Simplified42.6%
if -1.66e6 < y < 4.1000000000000001e93Initial program 98.6%
Taylor expanded in a around 0 75.2%
Taylor expanded in b around 0 47.4%
Taylor expanded in y around 0 40.2%
sub-neg40.2%
neg-mul-140.2%
remove-double-neg40.2%
Simplified40.2%
Final simplification41.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -3.5e-11) (not (<= b 2.6e+28))) (* y b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.5e-11) || !(b <= 2.6e+28)) {
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 ((b <= (-3.5d-11)) .or. (.not. (b <= 2.6d+28))) 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 ((b <= -3.5e-11) || !(b <= 2.6e+28)) {
tmp = y * b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -3.5e-11) or not (b <= 2.6e+28): tmp = y * b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3.5e-11) || !(b <= 2.6e+28)) 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 ((b <= -3.5e-11) || ~((b <= 2.6e+28))) tmp = y * b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3.5e-11], N[Not[LessEqual[b, 2.6e+28]], $MachinePrecision]], N[(y * b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.5 \cdot 10^{-11} \lor \neg \left(b \leq 2.6 \cdot 10^{+28}\right):\\
\;\;\;\;y \cdot b\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if b < -3.50000000000000019e-11 or 2.6000000000000002e28 < b Initial program 89.5%
Taylor expanded in y around inf 46.4%
Taylor expanded in b around inf 37.7%
*-commutative37.7%
Simplified37.7%
if -3.50000000000000019e-11 < b < 2.6000000000000002e28Initial program 99.3%
Taylor expanded in x around inf 27.7%
Final simplification32.2%
(FPCore (x y z t a b) :precision binary64 (if (or (<= b -6.2e+16) (not (<= b 1.6e+133))) (* t b) x))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -6.2e+16) || !(b <= 1.6e+133)) {
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 ((b <= (-6.2d+16)) .or. (.not. (b <= 1.6d+133))) 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 ((b <= -6.2e+16) || !(b <= 1.6e+133)) {
tmp = t * b;
} else {
tmp = x;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if (b <= -6.2e+16) or not (b <= 1.6e+133): tmp = t * b else: tmp = x return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -6.2e+16) || !(b <= 1.6e+133)) 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 ((b <= -6.2e+16) || ~((b <= 1.6e+133))) tmp = t * b; else tmp = x; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -6.2e+16], N[Not[LessEqual[b, 1.6e+133]], $MachinePrecision]], N[(t * b), $MachinePrecision], x]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;b \leq -6.2 \cdot 10^{+16} \lor \neg \left(b \leq 1.6 \cdot 10^{+133}\right):\\
\;\;\;\;t \cdot b\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\end{array}
if b < -6.2e16 or 1.59999999999999999e133 < b Initial program 89.2%
Taylor expanded in t around inf 37.1%
Taylor expanded in b around inf 31.6%
*-commutative31.6%
Simplified31.6%
if -6.2e16 < b < 1.59999999999999999e133Initial program 98.1%
Taylor expanded in x around inf 24.5%
Final simplification27.1%
(FPCore (x y z t a b) :precision binary64 (if (<= a -3.7e+49) a (if (<= a 4.3e+85) x a)))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -3.7e+49) {
tmp = a;
} else if (a <= 4.3e+85) {
tmp = x;
} else {
tmp = a;
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (a <= (-3.7d+49)) then
tmp = a
else if (a <= 4.3d+85) then
tmp = x
else
tmp = a
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (a <= -3.7e+49) {
tmp = a;
} else if (a <= 4.3e+85) {
tmp = x;
} else {
tmp = a;
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if a <= -3.7e+49: tmp = a elif a <= 4.3e+85: tmp = x else: tmp = a return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (a <= -3.7e+49) tmp = a; elseif (a <= 4.3e+85) tmp = x; else tmp = a; end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (a <= -3.7e+49) tmp = a; elseif (a <= 4.3e+85) tmp = x; else tmp = a; end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -3.7e+49], a, If[LessEqual[a, 4.3e+85], x, a]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.7 \cdot 10^{+49}:\\
\;\;\;\;a\\
\mathbf{elif}\;a \leq 4.3 \cdot 10^{+85}:\\
\;\;\;\;x\\
\mathbf{else}:\\
\;\;\;\;a\\
\end{array}
\end{array}
if a < -3.70000000000000018e49 or 4.2999999999999999e85 < a Initial program 91.7%
Taylor expanded in y around 0 91.7%
sub-neg91.7%
mul-1-neg91.7%
unsub-neg91.7%
*-commutative91.7%
sub-neg91.7%
metadata-eval91.7%
*-commutative91.7%
distribute-neg-in91.7%
mul-1-neg91.7%
remove-double-neg91.7%
distribute-lft-neg-in91.7%
+-commutative91.7%
distribute-neg-in91.7%
metadata-eval91.7%
sub-neg91.7%
*-commutative91.7%
Simplified91.7%
Taylor expanded in t around 0 62.8%
associate-+r+62.8%
+-commutative62.8%
sub-neg62.8%
metadata-eval62.8%
Simplified62.8%
Taylor expanded in a around inf 20.5%
if -3.70000000000000018e49 < a < 4.2999999999999999e85Initial program 96.8%
Taylor expanded in x around inf 23.8%
(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 y around 0 94.9%
sub-neg94.9%
mul-1-neg94.9%
unsub-neg94.9%
*-commutative94.9%
sub-neg94.9%
metadata-eval94.9%
*-commutative94.9%
distribute-neg-in94.9%
mul-1-neg94.9%
remove-double-neg94.9%
distribute-lft-neg-in94.9%
+-commutative94.9%
distribute-neg-in94.9%
metadata-eval94.9%
sub-neg94.9%
*-commutative94.9%
Simplified94.9%
Taylor expanded in t around 0 72.5%
associate-+r+72.5%
+-commutative72.5%
sub-neg72.5%
metadata-eval72.5%
Simplified72.5%
Taylor expanded in a around inf 9.6%
herbie shell --seed 2024185
(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)))