
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.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 * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 21 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.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 * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= t 4.5e-111) (- (+ (* x 2.0) (* b (* a 27.0))) (* y (* 9.0 (* t z)))) (fma a (* b 27.0) (fma x 2.0 (* t (* y (* z -9.0)))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 4.5e-111) {
tmp = ((x * 2.0) + (b * (a * 27.0))) - (y * (9.0 * (t * z)));
} else {
tmp = fma(a, (b * 27.0), fma(x, 2.0, (t * (y * (z * -9.0)))));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 4.5e-111) tmp = Float64(Float64(Float64(x * 2.0) + Float64(b * Float64(a * 27.0))) - Float64(y * Float64(9.0 * Float64(t * z)))); else tmp = fma(a, Float64(b * 27.0), fma(x, 2.0, Float64(t * Float64(y * Float64(z * -9.0))))); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 4.5e-111], N[(N[(N[(x * 2.0), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(9.0 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(b * 27.0), $MachinePrecision] + N[(x * 2.0 + N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 4.5 \cdot 10^{-111}:\\
\;\;\;\;\left(x \cdot 2 + b \cdot \left(a \cdot 27\right)\right) - y \cdot \left(9 \cdot \left(t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, b \cdot 27, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\right)\right)\\
\end{array}
\end{array}
if t < 4.49999999999999994e-111Initial program 93.2%
+-commutative93.2%
associate-+r-93.2%
*-commutative93.2%
cancel-sign-sub-inv93.2%
associate-*r*96.9%
distribute-lft-neg-in96.9%
*-commutative96.9%
cancel-sign-sub-inv96.9%
associate-+r-96.9%
associate-*l*96.4%
fma-define96.4%
cancel-sign-sub-inv96.4%
fma-define96.4%
distribute-lft-neg-in96.4%
distribute-rgt-neg-in96.4%
*-commutative96.4%
associate-*r*92.7%
associate-*l*92.7%
neg-mul-192.7%
associate-*r*92.7%
Simplified92.7%
fma-undefine92.7%
fma-undefine92.7%
associate-+r+92.7%
*-commutative92.7%
associate-*l*96.5%
*-commutative96.5%
associate-*r*96.5%
*-commutative96.5%
*-commutative96.5%
associate-*r*96.5%
associate-*l*96.5%
metadata-eval96.5%
distribute-lft-neg-in96.5%
*-commutative96.5%
distribute-rgt-neg-in96.5%
*-commutative96.5%
associate-+r+96.5%
sub-neg96.5%
Applied egg-rr97.1%
if 4.49999999999999994e-111 < t Initial program 96.3%
+-commutative96.3%
associate-+r-96.3%
*-commutative96.3%
cancel-sign-sub-inv96.3%
associate-*r*94.0%
distribute-lft-neg-in94.0%
*-commutative94.0%
cancel-sign-sub-inv94.0%
associate-+r-94.0%
associate-*l*94.0%
fma-define96.3%
cancel-sign-sub-inv96.3%
fma-define96.3%
distribute-lft-neg-in96.3%
distribute-rgt-neg-in96.3%
*-commutative96.3%
associate-*r*98.6%
associate-*l*98.5%
neg-mul-198.5%
associate-*r*98.5%
Simplified98.5%
Final simplification97.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= b -1.6e-67)
(* b (+ (* a 27.0) (* -9.0 (/ (* t (* y z)) b))))
(if (<= b 1.36e+20)
(+ (* x 2.0) (* t (* z (* y -9.0))))
(if (<= b 2.8e+243)
(+ (* -9.0 (* z (* t y))) (* b (* a 27.0)))
(+ (* x 2.0) (* 27.0 (* b a)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.6e-67) {
tmp = b * ((a * 27.0) + (-9.0 * ((t * (y * z)) / b)));
} else if (b <= 1.36e+20) {
tmp = (x * 2.0) + (t * (z * (y * -9.0)));
} else if (b <= 2.8e+243) {
tmp = (-9.0 * (z * (t * y))) + (b * (a * 27.0));
} else {
tmp = (x * 2.0) + (27.0 * (b * a));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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.6d-67)) then
tmp = b * ((a * 27.0d0) + ((-9.0d0) * ((t * (y * z)) / b)))
else if (b <= 1.36d+20) then
tmp = (x * 2.0d0) + (t * (z * (y * (-9.0d0))))
else if (b <= 2.8d+243) then
tmp = ((-9.0d0) * (z * (t * y))) + (b * (a * 27.0d0))
else
tmp = (x * 2.0d0) + (27.0d0 * (b * a))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -1.6e-67) {
tmp = b * ((a * 27.0) + (-9.0 * ((t * (y * z)) / b)));
} else if (b <= 1.36e+20) {
tmp = (x * 2.0) + (t * (z * (y * -9.0)));
} else if (b <= 2.8e+243) {
tmp = (-9.0 * (z * (t * y))) + (b * (a * 27.0));
} else {
tmp = (x * 2.0) + (27.0 * (b * a));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if b <= -1.6e-67: tmp = b * ((a * 27.0) + (-9.0 * ((t * (y * z)) / b))) elif b <= 1.36e+20: tmp = (x * 2.0) + (t * (z * (y * -9.0))) elif b <= 2.8e+243: tmp = (-9.0 * (z * (t * y))) + (b * (a * 27.0)) else: tmp = (x * 2.0) + (27.0 * (b * a)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -1.6e-67) tmp = Float64(b * Float64(Float64(a * 27.0) + Float64(-9.0 * Float64(Float64(t * Float64(y * z)) / b)))); elseif (b <= 1.36e+20) tmp = Float64(Float64(x * 2.0) + Float64(t * Float64(z * Float64(y * -9.0)))); elseif (b <= 2.8e+243) tmp = Float64(Float64(-9.0 * Float64(z * Float64(t * y))) + Float64(b * Float64(a * 27.0))); else tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(b * a))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (b <= -1.6e-67)
tmp = b * ((a * 27.0) + (-9.0 * ((t * (y * z)) / b)));
elseif (b <= 1.36e+20)
tmp = (x * 2.0) + (t * (z * (y * -9.0)));
elseif (b <= 2.8e+243)
tmp = (-9.0 * (z * (t * y))) + (b * (a * 27.0));
else
tmp = (x * 2.0) + (27.0 * (b * a));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -1.6e-67], N[(b * N[(N[(a * 27.0), $MachinePrecision] + N[(-9.0 * N[(N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.36e+20], N[(N[(x * 2.0), $MachinePrecision] + N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2.8e+243], N[(N[(-9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.6 \cdot 10^{-67}:\\
\;\;\;\;b \cdot \left(a \cdot 27 + -9 \cdot \frac{t \cdot \left(y \cdot z\right)}{b}\right)\\
\mathbf{elif}\;b \leq 1.36 \cdot 10^{+20}:\\
\;\;\;\;x \cdot 2 + t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\mathbf{elif}\;b \leq 2.8 \cdot 10^{+243}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right) + b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(b \cdot a\right)\\
\end{array}
\end{array}
if b < -1.60000000000000011e-67Initial program 95.2%
sub-neg95.2%
sub-neg95.2%
associate-*l*95.0%
associate-*l*95.1%
Simplified95.1%
Taylor expanded in x around 0 73.4%
Taylor expanded in b around inf 74.6%
if -1.60000000000000011e-67 < b < 1.36e20Initial program 96.0%
sub-neg96.0%
sub-neg96.0%
associate-*l*97.5%
associate-*l*97.5%
Simplified97.5%
Taylor expanded in a around 0 80.5%
cancel-sign-sub-inv80.5%
metadata-eval80.5%
associate-*r*82.8%
Applied egg-rr82.8%
Taylor expanded in t around 0 80.5%
*-commutative80.5%
associate-*r*80.5%
*-commutative80.5%
associate-*l*80.5%
*-commutative80.5%
Simplified80.5%
if 1.36e20 < b < 2.7999999999999999e243Initial program 86.0%
sub-neg86.0%
sub-neg86.0%
associate-*l*92.7%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in x around 0 69.9%
cancel-sign-sub-inv69.9%
associate-*r*70.0%
*-commutative70.0%
*-commutative70.0%
metadata-eval70.0%
associate-*r*72.5%
Applied egg-rr72.5%
if 2.7999999999999999e243 < b Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-+r-99.8%
associate-*l*87.8%
fma-define87.8%
cancel-sign-sub-inv87.8%
fma-define87.8%
distribute-lft-neg-in87.8%
distribute-rgt-neg-in87.8%
*-commutative87.8%
associate-*r*87.8%
associate-*l*87.8%
neg-mul-187.8%
associate-*r*87.8%
Simplified87.8%
Taylor expanded in t around 0 99.8%
Final simplification77.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 27.0 (* b a))))
(if (<= b -5.9e-105)
(- t_1 (* 9.0 (* t (* y z))))
(if (<= b 1.25e+20)
(+ (* x 2.0) (* t (* z (* y -9.0))))
(if (<= b 9.2e+243)
(+ (* -9.0 (* z (* t y))) (* b (* a 27.0)))
(+ (* x 2.0) t_1))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (b * a);
double tmp;
if (b <= -5.9e-105) {
tmp = t_1 - (9.0 * (t * (y * z)));
} else if (b <= 1.25e+20) {
tmp = (x * 2.0) + (t * (z * (y * -9.0)));
} else if (b <= 9.2e+243) {
tmp = (-9.0 * (z * (t * y))) + (b * (a * 27.0));
} else {
tmp = (x * 2.0) + t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = 27.0d0 * (b * a)
if (b <= (-5.9d-105)) then
tmp = t_1 - (9.0d0 * (t * (y * z)))
else if (b <= 1.25d+20) then
tmp = (x * 2.0d0) + (t * (z * (y * (-9.0d0))))
else if (b <= 9.2d+243) then
tmp = ((-9.0d0) * (z * (t * y))) + (b * (a * 27.0d0))
else
tmp = (x * 2.0d0) + t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (b * a);
double tmp;
if (b <= -5.9e-105) {
tmp = t_1 - (9.0 * (t * (y * z)));
} else if (b <= 1.25e+20) {
tmp = (x * 2.0) + (t * (z * (y * -9.0)));
} else if (b <= 9.2e+243) {
tmp = (-9.0 * (z * (t * y))) + (b * (a * 27.0));
} else {
tmp = (x * 2.0) + t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = 27.0 * (b * a) tmp = 0 if b <= -5.9e-105: tmp = t_1 - (9.0 * (t * (y * z))) elif b <= 1.25e+20: tmp = (x * 2.0) + (t * (z * (y * -9.0))) elif b <= 9.2e+243: tmp = (-9.0 * (z * (t * y))) + (b * (a * 27.0)) else: tmp = (x * 2.0) + t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(27.0 * Float64(b * a)) tmp = 0.0 if (b <= -5.9e-105) tmp = Float64(t_1 - Float64(9.0 * Float64(t * Float64(y * z)))); elseif (b <= 1.25e+20) tmp = Float64(Float64(x * 2.0) + Float64(t * Float64(z * Float64(y * -9.0)))); elseif (b <= 9.2e+243) tmp = Float64(Float64(-9.0 * Float64(z * Float64(t * y))) + Float64(b * Float64(a * 27.0))); else tmp = Float64(Float64(x * 2.0) + t_1); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = 27.0 * (b * a);
tmp = 0.0;
if (b <= -5.9e-105)
tmp = t_1 - (9.0 * (t * (y * z)));
elseif (b <= 1.25e+20)
tmp = (x * 2.0) + (t * (z * (y * -9.0)));
elseif (b <= 9.2e+243)
tmp = (-9.0 * (z * (t * y))) + (b * (a * 27.0));
else
tmp = (x * 2.0) + t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.9e-105], N[(t$95$1 - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.25e+20], N[(N[(x * 2.0), $MachinePrecision] + N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.2e+243], N[(N[(-9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + t$95$1), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(b \cdot a\right)\\
\mathbf{if}\;b \leq -5.9 \cdot 10^{-105}:\\
\;\;\;\;t\_1 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{elif}\;b \leq 1.25 \cdot 10^{+20}:\\
\;\;\;\;x \cdot 2 + t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\mathbf{elif}\;b \leq 9.2 \cdot 10^{+243}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(t \cdot y\right)\right) + b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + t\_1\\
\end{array}
\end{array}
if b < -5.8999999999999997e-105Initial program 94.6%
sub-neg94.6%
sub-neg94.6%
associate-*l*95.5%
associate-*l*95.5%
Simplified95.5%
Taylor expanded in x around 0 71.8%
if -5.8999999999999997e-105 < b < 1.25e20Initial program 96.6%
sub-neg96.6%
sub-neg96.6%
associate-*l*97.4%
associate-*l*97.4%
Simplified97.4%
Taylor expanded in a around 0 81.7%
cancel-sign-sub-inv81.7%
metadata-eval81.7%
associate-*r*83.3%
Applied egg-rr83.3%
Taylor expanded in t around 0 81.7%
*-commutative81.7%
associate-*r*81.7%
*-commutative81.7%
associate-*l*81.7%
*-commutative81.7%
Simplified81.7%
if 1.25e20 < b < 9.19999999999999947e243Initial program 86.0%
sub-neg86.0%
sub-neg86.0%
associate-*l*92.7%
associate-*l*92.7%
Simplified92.7%
Taylor expanded in x around 0 69.9%
cancel-sign-sub-inv69.9%
associate-*r*70.0%
*-commutative70.0%
*-commutative70.0%
metadata-eval70.0%
associate-*r*72.5%
Applied egg-rr72.5%
if 9.19999999999999947e243 < b Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-+r-99.8%
associate-*l*87.8%
fma-define87.8%
cancel-sign-sub-inv87.8%
fma-define87.8%
distribute-lft-neg-in87.8%
distribute-rgt-neg-in87.8%
*-commutative87.8%
associate-*r*87.8%
associate-*l*87.8%
neg-mul-187.8%
associate-*r*87.8%
Simplified87.8%
Taylor expanded in t around 0 99.8%
Final simplification77.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (* -9.0 (* z (* t y))) (* b (* a 27.0)))))
(if (<= b -5.1e-104)
t_1
(if (<= b 4.6e+20)
(+ (* x 2.0) (* t (* z (* y -9.0))))
(if (<= b 4.8e+244) t_1 (+ (* x 2.0) (* 27.0 (* b a))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (-9.0 * (z * (t * y))) + (b * (a * 27.0));
double tmp;
if (b <= -5.1e-104) {
tmp = t_1;
} else if (b <= 4.6e+20) {
tmp = (x * 2.0) + (t * (z * (y * -9.0)));
} else if (b <= 4.8e+244) {
tmp = t_1;
} else {
tmp = (x * 2.0) + (27.0 * (b * a));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = ((-9.0d0) * (z * (t * y))) + (b * (a * 27.0d0))
if (b <= (-5.1d-104)) then
tmp = t_1
else if (b <= 4.6d+20) then
tmp = (x * 2.0d0) + (t * (z * (y * (-9.0d0))))
else if (b <= 4.8d+244) then
tmp = t_1
else
tmp = (x * 2.0d0) + (27.0d0 * (b * a))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (-9.0 * (z * (t * y))) + (b * (a * 27.0));
double tmp;
if (b <= -5.1e-104) {
tmp = t_1;
} else if (b <= 4.6e+20) {
tmp = (x * 2.0) + (t * (z * (y * -9.0)));
} else if (b <= 4.8e+244) {
tmp = t_1;
} else {
tmp = (x * 2.0) + (27.0 * (b * a));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (-9.0 * (z * (t * y))) + (b * (a * 27.0)) tmp = 0 if b <= -5.1e-104: tmp = t_1 elif b <= 4.6e+20: tmp = (x * 2.0) + (t * (z * (y * -9.0))) elif b <= 4.8e+244: tmp = t_1 else: tmp = (x * 2.0) + (27.0 * (b * a)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(-9.0 * Float64(z * Float64(t * y))) + Float64(b * Float64(a * 27.0))) tmp = 0.0 if (b <= -5.1e-104) tmp = t_1; elseif (b <= 4.6e+20) tmp = Float64(Float64(x * 2.0) + Float64(t * Float64(z * Float64(y * -9.0)))); elseif (b <= 4.8e+244) tmp = t_1; else tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(b * a))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (-9.0 * (z * (t * y))) + (b * (a * 27.0));
tmp = 0.0;
if (b <= -5.1e-104)
tmp = t_1;
elseif (b <= 4.6e+20)
tmp = (x * 2.0) + (t * (z * (y * -9.0)));
elseif (b <= 4.8e+244)
tmp = t_1;
else
tmp = (x * 2.0) + (27.0 * (b * a));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(-9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -5.1e-104], t$95$1, If[LessEqual[b, 4.6e+20], N[(N[(x * 2.0), $MachinePrecision] + N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.8e+244], t$95$1, N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := -9 \cdot \left(z \cdot \left(t \cdot y\right)\right) + b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;b \leq -5.1 \cdot 10^{-104}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;b \leq 4.6 \cdot 10^{+20}:\\
\;\;\;\;x \cdot 2 + t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\mathbf{elif}\;b \leq 4.8 \cdot 10^{+244}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(b \cdot a\right)\\
\end{array}
\end{array}
if b < -5.09999999999999992e-104 or 4.6e20 < b < 4.79999999999999975e244Initial program 91.9%
sub-neg91.9%
sub-neg91.9%
associate-*l*94.6%
associate-*l*94.6%
Simplified94.6%
Taylor expanded in x around 0 71.2%
cancel-sign-sub-inv71.2%
associate-*r*71.3%
*-commutative71.3%
*-commutative71.3%
metadata-eval71.3%
associate-*r*73.0%
Applied egg-rr73.0%
if -5.09999999999999992e-104 < b < 4.6e20Initial program 96.6%
sub-neg96.6%
sub-neg96.6%
associate-*l*97.4%
associate-*l*97.4%
Simplified97.4%
Taylor expanded in a around 0 81.7%
cancel-sign-sub-inv81.7%
metadata-eval81.7%
associate-*r*83.3%
Applied egg-rr83.3%
Taylor expanded in t around 0 81.7%
*-commutative81.7%
associate-*r*81.7%
*-commutative81.7%
associate-*l*81.7%
*-commutative81.7%
Simplified81.7%
if 4.79999999999999975e244 < b Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-+r-99.8%
associate-*l*87.8%
fma-define87.8%
cancel-sign-sub-inv87.8%
fma-define87.8%
distribute-lft-neg-in87.8%
distribute-rgt-neg-in87.8%
*-commutative87.8%
associate-*r*87.8%
associate-*l*87.8%
neg-mul-187.8%
associate-*r*87.8%
Simplified87.8%
Taylor expanded in t around 0 99.8%
Final simplification77.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.2e-129)
(* y (* z (* t -9.0)))
(if (<= z 2.6e-151)
(* b (* a 27.0))
(if (<= z 2.5e-81)
(* x 2.0)
(if (<= z 1.8e-21) (* a (* b 27.0)) (* (* y z) (* t -9.0)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.2e-129) {
tmp = y * (z * (t * -9.0));
} else if (z <= 2.6e-151) {
tmp = b * (a * 27.0);
} else if (z <= 2.5e-81) {
tmp = x * 2.0;
} else if (z <= 1.8e-21) {
tmp = a * (b * 27.0);
} else {
tmp = (y * z) * (t * -9.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (z <= (-1.2d-129)) then
tmp = y * (z * (t * (-9.0d0)))
else if (z <= 2.6d-151) then
tmp = b * (a * 27.0d0)
else if (z <= 2.5d-81) then
tmp = x * 2.0d0
else if (z <= 1.8d-21) then
tmp = a * (b * 27.0d0)
else
tmp = (y * z) * (t * (-9.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.2e-129) {
tmp = y * (z * (t * -9.0));
} else if (z <= 2.6e-151) {
tmp = b * (a * 27.0);
} else if (z <= 2.5e-81) {
tmp = x * 2.0;
} else if (z <= 1.8e-21) {
tmp = a * (b * 27.0);
} else {
tmp = (y * z) * (t * -9.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1.2e-129: tmp = y * (z * (t * -9.0)) elif z <= 2.6e-151: tmp = b * (a * 27.0) elif z <= 2.5e-81: tmp = x * 2.0 elif z <= 1.8e-21: tmp = a * (b * 27.0) else: tmp = (y * z) * (t * -9.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.2e-129) tmp = Float64(y * Float64(z * Float64(t * -9.0))); elseif (z <= 2.6e-151) tmp = Float64(b * Float64(a * 27.0)); elseif (z <= 2.5e-81) tmp = Float64(x * 2.0); elseif (z <= 1.8e-21) tmp = Float64(a * Float64(b * 27.0)); else tmp = Float64(Float64(y * z) * Float64(t * -9.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -1.2e-129)
tmp = y * (z * (t * -9.0));
elseif (z <= 2.6e-151)
tmp = b * (a * 27.0);
elseif (z <= 2.5e-81)
tmp = x * 2.0;
elseif (z <= 1.8e-21)
tmp = a * (b * 27.0);
else
tmp = (y * z) * (t * -9.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.2e-129], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.6e-151], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.5e-81], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 1.8e-21], N[(a * N[(b * 27.0), $MachinePrecision]), $MachinePrecision], N[(N[(y * z), $MachinePrecision] * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{-129}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 2.6 \cdot 10^{-151}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;z \leq 2.5 \cdot 10^{-81}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 1.8 \cdot 10^{-21}:\\
\;\;\;\;a \cdot \left(b \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot z\right) \cdot \left(t \cdot -9\right)\\
\end{array}
\end{array}
if z < -1.19999999999999994e-129Initial program 90.1%
sub-neg90.1%
sub-neg90.1%
associate-*l*92.8%
associate-*l*92.8%
Simplified92.8%
Taylor expanded in a around 0 71.7%
Taylor expanded in x around 0 47.1%
associate-*r*47.1%
metadata-eval47.1%
distribute-lft-neg-in47.1%
distribute-lft-neg-in47.1%
*-commutative47.1%
associate-*l*51.1%
distribute-rgt-neg-in51.1%
*-commutative51.1%
associate-*r*51.2%
distribute-lft-neg-in51.2%
metadata-eval51.2%
Simplified51.2%
pow151.2%
associate-*r*51.1%
Applied egg-rr51.1%
unpow151.1%
*-commutative51.1%
Simplified51.1%
if -1.19999999999999994e-129 < z < 2.6e-151Initial program 99.7%
+-commutative99.7%
associate-+r-99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-*r*92.4%
distribute-lft-neg-in92.4%
*-commutative92.4%
cancel-sign-sub-inv92.4%
associate-+r-92.4%
associate-*l*91.0%
fma-define91.0%
cancel-sign-sub-inv91.0%
fma-define91.0%
distribute-lft-neg-in91.0%
distribute-rgt-neg-in91.0%
*-commutative91.0%
associate-*r*98.4%
associate-*l*98.3%
neg-mul-198.3%
associate-*r*98.3%
Simplified98.3%
Taylor expanded in t around 0 87.5%
Taylor expanded in x around 0 47.3%
associate-*r*47.3%
*-commutative47.3%
Simplified47.3%
if 2.6e-151 < z < 2.4999999999999999e-81Initial program 100.0%
+-commutative100.0%
associate-+r-100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
associate-*r*99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
associate-+r-99.9%
associate-*l*99.6%
fma-define99.7%
cancel-sign-sub-inv99.7%
fma-define99.7%
distribute-lft-neg-in99.7%
distribute-rgt-neg-in99.7%
*-commutative99.7%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
fma-undefine99.7%
fma-undefine99.7%
associate-+r+99.7%
*-commutative99.7%
associate-*l*99.7%
*-commutative99.7%
associate-*r*99.6%
*-commutative99.6%
*-commutative99.6%
associate-*r*99.6%
associate-*l*99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
*-commutative99.6%
associate-+r+99.6%
sub-neg99.6%
Applied egg-rr99.9%
Taylor expanded in x around inf 55.6%
if 2.4999999999999999e-81 < z < 1.79999999999999995e-21Initial program 88.2%
+-commutative88.2%
associate-+r-88.2%
*-commutative88.2%
cancel-sign-sub-inv88.2%
associate-*r*99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-+r-99.8%
associate-*l*99.8%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*88.2%
associate-*l*88.2%
neg-mul-188.2%
associate-*r*88.2%
Simplified88.2%
Taylor expanded in t around 0 88.4%
Taylor expanded in x around 0 63.9%
associate-*r*63.7%
*-commutative63.7%
Simplified63.7%
Taylor expanded in b around 0 63.9%
*-commutative63.9%
associate-*r*63.7%
*-commutative63.7%
Simplified63.7%
if 1.79999999999999995e-21 < z Initial program 94.1%
sub-neg94.1%
sub-neg94.1%
associate-*l*95.6%
associate-*l*95.6%
Simplified95.6%
Taylor expanded in a around 0 73.5%
Taylor expanded in x around 0 53.9%
associate-*r*54.0%
Simplified54.0%
Final simplification51.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= z -4.5e-129)
(* y (* z (* t -9.0)))
(if (<= z 2.4e-151)
(* b (* a 27.0))
(if (<= z 2.2e-80)
(* x 2.0)
(if (<= z 3.1e-21) (* a (* b 27.0)) (* t (* -9.0 (* y z))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.5e-129) {
tmp = y * (z * (t * -9.0));
} else if (z <= 2.4e-151) {
tmp = b * (a * 27.0);
} else if (z <= 2.2e-80) {
tmp = x * 2.0;
} else if (z <= 3.1e-21) {
tmp = a * (b * 27.0);
} else {
tmp = t * (-9.0 * (y * z));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (z <= (-4.5d-129)) then
tmp = y * (z * (t * (-9.0d0)))
else if (z <= 2.4d-151) then
tmp = b * (a * 27.0d0)
else if (z <= 2.2d-80) then
tmp = x * 2.0d0
else if (z <= 3.1d-21) then
tmp = a * (b * 27.0d0)
else
tmp = t * ((-9.0d0) * (y * z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.5e-129) {
tmp = y * (z * (t * -9.0));
} else if (z <= 2.4e-151) {
tmp = b * (a * 27.0);
} else if (z <= 2.2e-80) {
tmp = x * 2.0;
} else if (z <= 3.1e-21) {
tmp = a * (b * 27.0);
} else {
tmp = t * (-9.0 * (y * z));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -4.5e-129: tmp = y * (z * (t * -9.0)) elif z <= 2.4e-151: tmp = b * (a * 27.0) elif z <= 2.2e-80: tmp = x * 2.0 elif z <= 3.1e-21: tmp = a * (b * 27.0) else: tmp = t * (-9.0 * (y * z)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.5e-129) tmp = Float64(y * Float64(z * Float64(t * -9.0))); elseif (z <= 2.4e-151) tmp = Float64(b * Float64(a * 27.0)); elseif (z <= 2.2e-80) tmp = Float64(x * 2.0); elseif (z <= 3.1e-21) tmp = Float64(a * Float64(b * 27.0)); else tmp = Float64(t * Float64(-9.0 * Float64(y * z))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -4.5e-129)
tmp = y * (z * (t * -9.0));
elseif (z <= 2.4e-151)
tmp = b * (a * 27.0);
elseif (z <= 2.2e-80)
tmp = x * 2.0;
elseif (z <= 3.1e-21)
tmp = a * (b * 27.0);
else
tmp = t * (-9.0 * (y * z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.5e-129], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e-151], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e-80], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 3.1e-21], N[(a * N[(b * 27.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{-129}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-151}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-80}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 3.1 \cdot 10^{-21}:\\
\;\;\;\;a \cdot \left(b \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -4.50000000000000031e-129Initial program 90.1%
sub-neg90.1%
sub-neg90.1%
associate-*l*92.8%
associate-*l*92.8%
Simplified92.8%
Taylor expanded in a around 0 71.7%
Taylor expanded in x around 0 47.1%
associate-*r*47.1%
metadata-eval47.1%
distribute-lft-neg-in47.1%
distribute-lft-neg-in47.1%
*-commutative47.1%
associate-*l*51.1%
distribute-rgt-neg-in51.1%
*-commutative51.1%
associate-*r*51.2%
distribute-lft-neg-in51.2%
metadata-eval51.2%
Simplified51.2%
pow151.2%
associate-*r*51.1%
Applied egg-rr51.1%
unpow151.1%
*-commutative51.1%
Simplified51.1%
if -4.50000000000000031e-129 < z < 2.4e-151Initial program 99.7%
+-commutative99.7%
associate-+r-99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-*r*92.4%
distribute-lft-neg-in92.4%
*-commutative92.4%
cancel-sign-sub-inv92.4%
associate-+r-92.4%
associate-*l*91.0%
fma-define91.0%
cancel-sign-sub-inv91.0%
fma-define91.0%
distribute-lft-neg-in91.0%
distribute-rgt-neg-in91.0%
*-commutative91.0%
associate-*r*98.4%
associate-*l*98.3%
neg-mul-198.3%
associate-*r*98.3%
Simplified98.3%
Taylor expanded in t around 0 87.5%
Taylor expanded in x around 0 47.3%
associate-*r*47.3%
*-commutative47.3%
Simplified47.3%
if 2.4e-151 < z < 2.2000000000000001e-80Initial program 100.0%
+-commutative100.0%
associate-+r-100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
associate-*r*99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
associate-+r-99.9%
associate-*l*99.6%
fma-define99.7%
cancel-sign-sub-inv99.7%
fma-define99.7%
distribute-lft-neg-in99.7%
distribute-rgt-neg-in99.7%
*-commutative99.7%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
fma-undefine99.7%
fma-undefine99.7%
associate-+r+99.7%
*-commutative99.7%
associate-*l*99.7%
*-commutative99.7%
associate-*r*99.6%
*-commutative99.6%
*-commutative99.6%
associate-*r*99.6%
associate-*l*99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
*-commutative99.6%
associate-+r+99.6%
sub-neg99.6%
Applied egg-rr99.9%
Taylor expanded in x around inf 55.6%
if 2.2000000000000001e-80 < z < 3.0999999999999998e-21Initial program 88.2%
+-commutative88.2%
associate-+r-88.2%
*-commutative88.2%
cancel-sign-sub-inv88.2%
associate-*r*99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-+r-99.8%
associate-*l*99.8%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*88.2%
associate-*l*88.2%
neg-mul-188.2%
associate-*r*88.2%
Simplified88.2%
Taylor expanded in t around 0 88.4%
Taylor expanded in x around 0 63.9%
associate-*r*63.7%
*-commutative63.7%
Simplified63.7%
Taylor expanded in b around 0 63.9%
*-commutative63.9%
associate-*r*63.7%
*-commutative63.7%
Simplified63.7%
if 3.0999999999999998e-21 < z Initial program 94.1%
+-commutative94.1%
associate-+r-94.1%
*-commutative94.1%
cancel-sign-sub-inv94.1%
associate-*r*98.3%
distribute-lft-neg-in98.3%
*-commutative98.3%
cancel-sign-sub-inv98.3%
associate-+r-98.3%
associate-*l*98.3%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*95.6%
associate-*l*95.6%
neg-mul-195.6%
associate-*r*95.6%
Simplified95.6%
Taylor expanded in t around inf 53.9%
*-commutative53.9%
associate-*r*53.9%
*-commutative53.9%
associate-*l*53.9%
Simplified53.9%
Taylor expanded in z around 0 53.9%
Final simplification51.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.15e-128)
(* y (* (* t z) -9.0))
(if (<= z 2.4e-151)
(* b (* a 27.0))
(if (<= z 7.6e-81)
(* x 2.0)
(if (<= z 1.45e-21) (* a (* b 27.0)) (* t (* -9.0 (* y z))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.15e-128) {
tmp = y * ((t * z) * -9.0);
} else if (z <= 2.4e-151) {
tmp = b * (a * 27.0);
} else if (z <= 7.6e-81) {
tmp = x * 2.0;
} else if (z <= 1.45e-21) {
tmp = a * (b * 27.0);
} else {
tmp = t * (-9.0 * (y * z));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (z <= (-2.15d-128)) then
tmp = y * ((t * z) * (-9.0d0))
else if (z <= 2.4d-151) then
tmp = b * (a * 27.0d0)
else if (z <= 7.6d-81) then
tmp = x * 2.0d0
else if (z <= 1.45d-21) then
tmp = a * (b * 27.0d0)
else
tmp = t * ((-9.0d0) * (y * z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.15e-128) {
tmp = y * ((t * z) * -9.0);
} else if (z <= 2.4e-151) {
tmp = b * (a * 27.0);
} else if (z <= 7.6e-81) {
tmp = x * 2.0;
} else if (z <= 1.45e-21) {
tmp = a * (b * 27.0);
} else {
tmp = t * (-9.0 * (y * z));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -2.15e-128: tmp = y * ((t * z) * -9.0) elif z <= 2.4e-151: tmp = b * (a * 27.0) elif z <= 7.6e-81: tmp = x * 2.0 elif z <= 1.45e-21: tmp = a * (b * 27.0) else: tmp = t * (-9.0 * (y * z)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.15e-128) tmp = Float64(y * Float64(Float64(t * z) * -9.0)); elseif (z <= 2.4e-151) tmp = Float64(b * Float64(a * 27.0)); elseif (z <= 7.6e-81) tmp = Float64(x * 2.0); elseif (z <= 1.45e-21) tmp = Float64(a * Float64(b * 27.0)); else tmp = Float64(t * Float64(-9.0 * Float64(y * z))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -2.15e-128)
tmp = y * ((t * z) * -9.0);
elseif (z <= 2.4e-151)
tmp = b * (a * 27.0);
elseif (z <= 7.6e-81)
tmp = x * 2.0;
elseif (z <= 1.45e-21)
tmp = a * (b * 27.0);
else
tmp = t * (-9.0 * (y * z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.15e-128], N[(y * N[(N[(t * z), $MachinePrecision] * -9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.4e-151], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.6e-81], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 1.45e-21], N[(a * N[(b * 27.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.15 \cdot 10^{-128}:\\
\;\;\;\;y \cdot \left(\left(t \cdot z\right) \cdot -9\right)\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-151}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;z \leq 7.6 \cdot 10^{-81}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-21}:\\
\;\;\;\;a \cdot \left(b \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -2.14999999999999997e-128Initial program 90.1%
sub-neg90.1%
sub-neg90.1%
associate-*l*92.8%
associate-*l*92.8%
Simplified92.8%
Taylor expanded in a around 0 71.7%
Taylor expanded in x around 0 47.1%
associate-*r*47.1%
metadata-eval47.1%
distribute-lft-neg-in47.1%
distribute-lft-neg-in47.1%
*-commutative47.1%
associate-*l*51.1%
distribute-rgt-neg-in51.1%
*-commutative51.1%
associate-*r*51.2%
distribute-lft-neg-in51.2%
metadata-eval51.2%
Simplified51.2%
if -2.14999999999999997e-128 < z < 2.4e-151Initial program 99.7%
+-commutative99.7%
associate-+r-99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-*r*92.4%
distribute-lft-neg-in92.4%
*-commutative92.4%
cancel-sign-sub-inv92.4%
associate-+r-92.4%
associate-*l*91.0%
fma-define91.0%
cancel-sign-sub-inv91.0%
fma-define91.0%
distribute-lft-neg-in91.0%
distribute-rgt-neg-in91.0%
*-commutative91.0%
associate-*r*98.4%
associate-*l*98.3%
neg-mul-198.3%
associate-*r*98.3%
Simplified98.3%
Taylor expanded in t around 0 87.5%
Taylor expanded in x around 0 47.3%
associate-*r*47.3%
*-commutative47.3%
Simplified47.3%
if 2.4e-151 < z < 7.5999999999999997e-81Initial program 100.0%
+-commutative100.0%
associate-+r-100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
associate-*r*99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
associate-+r-99.9%
associate-*l*99.6%
fma-define99.7%
cancel-sign-sub-inv99.7%
fma-define99.7%
distribute-lft-neg-in99.7%
distribute-rgt-neg-in99.7%
*-commutative99.7%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
fma-undefine99.7%
fma-undefine99.7%
associate-+r+99.7%
*-commutative99.7%
associate-*l*99.7%
*-commutative99.7%
associate-*r*99.6%
*-commutative99.6%
*-commutative99.6%
associate-*r*99.6%
associate-*l*99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
*-commutative99.6%
associate-+r+99.6%
sub-neg99.6%
Applied egg-rr99.9%
Taylor expanded in x around inf 55.6%
if 7.5999999999999997e-81 < z < 1.45e-21Initial program 88.2%
+-commutative88.2%
associate-+r-88.2%
*-commutative88.2%
cancel-sign-sub-inv88.2%
associate-*r*99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-+r-99.8%
associate-*l*99.8%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*88.2%
associate-*l*88.2%
neg-mul-188.2%
associate-*r*88.2%
Simplified88.2%
Taylor expanded in t around 0 88.4%
Taylor expanded in x around 0 63.9%
associate-*r*63.7%
*-commutative63.7%
Simplified63.7%
Taylor expanded in b around 0 63.9%
*-commutative63.9%
associate-*r*63.7%
*-commutative63.7%
Simplified63.7%
if 1.45e-21 < z Initial program 94.1%
+-commutative94.1%
associate-+r-94.1%
*-commutative94.1%
cancel-sign-sub-inv94.1%
associate-*r*98.3%
distribute-lft-neg-in98.3%
*-commutative98.3%
cancel-sign-sub-inv98.3%
associate-+r-98.3%
associate-*l*98.3%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*95.6%
associate-*l*95.6%
neg-mul-195.6%
associate-*r*95.6%
Simplified95.6%
Taylor expanded in t around inf 53.9%
*-commutative53.9%
associate-*r*53.9%
*-commutative53.9%
associate-*l*53.9%
Simplified53.9%
Taylor expanded in z around 0 53.9%
Final simplification51.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.45e-128)
(* t (* z (* y -9.0)))
(if (<= z 3e-151)
(* b (* a 27.0))
(if (<= z 4.2e-79)
(* x 2.0)
(if (<= z 3.3e-20) (* a (* b 27.0)) (* t (* -9.0 (* y z))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.45e-128) {
tmp = t * (z * (y * -9.0));
} else if (z <= 3e-151) {
tmp = b * (a * 27.0);
} else if (z <= 4.2e-79) {
tmp = x * 2.0;
} else if (z <= 3.3e-20) {
tmp = a * (b * 27.0);
} else {
tmp = t * (-9.0 * (y * z));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (z <= (-1.45d-128)) then
tmp = t * (z * (y * (-9.0d0)))
else if (z <= 3d-151) then
tmp = b * (a * 27.0d0)
else if (z <= 4.2d-79) then
tmp = x * 2.0d0
else if (z <= 3.3d-20) then
tmp = a * (b * 27.0d0)
else
tmp = t * ((-9.0d0) * (y * z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.45e-128) {
tmp = t * (z * (y * -9.0));
} else if (z <= 3e-151) {
tmp = b * (a * 27.0);
} else if (z <= 4.2e-79) {
tmp = x * 2.0;
} else if (z <= 3.3e-20) {
tmp = a * (b * 27.0);
} else {
tmp = t * (-9.0 * (y * z));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1.45e-128: tmp = t * (z * (y * -9.0)) elif z <= 3e-151: tmp = b * (a * 27.0) elif z <= 4.2e-79: tmp = x * 2.0 elif z <= 3.3e-20: tmp = a * (b * 27.0) else: tmp = t * (-9.0 * (y * z)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.45e-128) tmp = Float64(t * Float64(z * Float64(y * -9.0))); elseif (z <= 3e-151) tmp = Float64(b * Float64(a * 27.0)); elseif (z <= 4.2e-79) tmp = Float64(x * 2.0); elseif (z <= 3.3e-20) tmp = Float64(a * Float64(b * 27.0)); else tmp = Float64(t * Float64(-9.0 * Float64(y * z))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -1.45e-128)
tmp = t * (z * (y * -9.0));
elseif (z <= 3e-151)
tmp = b * (a * 27.0);
elseif (z <= 4.2e-79)
tmp = x * 2.0;
elseif (z <= 3.3e-20)
tmp = a * (b * 27.0);
else
tmp = t * (-9.0 * (y * z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.45e-128], N[(t * N[(z * N[(y * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3e-151], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-79], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 3.3e-20], N[(a * N[(b * 27.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.45 \cdot 10^{-128}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 3 \cdot 10^{-151}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-79}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-20}:\\
\;\;\;\;a \cdot \left(b \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -1.45e-128Initial program 90.1%
+-commutative90.1%
associate-+r-90.1%
*-commutative90.1%
cancel-sign-sub-inv90.1%
associate-*r*95.8%
distribute-lft-neg-in95.8%
*-commutative95.8%
cancel-sign-sub-inv95.8%
associate-+r-95.8%
associate-*l*95.7%
fma-define96.8%
cancel-sign-sub-inv96.8%
fma-define96.8%
distribute-lft-neg-in96.8%
distribute-rgt-neg-in96.8%
*-commutative96.8%
associate-*r*91.1%
associate-*l*91.1%
neg-mul-191.1%
associate-*r*91.1%
Simplified91.1%
Taylor expanded in t around inf 47.1%
*-commutative47.1%
associate-*r*47.0%
*-commutative47.0%
associate-*l*47.1%
Simplified47.1%
if -1.45e-128 < z < 3e-151Initial program 99.7%
+-commutative99.7%
associate-+r-99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-*r*92.4%
distribute-lft-neg-in92.4%
*-commutative92.4%
cancel-sign-sub-inv92.4%
associate-+r-92.4%
associate-*l*91.0%
fma-define91.0%
cancel-sign-sub-inv91.0%
fma-define91.0%
distribute-lft-neg-in91.0%
distribute-rgt-neg-in91.0%
*-commutative91.0%
associate-*r*98.4%
associate-*l*98.3%
neg-mul-198.3%
associate-*r*98.3%
Simplified98.3%
Taylor expanded in t around 0 87.5%
Taylor expanded in x around 0 47.3%
associate-*r*47.3%
*-commutative47.3%
Simplified47.3%
if 3e-151 < z < 4.1999999999999999e-79Initial program 100.0%
+-commutative100.0%
associate-+r-100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
associate-*r*99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
associate-+r-99.9%
associate-*l*99.6%
fma-define99.7%
cancel-sign-sub-inv99.7%
fma-define99.7%
distribute-lft-neg-in99.7%
distribute-rgt-neg-in99.7%
*-commutative99.7%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
fma-undefine99.7%
fma-undefine99.7%
associate-+r+99.7%
*-commutative99.7%
associate-*l*99.7%
*-commutative99.7%
associate-*r*99.6%
*-commutative99.6%
*-commutative99.6%
associate-*r*99.6%
associate-*l*99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
*-commutative99.6%
associate-+r+99.6%
sub-neg99.6%
Applied egg-rr99.9%
Taylor expanded in x around inf 55.6%
if 4.1999999999999999e-79 < z < 3.3e-20Initial program 88.2%
+-commutative88.2%
associate-+r-88.2%
*-commutative88.2%
cancel-sign-sub-inv88.2%
associate-*r*99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-+r-99.8%
associate-*l*99.8%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*88.2%
associate-*l*88.2%
neg-mul-188.2%
associate-*r*88.2%
Simplified88.2%
Taylor expanded in t around 0 88.4%
Taylor expanded in x around 0 63.9%
associate-*r*63.7%
*-commutative63.7%
Simplified63.7%
Taylor expanded in b around 0 63.9%
*-commutative63.9%
associate-*r*63.7%
*-commutative63.7%
Simplified63.7%
if 3.3e-20 < z Initial program 94.1%
+-commutative94.1%
associate-+r-94.1%
*-commutative94.1%
cancel-sign-sub-inv94.1%
associate-*r*98.3%
distribute-lft-neg-in98.3%
*-commutative98.3%
cancel-sign-sub-inv98.3%
associate-+r-98.3%
associate-*l*98.3%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*95.6%
associate-*l*95.6%
neg-mul-195.6%
associate-*r*95.6%
Simplified95.6%
Taylor expanded in t around inf 53.9%
*-commutative53.9%
associate-*r*53.9%
*-commutative53.9%
associate-*l*53.9%
Simplified53.9%
Taylor expanded in z around 0 53.9%
Final simplification50.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= z -1.8e-128)
(* -9.0 (* t (* y z)))
(if (<= z 2.8e-151)
(* b (* a 27.0))
(if (<= z 8.2e-81)
(* x 2.0)
(if (<= z 1.6e-21) (* a (* b 27.0)) (* t (* -9.0 (* y z))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.8e-128) {
tmp = -9.0 * (t * (y * z));
} else if (z <= 2.8e-151) {
tmp = b * (a * 27.0);
} else if (z <= 8.2e-81) {
tmp = x * 2.0;
} else if (z <= 1.6e-21) {
tmp = a * (b * 27.0);
} else {
tmp = t * (-9.0 * (y * z));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (z <= (-1.8d-128)) then
tmp = (-9.0d0) * (t * (y * z))
else if (z <= 2.8d-151) then
tmp = b * (a * 27.0d0)
else if (z <= 8.2d-81) then
tmp = x * 2.0d0
else if (z <= 1.6d-21) then
tmp = a * (b * 27.0d0)
else
tmp = t * ((-9.0d0) * (y * z))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.8e-128) {
tmp = -9.0 * (t * (y * z));
} else if (z <= 2.8e-151) {
tmp = b * (a * 27.0);
} else if (z <= 8.2e-81) {
tmp = x * 2.0;
} else if (z <= 1.6e-21) {
tmp = a * (b * 27.0);
} else {
tmp = t * (-9.0 * (y * z));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1.8e-128: tmp = -9.0 * (t * (y * z)) elif z <= 2.8e-151: tmp = b * (a * 27.0) elif z <= 8.2e-81: tmp = x * 2.0 elif z <= 1.6e-21: tmp = a * (b * 27.0) else: tmp = t * (-9.0 * (y * z)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.8e-128) tmp = Float64(-9.0 * Float64(t * Float64(y * z))); elseif (z <= 2.8e-151) tmp = Float64(b * Float64(a * 27.0)); elseif (z <= 8.2e-81) tmp = Float64(x * 2.0); elseif (z <= 1.6e-21) tmp = Float64(a * Float64(b * 27.0)); else tmp = Float64(t * Float64(-9.0 * Float64(y * z))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -1.8e-128)
tmp = -9.0 * (t * (y * z));
elseif (z <= 2.8e-151)
tmp = b * (a * 27.0);
elseif (z <= 8.2e-81)
tmp = x * 2.0;
elseif (z <= 1.6e-21)
tmp = a * (b * 27.0);
else
tmp = t * (-9.0 * (y * z));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.8e-128], N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.8e-151], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.2e-81], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 1.6e-21], N[(a * N[(b * 27.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(-9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.8 \cdot 10^{-128}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{elif}\;z \leq 2.8 \cdot 10^{-151}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-81}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{-21}:\\
\;\;\;\;a \cdot \left(b \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(-9 \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -1.80000000000000012e-128Initial program 90.1%
+-commutative90.1%
associate-+r-90.1%
*-commutative90.1%
cancel-sign-sub-inv90.1%
associate-*r*95.8%
distribute-lft-neg-in95.8%
*-commutative95.8%
cancel-sign-sub-inv95.8%
associate-+r-95.8%
associate-*l*95.7%
fma-define96.8%
cancel-sign-sub-inv96.8%
fma-define96.8%
distribute-lft-neg-in96.8%
distribute-rgt-neg-in96.8%
*-commutative96.8%
associate-*r*91.1%
associate-*l*91.1%
neg-mul-191.1%
associate-*r*91.1%
Simplified91.1%
Taylor expanded in t around inf 47.1%
if -1.80000000000000012e-128 < z < 2.8000000000000001e-151Initial program 99.7%
+-commutative99.7%
associate-+r-99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-*r*92.4%
distribute-lft-neg-in92.4%
*-commutative92.4%
cancel-sign-sub-inv92.4%
associate-+r-92.4%
associate-*l*91.0%
fma-define91.0%
cancel-sign-sub-inv91.0%
fma-define91.0%
distribute-lft-neg-in91.0%
distribute-rgt-neg-in91.0%
*-commutative91.0%
associate-*r*98.4%
associate-*l*98.3%
neg-mul-198.3%
associate-*r*98.3%
Simplified98.3%
Taylor expanded in t around 0 87.5%
Taylor expanded in x around 0 47.3%
associate-*r*47.3%
*-commutative47.3%
Simplified47.3%
if 2.8000000000000001e-151 < z < 8.19999999999999968e-81Initial program 100.0%
+-commutative100.0%
associate-+r-100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
associate-*r*99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
associate-+r-99.9%
associate-*l*99.6%
fma-define99.7%
cancel-sign-sub-inv99.7%
fma-define99.7%
distribute-lft-neg-in99.7%
distribute-rgt-neg-in99.7%
*-commutative99.7%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
fma-undefine99.7%
fma-undefine99.7%
associate-+r+99.7%
*-commutative99.7%
associate-*l*99.7%
*-commutative99.7%
associate-*r*99.6%
*-commutative99.6%
*-commutative99.6%
associate-*r*99.6%
associate-*l*99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
*-commutative99.6%
associate-+r+99.6%
sub-neg99.6%
Applied egg-rr99.9%
Taylor expanded in x around inf 55.6%
if 8.19999999999999968e-81 < z < 1.6000000000000001e-21Initial program 88.2%
+-commutative88.2%
associate-+r-88.2%
*-commutative88.2%
cancel-sign-sub-inv88.2%
associate-*r*99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-+r-99.8%
associate-*l*99.8%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*88.2%
associate-*l*88.2%
neg-mul-188.2%
associate-*r*88.2%
Simplified88.2%
Taylor expanded in t around 0 88.4%
Taylor expanded in x around 0 63.9%
associate-*r*63.7%
*-commutative63.7%
Simplified63.7%
Taylor expanded in b around 0 63.9%
*-commutative63.9%
associate-*r*63.7%
*-commutative63.7%
Simplified63.7%
if 1.6000000000000001e-21 < z Initial program 94.1%
+-commutative94.1%
associate-+r-94.1%
*-commutative94.1%
cancel-sign-sub-inv94.1%
associate-*r*98.3%
distribute-lft-neg-in98.3%
*-commutative98.3%
cancel-sign-sub-inv98.3%
associate-+r-98.3%
associate-*l*98.3%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*95.6%
associate-*l*95.6%
neg-mul-195.6%
associate-*r*95.6%
Simplified95.6%
Taylor expanded in t around inf 53.9%
*-commutative53.9%
associate-*r*53.9%
*-commutative53.9%
associate-*l*53.9%
Simplified53.9%
Taylor expanded in z around 0 53.9%
Final simplification50.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* -9.0 (* t (* y z)))))
(if (<= z -2.05e-129)
t_1
(if (<= z 2.2e-151)
(* b (* a 27.0))
(if (<= z 5.5e-81)
(* x 2.0)
(if (<= z 1.45e-21) (* a (* b 27.0)) t_1))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -9.0 * (t * (y * z));
double tmp;
if (z <= -2.05e-129) {
tmp = t_1;
} else if (z <= 2.2e-151) {
tmp = b * (a * 27.0);
} else if (z <= 5.5e-81) {
tmp = x * 2.0;
} else if (z <= 1.45e-21) {
tmp = a * (b * 27.0);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = (-9.0d0) * (t * (y * z))
if (z <= (-2.05d-129)) then
tmp = t_1
else if (z <= 2.2d-151) then
tmp = b * (a * 27.0d0)
else if (z <= 5.5d-81) then
tmp = x * 2.0d0
else if (z <= 1.45d-21) then
tmp = a * (b * 27.0d0)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -9.0 * (t * (y * z));
double tmp;
if (z <= -2.05e-129) {
tmp = t_1;
} else if (z <= 2.2e-151) {
tmp = b * (a * 27.0);
} else if (z <= 5.5e-81) {
tmp = x * 2.0;
} else if (z <= 1.45e-21) {
tmp = a * (b * 27.0);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = -9.0 * (t * (y * z)) tmp = 0 if z <= -2.05e-129: tmp = t_1 elif z <= 2.2e-151: tmp = b * (a * 27.0) elif z <= 5.5e-81: tmp = x * 2.0 elif z <= 1.45e-21: tmp = a * (b * 27.0) else: tmp = t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(-9.0 * Float64(t * Float64(y * z))) tmp = 0.0 if (z <= -2.05e-129) tmp = t_1; elseif (z <= 2.2e-151) tmp = Float64(b * Float64(a * 27.0)); elseif (z <= 5.5e-81) tmp = Float64(x * 2.0); elseif (z <= 1.45e-21) tmp = Float64(a * Float64(b * 27.0)); else tmp = t_1; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = -9.0 * (t * (y * z));
tmp = 0.0;
if (z <= -2.05e-129)
tmp = t_1;
elseif (z <= 2.2e-151)
tmp = b * (a * 27.0);
elseif (z <= 5.5e-81)
tmp = x * 2.0;
elseif (z <= 1.45e-21)
tmp = a * (b * 27.0);
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.05e-129], t$95$1, If[LessEqual[z, 2.2e-151], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.5e-81], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 1.45e-21], N[(a * N[(b * 27.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;z \leq -2.05 \cdot 10^{-129}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.2 \cdot 10^{-151}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;z \leq 5.5 \cdot 10^{-81}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-21}:\\
\;\;\;\;a \cdot \left(b \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -2.05e-129 or 1.45e-21 < z Initial program 91.8%
+-commutative91.8%
associate-+r-91.8%
*-commutative91.8%
cancel-sign-sub-inv91.8%
associate-*r*96.8%
distribute-lft-neg-in96.8%
*-commutative96.8%
cancel-sign-sub-inv96.8%
associate-+r-96.8%
associate-*l*96.8%
fma-define98.0%
cancel-sign-sub-inv98.0%
fma-define98.0%
distribute-lft-neg-in98.0%
distribute-rgt-neg-in98.0%
*-commutative98.0%
associate-*r*93.0%
associate-*l*92.9%
neg-mul-192.9%
associate-*r*92.9%
Simplified92.9%
Taylor expanded in t around inf 49.9%
if -2.05e-129 < z < 2.1999999999999999e-151Initial program 99.7%
+-commutative99.7%
associate-+r-99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-*r*92.4%
distribute-lft-neg-in92.4%
*-commutative92.4%
cancel-sign-sub-inv92.4%
associate-+r-92.4%
associate-*l*91.0%
fma-define91.0%
cancel-sign-sub-inv91.0%
fma-define91.0%
distribute-lft-neg-in91.0%
distribute-rgt-neg-in91.0%
*-commutative91.0%
associate-*r*98.4%
associate-*l*98.3%
neg-mul-198.3%
associate-*r*98.3%
Simplified98.3%
Taylor expanded in t around 0 87.5%
Taylor expanded in x around 0 47.3%
associate-*r*47.3%
*-commutative47.3%
Simplified47.3%
if 2.1999999999999999e-151 < z < 5.50000000000000026e-81Initial program 100.0%
+-commutative100.0%
associate-+r-100.0%
*-commutative100.0%
cancel-sign-sub-inv100.0%
associate-*r*99.9%
distribute-lft-neg-in99.9%
*-commutative99.9%
cancel-sign-sub-inv99.9%
associate-+r-99.9%
associate-*l*99.6%
fma-define99.7%
cancel-sign-sub-inv99.7%
fma-define99.7%
distribute-lft-neg-in99.7%
distribute-rgt-neg-in99.7%
*-commutative99.7%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
fma-undefine99.7%
fma-undefine99.7%
associate-+r+99.7%
*-commutative99.7%
associate-*l*99.7%
*-commutative99.7%
associate-*r*99.6%
*-commutative99.6%
*-commutative99.6%
associate-*r*99.6%
associate-*l*99.6%
metadata-eval99.6%
distribute-lft-neg-in99.6%
*-commutative99.6%
distribute-rgt-neg-in99.6%
*-commutative99.6%
associate-+r+99.6%
sub-neg99.6%
Applied egg-rr99.9%
Taylor expanded in x around inf 55.6%
if 5.50000000000000026e-81 < z < 1.45e-21Initial program 88.2%
+-commutative88.2%
associate-+r-88.2%
*-commutative88.2%
cancel-sign-sub-inv88.2%
associate-*r*99.8%
distribute-lft-neg-in99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-+r-99.8%
associate-*l*99.8%
fma-define99.8%
cancel-sign-sub-inv99.8%
fma-define99.8%
distribute-lft-neg-in99.8%
distribute-rgt-neg-in99.8%
*-commutative99.8%
associate-*r*88.2%
associate-*l*88.2%
neg-mul-188.2%
associate-*r*88.2%
Simplified88.2%
Taylor expanded in t around 0 88.4%
Taylor expanded in x around 0 63.9%
associate-*r*63.7%
*-commutative63.7%
Simplified63.7%
Taylor expanded in b around 0 63.9%
*-commutative63.9%
associate-*r*63.7%
*-commutative63.7%
Simplified63.7%
Final simplification50.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.5e-128)
(+ (* x 2.0) (* -9.0 (* z (* t y))))
(if (<= z 4.1e-20)
(+ (* x 2.0) (* 27.0 (* b a)))
(* t (- (* 2.0 (/ x t)) (* 9.0 (* y z)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.5e-128) {
tmp = (x * 2.0) + (-9.0 * (z * (t * y)));
} else if (z <= 4.1e-20) {
tmp = (x * 2.0) + (27.0 * (b * a));
} else {
tmp = t * ((2.0 * (x / t)) - (9.0 * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (z <= (-2.5d-128)) then
tmp = (x * 2.0d0) + ((-9.0d0) * (z * (t * y)))
else if (z <= 4.1d-20) then
tmp = (x * 2.0d0) + (27.0d0 * (b * a))
else
tmp = t * ((2.0d0 * (x / t)) - (9.0d0 * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -2.5e-128) {
tmp = (x * 2.0) + (-9.0 * (z * (t * y)));
} else if (z <= 4.1e-20) {
tmp = (x * 2.0) + (27.0 * (b * a));
} else {
tmp = t * ((2.0 * (x / t)) - (9.0 * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -2.5e-128: tmp = (x * 2.0) + (-9.0 * (z * (t * y))) elif z <= 4.1e-20: tmp = (x * 2.0) + (27.0 * (b * a)) else: tmp = t * ((2.0 * (x / t)) - (9.0 * (y * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -2.5e-128) tmp = Float64(Float64(x * 2.0) + Float64(-9.0 * Float64(z * Float64(t * y)))); elseif (z <= 4.1e-20) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(b * a))); else tmp = Float64(t * Float64(Float64(2.0 * Float64(x / t)) - Float64(9.0 * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -2.5e-128)
tmp = (x * 2.0) + (-9.0 * (z * (t * y)));
elseif (z <= 4.1e-20)
tmp = (x * 2.0) + (27.0 * (b * a));
else
tmp = t * ((2.0 * (x / t)) - (9.0 * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -2.5e-128], N[(N[(x * 2.0), $MachinePrecision] + N[(-9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.1e-20], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(2.0 * N[(x / t), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.5 \cdot 10^{-128}:\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\
\mathbf{elif}\;z \leq 4.1 \cdot 10^{-20}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(b \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(2 \cdot \frac{x}{t} - 9 \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < -2.5000000000000001e-128Initial program 90.1%
sub-neg90.1%
sub-neg90.1%
associate-*l*92.8%
associate-*l*92.8%
Simplified92.8%
Taylor expanded in a around 0 71.7%
cancel-sign-sub-inv71.7%
metadata-eval71.7%
associate-*r*75.6%
Applied egg-rr75.6%
if -2.5000000000000001e-128 < z < 4.1000000000000001e-20Initial program 98.7%
+-commutative98.7%
associate-+r-98.7%
*-commutative98.7%
cancel-sign-sub-inv98.7%
associate-*r*94.4%
distribute-lft-neg-in94.4%
*-commutative94.4%
cancel-sign-sub-inv94.4%
associate-+r-94.4%
associate-*l*93.3%
fma-define93.4%
cancel-sign-sub-inv93.4%
fma-define93.4%
distribute-lft-neg-in93.4%
distribute-rgt-neg-in93.4%
*-commutative93.4%
associate-*r*97.7%
associate-*l*97.7%
neg-mul-197.7%
associate-*r*97.7%
Simplified97.7%
Taylor expanded in t around 0 88.7%
if 4.1000000000000001e-20 < z Initial program 94.1%
sub-neg94.1%
sub-neg94.1%
associate-*l*95.6%
associate-*l*95.6%
Simplified95.6%
Taylor expanded in t around inf 84.5%
Taylor expanded in a around 0 68.1%
Final simplification78.2%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z 1.15e+91) (- (+ (* x 2.0) (* b (* a 27.0))) (* y (* 9.0 (* t z)))) (* t (- (* b (/ (* a 27.0) t)) (* 9.0 (* y z))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.15e+91) {
tmp = ((x * 2.0) + (b * (a * 27.0))) - (y * (9.0 * (t * z)));
} else {
tmp = t * ((b * ((a * 27.0) / t)) - (9.0 * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (z <= 1.15d+91) then
tmp = ((x * 2.0d0) + (b * (a * 27.0d0))) - (y * (9.0d0 * (t * z)))
else
tmp = t * ((b * ((a * 27.0d0) / t)) - (9.0d0 * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= 1.15e+91) {
tmp = ((x * 2.0) + (b * (a * 27.0))) - (y * (9.0 * (t * z)));
} else {
tmp = t * ((b * ((a * 27.0) / t)) - (9.0 * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= 1.15e+91: tmp = ((x * 2.0) + (b * (a * 27.0))) - (y * (9.0 * (t * z))) else: tmp = t * ((b * ((a * 27.0) / t)) - (9.0 * (y * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= 1.15e+91) tmp = Float64(Float64(Float64(x * 2.0) + Float64(b * Float64(a * 27.0))) - Float64(y * Float64(9.0 * Float64(t * z)))); else tmp = Float64(t * Float64(Float64(b * Float64(Float64(a * 27.0) / t)) - Float64(9.0 * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= 1.15e+91)
tmp = ((x * 2.0) + (b * (a * 27.0))) - (y * (9.0 * (t * z)));
else
tmp = t * ((b * ((a * 27.0) / t)) - (9.0 * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, 1.15e+91], N[(N[(N[(x * 2.0), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y * N[(9.0 * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(b * N[(N[(a * 27.0), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1.15 \cdot 10^{+91}:\\
\;\;\;\;\left(x \cdot 2 + b \cdot \left(a \cdot 27\right)\right) - y \cdot \left(9 \cdot \left(t \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(b \cdot \frac{a \cdot 27}{t} - 9 \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if z < 1.14999999999999996e91Initial program 94.4%
+-commutative94.4%
associate-+r-94.4%
*-commutative94.4%
cancel-sign-sub-inv94.4%
associate-*r*95.6%
distribute-lft-neg-in95.6%
*-commutative95.6%
cancel-sign-sub-inv95.6%
associate-+r-95.6%
associate-*l*95.1%
fma-define95.6%
cancel-sign-sub-inv95.6%
fma-define95.6%
distribute-lft-neg-in95.6%
distribute-rgt-neg-in95.6%
*-commutative95.6%
associate-*r*94.4%
associate-*l*94.4%
neg-mul-194.4%
associate-*r*94.4%
Simplified94.4%
fma-undefine93.9%
fma-undefine93.9%
associate-+r+93.9%
*-commutative93.9%
associate-*l*95.7%
*-commutative95.7%
associate-*r*95.7%
*-commutative95.7%
*-commutative95.7%
associate-*r*95.7%
associate-*l*95.7%
metadata-eval95.7%
distribute-lft-neg-in95.7%
*-commutative95.7%
distribute-rgt-neg-in95.7%
*-commutative95.7%
associate-+r+95.7%
sub-neg95.7%
Applied egg-rr96.2%
if 1.14999999999999996e91 < z Initial program 93.4%
sub-neg93.4%
sub-neg93.4%
associate-*l*93.5%
associate-*l*93.5%
Simplified93.5%
Taylor expanded in t around inf 85.1%
Taylor expanded in x around 0 81.1%
*-commutative81.1%
*-commutative81.1%
associate-/l*81.4%
associate-*r*81.4%
*-commutative81.4%
associate-*r/81.4%
Simplified81.4%
Final simplification93.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z -6e+24) (+ (- (* x 2.0) (* (* t z) (* y 9.0))) (* a (* b 27.0))) (+ (- (* x 2.0) (* t (* z (* y 9.0)))) (* b (* a 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6e+24) {
tmp = ((x * 2.0) - ((t * z) * (y * 9.0))) + (a * (b * 27.0));
} else {
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (z <= (-6d+24)) then
tmp = ((x * 2.0d0) - ((t * z) * (y * 9.0d0))) + (a * (b * 27.0d0))
else
tmp = ((x * 2.0d0) - (t * (z * (y * 9.0d0)))) + (b * (a * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -6e+24) {
tmp = ((x * 2.0) - ((t * z) * (y * 9.0))) + (a * (b * 27.0));
} else {
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -6e+24: tmp = ((x * 2.0) - ((t * z) * (y * 9.0))) + (a * (b * 27.0)) else: tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -6e+24) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(t * z) * Float64(y * 9.0))) + Float64(a * Float64(b * 27.0))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(z * Float64(y * 9.0)))) + Float64(b * Float64(a * 27.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -6e+24)
tmp = ((x * 2.0) - ((t * z) * (y * 9.0))) + (a * (b * 27.0));
else
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -6e+24], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(t * z), $MachinePrecision] * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(b * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(z * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6 \cdot 10^{+24}:\\
\;\;\;\;\left(x \cdot 2 - \left(t \cdot z\right) \cdot \left(y \cdot 9\right)\right) + a \cdot \left(b \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot \left(z \cdot \left(y \cdot 9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if z < -5.9999999999999999e24Initial program 85.9%
sub-neg85.9%
sub-neg85.9%
associate-*l*89.8%
associate-*l*89.8%
Simplified89.8%
if -5.9999999999999999e24 < z Initial program 97.2%
Final simplification95.2%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z -1e-213) (+ (- (* x 2.0) (* (* t z) (* y 9.0))) (* a (* b 27.0))) (+ (- (* x 2.0) (* t (* 9.0 (* y z)))) (* b (* a 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1e-213) {
tmp = ((x * 2.0) - ((t * z) * (y * 9.0))) + (a * (b * 27.0));
} else {
tmp = ((x * 2.0) - (t * (9.0 * (y * z)))) + (b * (a * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (z <= (-1d-213)) then
tmp = ((x * 2.0d0) - ((t * z) * (y * 9.0d0))) + (a * (b * 27.0d0))
else
tmp = ((x * 2.0d0) - (t * (9.0d0 * (y * z)))) + (b * (a * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1e-213) {
tmp = ((x * 2.0) - ((t * z) * (y * 9.0))) + (a * (b * 27.0));
} else {
tmp = ((x * 2.0) - (t * (9.0 * (y * z)))) + (b * (a * 27.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1e-213: tmp = ((x * 2.0) - ((t * z) * (y * 9.0))) + (a * (b * 27.0)) else: tmp = ((x * 2.0) - (t * (9.0 * (y * z)))) + (b * (a * 27.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1e-213) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(t * z) * Float64(y * 9.0))) + Float64(a * Float64(b * 27.0))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(9.0 * Float64(y * z)))) + Float64(b * Float64(a * 27.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -1e-213)
tmp = ((x * 2.0) - ((t * z) * (y * 9.0))) + (a * (b * 27.0));
else
tmp = ((x * 2.0) - (t * (9.0 * (y * z)))) + (b * (a * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1e-213], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(t * z), $MachinePrecision] * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(b * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1 \cdot 10^{-213}:\\
\;\;\;\;\left(x \cdot 2 - \left(t \cdot z\right) \cdot \left(y \cdot 9\right)\right) + a \cdot \left(b \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot \left(9 \cdot \left(y \cdot z\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if z < -9.9999999999999995e-214Initial program 91.5%
sub-neg91.5%
sub-neg91.5%
associate-*l*93.7%
associate-*l*93.7%
Simplified93.7%
if -9.9999999999999995e-214 < z Initial program 96.4%
Taylor expanded in y around 0 96.4%
Final simplification95.2%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z -1.12e+83) (* y (+ (* 27.0 (/ (* b a) y)) (* z (* t -9.0)))) (+ (- (* x 2.0) (* t (* 9.0 (* y z)))) (* b (* a 27.0)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.12e+83) {
tmp = y * ((27.0 * ((b * a) / y)) + (z * (t * -9.0)));
} else {
tmp = ((x * 2.0) - (t * (9.0 * (y * z)))) + (b * (a * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (z <= (-1.12d+83)) then
tmp = y * ((27.0d0 * ((b * a) / y)) + (z * (t * (-9.0d0))))
else
tmp = ((x * 2.0d0) - (t * (9.0d0 * (y * z)))) + (b * (a * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -1.12e+83) {
tmp = y * ((27.0 * ((b * a) / y)) + (z * (t * -9.0)));
} else {
tmp = ((x * 2.0) - (t * (9.0 * (y * z)))) + (b * (a * 27.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -1.12e+83: tmp = y * ((27.0 * ((b * a) / y)) + (z * (t * -9.0))) else: tmp = ((x * 2.0) - (t * (9.0 * (y * z)))) + (b * (a * 27.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -1.12e+83) tmp = Float64(y * Float64(Float64(27.0 * Float64(Float64(b * a) / y)) + Float64(z * Float64(t * -9.0)))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(9.0 * Float64(y * z)))) + Float64(b * Float64(a * 27.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -1.12e+83)
tmp = y * ((27.0 * ((b * a) / y)) + (z * (t * -9.0)));
else
tmp = ((x * 2.0) - (t * (9.0 * (y * z)))) + (b * (a * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -1.12e+83], N[(y * N[(N[(27.0 * N[(N[(b * a), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] + N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.12 \cdot 10^{+83}:\\
\;\;\;\;y \cdot \left(27 \cdot \frac{b \cdot a}{y} + z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot \left(9 \cdot \left(y \cdot z\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if z < -1.12e83Initial program 83.2%
sub-neg83.2%
sub-neg83.2%
associate-*l*90.2%
associate-*l*90.3%
Simplified90.3%
Taylor expanded in x around 0 68.0%
Taylor expanded in y around inf 77.3%
cancel-sign-sub-inv77.3%
metadata-eval77.3%
associate-*r*77.2%
Simplified77.2%
if -1.12e83 < z Initial program 96.9%
Taylor expanded in y around 0 96.9%
Final simplification93.0%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= z -2.6e-128) (not (<= z 3.35e-21))) (+ (* x 2.0) (* -9.0 (* z (* t y)))) (+ (* x 2.0) (* 27.0 (* b a)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.6e-128) || !(z <= 3.35e-21)) {
tmp = (x * 2.0) + (-9.0 * (z * (t * y)));
} else {
tmp = (x * 2.0) + (27.0 * (b * a));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 ((z <= (-2.6d-128)) .or. (.not. (z <= 3.35d-21))) then
tmp = (x * 2.0d0) + ((-9.0d0) * (z * (t * y)))
else
tmp = (x * 2.0d0) + (27.0d0 * (b * a))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((z <= -2.6e-128) || !(z <= 3.35e-21)) {
tmp = (x * 2.0) + (-9.0 * (z * (t * y)));
} else {
tmp = (x * 2.0) + (27.0 * (b * a));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (z <= -2.6e-128) or not (z <= 3.35e-21): tmp = (x * 2.0) + (-9.0 * (z * (t * y))) else: tmp = (x * 2.0) + (27.0 * (b * a)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((z <= -2.6e-128) || !(z <= 3.35e-21)) tmp = Float64(Float64(x * 2.0) + Float64(-9.0 * Float64(z * Float64(t * y)))); else tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(b * a))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((z <= -2.6e-128) || ~((z <= 3.35e-21)))
tmp = (x * 2.0) + (-9.0 * (z * (t * y)));
else
tmp = (x * 2.0) + (27.0 * (b * a));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[z, -2.6e-128], N[Not[LessEqual[z, 3.35e-21]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] + N[(-9.0 * N[(z * N[(t * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{-128} \lor \neg \left(z \leq 3.35 \cdot 10^{-21}\right):\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(z \cdot \left(t \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(b \cdot a\right)\\
\end{array}
\end{array}
if z < -2.59999999999999981e-128 or 3.3499999999999999e-21 < z Initial program 91.8%
sub-neg91.8%
sub-neg91.8%
associate-*l*94.0%
associate-*l*94.0%
Simplified94.0%
Taylor expanded in a around 0 72.4%
cancel-sign-sub-inv72.4%
metadata-eval72.4%
associate-*r*74.7%
Applied egg-rr74.7%
if -2.59999999999999981e-128 < z < 3.3499999999999999e-21Initial program 98.7%
+-commutative98.7%
associate-+r-98.7%
*-commutative98.7%
cancel-sign-sub-inv98.7%
associate-*r*94.4%
distribute-lft-neg-in94.4%
*-commutative94.4%
cancel-sign-sub-inv94.4%
associate-+r-94.4%
associate-*l*93.3%
fma-define93.4%
cancel-sign-sub-inv93.4%
fma-define93.4%
distribute-lft-neg-in93.4%
distribute-rgt-neg-in93.4%
*-commutative93.4%
associate-*r*97.7%
associate-*l*97.7%
neg-mul-197.7%
associate-*r*97.7%
Simplified97.7%
Taylor expanded in t around 0 88.7%
Final simplification79.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= z -4.415e-7)
(* y (* z (* t -9.0)))
(if (<= z 3900000000000.0)
(+ (* x 2.0) (* 27.0 (* b a)))
(* (* y z) (* t -9.0)))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.415e-7) {
tmp = y * (z * (t * -9.0));
} else if (z <= 3900000000000.0) {
tmp = (x * 2.0) + (27.0 * (b * a));
} else {
tmp = (y * z) * (t * -9.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (z <= (-4.415d-7)) then
tmp = y * (z * (t * (-9.0d0)))
else if (z <= 3900000000000.0d0) then
tmp = (x * 2.0d0) + (27.0d0 * (b * a))
else
tmp = (y * z) * (t * (-9.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.415e-7) {
tmp = y * (z * (t * -9.0));
} else if (z <= 3900000000000.0) {
tmp = (x * 2.0) + (27.0 * (b * a));
} else {
tmp = (y * z) * (t * -9.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -4.415e-7: tmp = y * (z * (t * -9.0)) elif z <= 3900000000000.0: tmp = (x * 2.0) + (27.0 * (b * a)) else: tmp = (y * z) * (t * -9.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.415e-7) tmp = Float64(y * Float64(z * Float64(t * -9.0))); elseif (z <= 3900000000000.0) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(b * a))); else tmp = Float64(Float64(y * z) * Float64(t * -9.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -4.415e-7)
tmp = y * (z * (t * -9.0));
elseif (z <= 3900000000000.0)
tmp = (x * 2.0) + (27.0 * (b * a));
else
tmp = (y * z) * (t * -9.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.415e-7], N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3900000000000.0], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y * z), $MachinePrecision] * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.415 \cdot 10^{-7}:\\
\;\;\;\;y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 3900000000000:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(b \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(y \cdot z\right) \cdot \left(t \cdot -9\right)\\
\end{array}
\end{array}
if z < -4.41499999999999976e-7Initial program 86.7%
sub-neg86.7%
sub-neg86.7%
associate-*l*90.4%
associate-*l*90.3%
Simplified90.3%
Taylor expanded in a around 0 73.0%
Taylor expanded in x around 0 53.0%
associate-*r*53.1%
metadata-eval53.1%
distribute-lft-neg-in53.1%
distribute-lft-neg-in53.1%
*-commutative53.1%
associate-*l*58.5%
distribute-rgt-neg-in58.5%
*-commutative58.5%
associate-*r*58.5%
distribute-lft-neg-in58.5%
metadata-eval58.5%
Simplified58.5%
pow158.5%
associate-*r*58.5%
Applied egg-rr58.5%
unpow158.5%
*-commutative58.5%
Simplified58.5%
if -4.41499999999999976e-7 < z < 3.9e12Initial program 99.0%
+-commutative99.0%
associate-+r-99.0%
*-commutative99.0%
cancel-sign-sub-inv99.0%
associate-*r*95.0%
distribute-lft-neg-in95.0%
*-commutative95.0%
cancel-sign-sub-inv95.0%
associate-+r-95.0%
associate-*l*94.2%
fma-define94.2%
cancel-sign-sub-inv94.2%
fma-define94.2%
distribute-lft-neg-in94.2%
distribute-rgt-neg-in94.2%
*-commutative94.2%
associate-*r*98.2%
associate-*l*98.2%
neg-mul-198.2%
associate-*r*98.2%
Simplified98.2%
Taylor expanded in t around 0 85.2%
if 3.9e12 < z Initial program 93.7%
sub-neg93.7%
sub-neg93.7%
associate-*l*95.3%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in a around 0 74.4%
Taylor expanded in x around 0 57.9%
associate-*r*58.0%
Simplified58.0%
Final simplification70.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= b -3e-104) (not (<= b 2.2e+20))) (* b (* a 27.0)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3e-104) || !(b <= 2.2e+20)) {
tmp = b * (a * 27.0);
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= (-3d-104)) .or. (.not. (b <= 2.2d+20))) then
tmp = b * (a * 27.0d0)
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3e-104) || !(b <= 2.2e+20)) {
tmp = b * (a * 27.0);
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (b <= -3e-104) or not (b <= 2.2e+20): tmp = b * (a * 27.0) else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3e-104) || !(b <= 2.2e+20)) tmp = Float64(b * Float64(a * 27.0)); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((b <= -3e-104) || ~((b <= 2.2e+20)))
tmp = b * (a * 27.0);
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3e-104], N[Not[LessEqual[b, 2.2e+20]], $MachinePrecision]], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3 \cdot 10^{-104} \lor \neg \left(b \leq 2.2 \cdot 10^{+20}\right):\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if b < -3.0000000000000002e-104 or 2.2e20 < b Initial program 92.3%
+-commutative92.3%
associate-+r-92.3%
*-commutative92.3%
cancel-sign-sub-inv92.3%
associate-*r*94.2%
distribute-lft-neg-in94.2%
*-commutative94.2%
cancel-sign-sub-inv94.2%
associate-+r-94.2%
associate-*l*93.5%
fma-define95.0%
cancel-sign-sub-inv95.0%
fma-define95.0%
distribute-lft-neg-in95.0%
distribute-rgt-neg-in95.0%
*-commutative95.0%
associate-*r*93.1%
associate-*l*93.0%
neg-mul-193.0%
associate-*r*93.0%
Simplified93.0%
Taylor expanded in t around 0 70.2%
Taylor expanded in x around 0 49.3%
associate-*r*49.4%
*-commutative49.4%
Simplified49.4%
if -3.0000000000000002e-104 < b < 2.2e20Initial program 96.6%
+-commutative96.6%
associate-+r-96.6%
*-commutative96.6%
cancel-sign-sub-inv96.6%
associate-*r*98.1%
distribute-lft-neg-in98.1%
*-commutative98.1%
cancel-sign-sub-inv98.1%
associate-+r-98.1%
associate-*l*98.1%
fma-define98.1%
cancel-sign-sub-inv98.1%
fma-define98.1%
distribute-lft-neg-in98.1%
distribute-rgt-neg-in98.1%
*-commutative98.1%
associate-*r*96.5%
associate-*l*96.6%
neg-mul-196.6%
associate-*r*96.6%
Simplified96.6%
fma-undefine96.5%
fma-undefine96.5%
associate-+r+96.5%
*-commutative96.5%
associate-*l*97.4%
*-commutative97.4%
associate-*r*97.4%
*-commutative97.4%
*-commutative97.4%
associate-*r*97.4%
associate-*l*97.4%
metadata-eval97.4%
distribute-lft-neg-in97.4%
*-commutative97.4%
distribute-rgt-neg-in97.4%
*-commutative97.4%
associate-+r+97.4%
sub-neg97.4%
Applied egg-rr97.4%
Taylor expanded in x around inf 41.1%
Final simplification45.7%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= b -4.1e-104) (not (<= b 1.85e+21))) (* 27.0 (* b a)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.1e-104) || !(b <= 1.85e+21)) {
tmp = 27.0 * (b * a);
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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.1d-104)) .or. (.not. (b <= 1.85d+21))) then
tmp = 27.0d0 * (b * a)
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -4.1e-104) || !(b <= 1.85e+21)) {
tmp = 27.0 * (b * a);
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (b <= -4.1e-104) or not (b <= 1.85e+21): tmp = 27.0 * (b * a) else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -4.1e-104) || !(b <= 1.85e+21)) tmp = Float64(27.0 * Float64(b * a)); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((b <= -4.1e-104) || ~((b <= 1.85e+21)))
tmp = 27.0 * (b * a);
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -4.1e-104], N[Not[LessEqual[b, 1.85e+21]], $MachinePrecision]], N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.1 \cdot 10^{-104} \lor \neg \left(b \leq 1.85 \cdot 10^{+21}\right):\\
\;\;\;\;27 \cdot \left(b \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if b < -4.09999999999999984e-104 or 1.85e21 < b Initial program 92.3%
+-commutative92.3%
associate-+r-92.3%
*-commutative92.3%
cancel-sign-sub-inv92.3%
associate-*r*94.2%
distribute-lft-neg-in94.2%
*-commutative94.2%
cancel-sign-sub-inv94.2%
associate-+r-94.2%
associate-*l*93.5%
fma-define95.0%
cancel-sign-sub-inv95.0%
fma-define95.0%
distribute-lft-neg-in95.0%
distribute-rgt-neg-in95.0%
*-commutative95.0%
associate-*r*93.1%
associate-*l*93.0%
neg-mul-193.0%
associate-*r*93.0%
Simplified93.0%
Taylor expanded in a around inf 49.3%
if -4.09999999999999984e-104 < b < 1.85e21Initial program 96.6%
+-commutative96.6%
associate-+r-96.6%
*-commutative96.6%
cancel-sign-sub-inv96.6%
associate-*r*98.1%
distribute-lft-neg-in98.1%
*-commutative98.1%
cancel-sign-sub-inv98.1%
associate-+r-98.1%
associate-*l*98.1%
fma-define98.1%
cancel-sign-sub-inv98.1%
fma-define98.1%
distribute-lft-neg-in98.1%
distribute-rgt-neg-in98.1%
*-commutative98.1%
associate-*r*96.5%
associate-*l*96.6%
neg-mul-196.6%
associate-*r*96.6%
Simplified96.6%
fma-undefine96.5%
fma-undefine96.5%
associate-+r+96.5%
*-commutative96.5%
associate-*l*97.4%
*-commutative97.4%
associate-*r*97.4%
*-commutative97.4%
*-commutative97.4%
associate-*r*97.4%
associate-*l*97.4%
metadata-eval97.4%
distribute-lft-neg-in97.4%
*-commutative97.4%
distribute-rgt-neg-in97.4%
*-commutative97.4%
associate-+r+97.4%
sub-neg97.4%
Applied egg-rr97.4%
Taylor expanded in x around inf 41.1%
Final simplification45.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= b -5.2e-104) (* a (* b 27.0)) (if (<= b 6.9e+19) (* x 2.0) (* 27.0 (* b a)))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.2e-104) {
tmp = a * (b * 27.0);
} else if (b <= 6.9e+19) {
tmp = x * 2.0;
} else {
tmp = 27.0 * (b * a);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= (-5.2d-104)) then
tmp = a * (b * 27.0d0)
else if (b <= 6.9d+19) then
tmp = x * 2.0d0
else
tmp = 27.0d0 * (b * a)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -5.2e-104) {
tmp = a * (b * 27.0);
} else if (b <= 6.9e+19) {
tmp = x * 2.0;
} else {
tmp = 27.0 * (b * a);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if b <= -5.2e-104: tmp = a * (b * 27.0) elif b <= 6.9e+19: tmp = x * 2.0 else: tmp = 27.0 * (b * a) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -5.2e-104) tmp = Float64(a * Float64(b * 27.0)); elseif (b <= 6.9e+19) tmp = Float64(x * 2.0); else tmp = Float64(27.0 * Float64(b * a)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (b <= -5.2e-104)
tmp = a * (b * 27.0);
elseif (b <= 6.9e+19)
tmp = x * 2.0;
else
tmp = 27.0 * (b * a);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -5.2e-104], N[(a * N[(b * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 6.9e+19], N[(x * 2.0), $MachinePrecision], N[(27.0 * N[(b * a), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{-104}:\\
\;\;\;\;a \cdot \left(b \cdot 27\right)\\
\mathbf{elif}\;b \leq 6.9 \cdot 10^{+19}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(b \cdot a\right)\\
\end{array}
\end{array}
if b < -5.20000000000000005e-104Initial program 94.6%
+-commutative94.6%
associate-+r-94.6%
*-commutative94.6%
cancel-sign-sub-inv94.6%
associate-*r*95.4%
distribute-lft-neg-in95.4%
*-commutative95.4%
cancel-sign-sub-inv95.4%
associate-+r-95.4%
associate-*l*95.4%
fma-define96.6%
cancel-sign-sub-inv96.6%
fma-define96.6%
distribute-lft-neg-in96.6%
distribute-rgt-neg-in96.6%
*-commutative96.6%
associate-*r*95.7%
associate-*l*95.7%
neg-mul-195.7%
associate-*r*95.7%
Simplified95.7%
Taylor expanded in t around 0 70.2%
Taylor expanded in x around 0 48.4%
associate-*r*48.4%
*-commutative48.4%
Simplified48.4%
Taylor expanded in b around 0 48.4%
*-commutative48.4%
associate-*r*48.5%
*-commutative48.5%
Simplified48.5%
if -5.20000000000000005e-104 < b < 6.9e19Initial program 96.6%
+-commutative96.6%
associate-+r-96.6%
*-commutative96.6%
cancel-sign-sub-inv96.6%
associate-*r*98.1%
distribute-lft-neg-in98.1%
*-commutative98.1%
cancel-sign-sub-inv98.1%
associate-+r-98.1%
associate-*l*98.1%
fma-define98.1%
cancel-sign-sub-inv98.1%
fma-define98.1%
distribute-lft-neg-in98.1%
distribute-rgt-neg-in98.1%
*-commutative98.1%
associate-*r*96.5%
associate-*l*96.6%
neg-mul-196.6%
associate-*r*96.6%
Simplified96.6%
fma-undefine96.5%
fma-undefine96.5%
associate-+r+96.5%
*-commutative96.5%
associate-*l*97.4%
*-commutative97.4%
associate-*r*97.4%
*-commutative97.4%
*-commutative97.4%
associate-*r*97.4%
associate-*l*97.4%
metadata-eval97.4%
distribute-lft-neg-in97.4%
*-commutative97.4%
distribute-rgt-neg-in97.4%
*-commutative97.4%
associate-+r+97.4%
sub-neg97.4%
Applied egg-rr97.4%
Taylor expanded in x around inf 41.1%
if 6.9e19 < b Initial program 88.2%
+-commutative88.2%
associate-+r-88.2%
*-commutative88.2%
cancel-sign-sub-inv88.2%
associate-*r*92.0%
distribute-lft-neg-in92.0%
*-commutative92.0%
cancel-sign-sub-inv92.0%
associate-+r-92.0%
associate-*l*90.1%
fma-define92.1%
cancel-sign-sub-inv92.1%
fma-define92.1%
distribute-lft-neg-in92.1%
distribute-rgt-neg-in92.1%
*-commutative92.1%
associate-*r*88.3%
associate-*l*88.2%
neg-mul-188.2%
associate-*r*88.2%
Simplified88.2%
Taylor expanded in a around inf 51.1%
Final simplification45.7%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (* x 2.0))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 * 2.0d0
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return x * 2.0
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(x * 2.0) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = x * 2.0;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(x * 2.0), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x \cdot 2
\end{array}
Initial program 94.2%
+-commutative94.2%
associate-+r-94.2%
*-commutative94.2%
cancel-sign-sub-inv94.2%
associate-*r*96.0%
distribute-lft-neg-in96.0%
*-commutative96.0%
cancel-sign-sub-inv96.0%
associate-+r-96.0%
associate-*l*95.6%
fma-define96.4%
cancel-sign-sub-inv96.4%
fma-define96.4%
distribute-lft-neg-in96.4%
distribute-rgt-neg-in96.4%
*-commutative96.4%
associate-*r*94.6%
associate-*l*94.6%
neg-mul-194.6%
associate-*r*94.6%
Simplified94.6%
fma-undefine93.8%
fma-undefine93.8%
associate-+r+93.8%
*-commutative93.8%
associate-*l*95.4%
*-commutative95.4%
associate-*r*95.3%
*-commutative95.3%
*-commutative95.3%
associate-*r*95.3%
associate-*l*95.3%
metadata-eval95.3%
distribute-lft-neg-in95.3%
*-commutative95.3%
distribute-rgt-neg-in95.3%
*-commutative95.3%
associate-+r+95.3%
sub-neg95.3%
Applied egg-rr95.7%
Taylor expanded in x around inf 31.3%
Final simplification31.3%
(FPCore (x y z t a b) :precision binary64 (if (< y 7.590524218811189e-161) (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b))) (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y < 7.590524218811189e-161) {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y < 7.590524218811189d-161) then
tmp = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + (a * (27.0d0 * b))
else
tmp = ((x * 2.0d0) - (9.0d0 * (y * (t * z)))) + ((a * 27.0d0) * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y < 7.590524218811189e-161) {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y < 7.590524218811189e-161: tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b)) else: tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y < 7.590524218811189e-161) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(9.0 * Float64(y * Float64(t * z)))) + Float64(Float64(a * 27.0) * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y < 7.590524218811189e-161) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b)); else tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Less[y, 7.590524218811189e-161], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y < 7.590524218811189 \cdot 10^{-161}:\\
\;\;\;\;\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - 9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right) + \left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
herbie shell --seed 2024185
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:alt
(! :herbie-platform default (if (< y 7590524218811189/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x 2) (* (* (* y 9) z) t)) (* a (* 27 b))) (+ (- (* x 2) (* 9 (* y (* t z)))) (* (* a 27) b))))
(+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))