
(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 17 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 (<= (* (* y 9.0) z) 1e+275) (fma a (* 27.0 b) (fma x 2.0 (* t (* y (* z -9.0))))) (+ (* x 2.0) (* z (* y (* 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 (((y * 9.0) * z) <= 1e+275) {
tmp = fma(a, (27.0 * b), fma(x, 2.0, (t * (y * (z * -9.0)))));
} else {
tmp = (x * 2.0) + (z * (y * (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 (Float64(Float64(y * 9.0) * z) <= 1e+275) tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(t * Float64(y * Float64(z * -9.0))))); else tmp = Float64(Float64(x * 2.0) + Float64(z * Float64(y * Float64(t * -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[N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision], 1e+275], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(y * N[(t * -9.0), $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}\;\left(y \cdot 9\right) \cdot z \leq 10^{+275}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 9.9999999999999996e274Initial program 95.0%
+-commutative95.0%
associate-+r-95.0%
*-commutative95.0%
cancel-sign-sub-inv95.0%
associate-*r*93.4%
distribute-lft-neg-in93.4%
*-commutative93.4%
cancel-sign-sub-inv93.4%
associate-+r-93.4%
associate-*l*93.8%
fma-define95.1%
cancel-sign-sub-inv95.1%
fma-define95.1%
distribute-lft-neg-in95.1%
distribute-rgt-neg-in95.1%
*-commutative95.1%
associate-*r*96.7%
associate-*l*96.7%
neg-mul-196.7%
associate-*r*96.7%
Simplified96.7%
if 9.9999999999999996e274 < (*.f64 (*.f64 y #s(literal 9 binary64)) z) Initial program 88.4%
Taylor expanded in y around 0 88.5%
associate-*r*88.4%
*-commutative88.4%
associate-*r*88.5%
Simplified88.5%
Taylor expanded in a around 0 88.5%
*-commutative88.5%
associate-*r*99.8%
cancel-sign-sub-inv99.8%
metadata-eval99.8%
associate-*r*88.5%
*-commutative88.5%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in t around 0 88.5%
associate-*r*88.5%
*-commutative88.5%
*-commutative88.5%
associate-*r*99.9%
Simplified99.9%
Final simplification96.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 (* (* y 9.0) z)))
(if (<= t_1 1e+275)
(+ (- (* x 2.0) (* t_1 t)) (* b (* a 27.0)))
(+ (* x 2.0) (* z (* y (* 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 t_1 = (y * 9.0) * z;
double tmp;
if (t_1 <= 1e+275) {
tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0));
} else {
tmp = (x * 2.0) + (z * (y * (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) :: t_1
real(8) :: tmp
t_1 = (y * 9.0d0) * z
if (t_1 <= 1d+275) then
tmp = ((x * 2.0d0) - (t_1 * t)) + (b * (a * 27.0d0))
else
tmp = (x * 2.0d0) + (z * (y * (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 t_1 = (y * 9.0) * z;
double tmp;
if (t_1 <= 1e+275) {
tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0));
} else {
tmp = (x * 2.0) + (z * (y * (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): t_1 = (y * 9.0) * z tmp = 0 if t_1 <= 1e+275: tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0)) else: tmp = (x * 2.0) + (z * (y * (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) t_1 = Float64(Float64(y * 9.0) * z) tmp = 0.0 if (t_1 <= 1e+275) tmp = Float64(Float64(Float64(x * 2.0) - Float64(t_1 * t)) + Float64(b * Float64(a * 27.0))); else tmp = Float64(Float64(x * 2.0) + Float64(z * Float64(y * 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)
t_1 = (y * 9.0) * z;
tmp = 0.0;
if (t_1 <= 1e+275)
tmp = ((x * 2.0) - (t_1 * t)) + (b * (a * 27.0));
else
tmp = (x * 2.0) + (z * (y * (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_] := Block[{t$95$1 = N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$1, 1e+275], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t$95$1 * t), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $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 := \left(y \cdot 9\right) \cdot z\\
\mathbf{if}\;t\_1 \leq 10^{+275}:\\
\;\;\;\;\left(x \cdot 2 - t\_1 \cdot t\right) + b \cdot \left(a \cdot 27\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 9.9999999999999996e274Initial program 95.0%
if 9.9999999999999996e274 < (*.f64 (*.f64 y #s(literal 9 binary64)) z) Initial program 88.4%
Taylor expanded in y around 0 88.5%
associate-*r*88.4%
*-commutative88.4%
associate-*r*88.5%
Simplified88.5%
Taylor expanded in a around 0 88.5%
*-commutative88.5%
associate-*r*99.8%
cancel-sign-sub-inv99.8%
metadata-eval99.8%
associate-*r*88.5%
*-commutative88.5%
associate-*r*99.7%
Simplified99.7%
Taylor expanded in t around 0 88.5%
associate-*r*88.5%
*-commutative88.5%
*-commutative88.5%
associate-*r*99.9%
Simplified99.9%
Final simplification95.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 (* t (* y z)))))
(if (or (<= x -3600000000.0) (not (<= x 17.0)))
(- (* x 2.0) t_1)
(- (* 27.0 (* a b)) 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 ((x <= -3600000000.0) || !(x <= 17.0)) {
tmp = (x * 2.0) - t_1;
} else {
tmp = (27.0 * (a * b)) - 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 ((x <= (-3600000000.0d0)) .or. (.not. (x <= 17.0d0))) then
tmp = (x * 2.0d0) - t_1
else
tmp = (27.0d0 * (a * b)) - 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 ((x <= -3600000000.0) || !(x <= 17.0)) {
tmp = (x * 2.0) - t_1;
} else {
tmp = (27.0 * (a * b)) - 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 (x <= -3600000000.0) or not (x <= 17.0): tmp = (x * 2.0) - t_1 else: tmp = (27.0 * (a * b)) - 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 ((x <= -3600000000.0) || !(x <= 17.0)) tmp = Float64(Float64(x * 2.0) - t_1); else tmp = Float64(Float64(27.0 * Float64(a * b)) - 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 ((x <= -3600000000.0) || ~((x <= 17.0)))
tmp = (x * 2.0) - t_1;
else
tmp = (27.0 * (a * b)) - 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[Or[LessEqual[x, -3600000000.0], N[Not[LessEqual[x, 17.0]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] - t$95$1), $MachinePrecision], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $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 := 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;x \leq -3600000000 \lor \neg \left(x \leq 17\right):\\
\;\;\;\;x \cdot 2 - t\_1\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) - t\_1\\
\end{array}
\end{array}
if x < -3.6e9 or 17 < x Initial program 94.5%
sub-neg94.5%
sub-neg94.5%
associate-*l*94.5%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in a around 0 81.0%
if -3.6e9 < x < 17Initial program 94.7%
sub-neg94.7%
sub-neg94.7%
associate-*l*95.5%
associate-*l*96.3%
Simplified96.3%
Taylor expanded in x around 0 87.9%
Final simplification84.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 (<= t -4.2e-166)
(* z (* y (* t -9.0)))
(if (<= t 4.2e-68)
(* a (* 27.0 b))
(if (<= t 2.65e+39) (* x 2.0) (* t (* z (* y -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.2e-166) {
tmp = z * (y * (t * -9.0));
} else if (t <= 4.2e-68) {
tmp = a * (27.0 * b);
} else if (t <= 2.65e+39) {
tmp = x * 2.0;
} else {
tmp = t * (z * (y * -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 (t <= (-4.2d-166)) then
tmp = z * (y * (t * (-9.0d0)))
else if (t <= 4.2d-68) then
tmp = a * (27.0d0 * b)
else if (t <= 2.65d+39) then
tmp = x * 2.0d0
else
tmp = t * (z * (y * (-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 (t <= -4.2e-166) {
tmp = z * (y * (t * -9.0));
} else if (t <= 4.2e-68) {
tmp = a * (27.0 * b);
} else if (t <= 2.65e+39) {
tmp = x * 2.0;
} else {
tmp = t * (z * (y * -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 t <= -4.2e-166: tmp = z * (y * (t * -9.0)) elif t <= 4.2e-68: tmp = a * (27.0 * b) elif t <= 2.65e+39: tmp = x * 2.0 else: tmp = t * (z * (y * -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.2e-166) tmp = Float64(z * Float64(y * Float64(t * -9.0))); elseif (t <= 4.2e-68) tmp = Float64(a * Float64(27.0 * b)); elseif (t <= 2.65e+39) tmp = Float64(x * 2.0); else tmp = Float64(t * Float64(z * Float64(y * -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 (t <= -4.2e-166)
tmp = z * (y * (t * -9.0));
elseif (t <= 4.2e-68)
tmp = a * (27.0 * b);
elseif (t <= 2.65e+39)
tmp = x * 2.0;
else
tmp = t * (z * (y * -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[t, -4.2e-166], N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.2e-68], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.65e+39], N[(x * 2.0), $MachinePrecision], N[(t * N[(z * N[(y * -9.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}\;t \leq -4.2 \cdot 10^{-166}:\\
\;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;t \leq 4.2 \cdot 10^{-68}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t \leq 2.65 \cdot 10^{+39}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if t < -4.1999999999999999e-166Initial program 94.6%
+-commutative94.6%
associate-+r-94.6%
*-commutative94.6%
cancel-sign-sub-inv94.6%
associate-*r*92.5%
distribute-lft-neg-in92.5%
*-commutative92.5%
cancel-sign-sub-inv92.5%
associate-+r-92.5%
associate-*l*93.5%
fma-define95.7%
cancel-sign-sub-inv95.7%
fma-define95.7%
distribute-lft-neg-in95.7%
distribute-rgt-neg-in95.7%
*-commutative95.7%
associate-*r*97.9%
associate-*l*97.9%
neg-mul-197.9%
associate-*r*97.9%
Simplified97.9%
Taylor expanded in t around inf 43.3%
*-commutative43.3%
associate-*r*43.2%
associate-*l*43.3%
Simplified43.3%
Taylor expanded in t around 0 43.3%
associate-*r*42.2%
Simplified42.2%
Taylor expanded in t around 0 43.3%
associate-*r*72.3%
*-commutative72.3%
*-commutative72.3%
associate-*r*70.3%
Simplified42.1%
if -4.1999999999999999e-166 < t < 4.20000000000000016e-68Initial program 90.7%
+-commutative90.7%
associate-+r-90.7%
*-commutative90.7%
cancel-sign-sub-inv90.7%
associate-*r*98.5%
distribute-lft-neg-in98.5%
*-commutative98.5%
cancel-sign-sub-inv98.5%
associate-+r-98.5%
associate-*l*98.5%
fma-define98.5%
cancel-sign-sub-inv98.5%
fma-define98.5%
distribute-lft-neg-in98.5%
distribute-rgt-neg-in98.5%
*-commutative98.5%
associate-*r*90.8%
associate-*l*90.8%
neg-mul-190.8%
associate-*r*90.8%
Simplified90.8%
Taylor expanded in t around 0 85.5%
Taylor expanded in x around 0 50.7%
*-commutative50.7%
associate-*r*50.8%
Simplified50.8%
if 4.20000000000000016e-68 < t < 2.64999999999999989e39Initial program 96.5%
+-commutative96.5%
associate-+r-96.5%
*-commutative96.5%
cancel-sign-sub-inv96.5%
associate-*r*99.7%
distribute-lft-neg-in99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-+r-99.7%
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*96.6%
associate-*l*96.6%
neg-mul-196.6%
associate-*r*96.6%
Simplified96.6%
Taylor expanded in t around 0 61.7%
Taylor expanded in x around inf 34.4%
if 2.64999999999999989e39 < t Initial program 98.2%
+-commutative98.2%
associate-+r-98.2%
*-commutative98.2%
cancel-sign-sub-inv98.2%
associate-*r*87.8%
distribute-lft-neg-in87.8%
*-commutative87.8%
cancel-sign-sub-inv87.8%
associate-+r-87.8%
associate-*l*87.8%
fma-define89.4%
cancel-sign-sub-inv89.4%
fma-define89.4%
distribute-lft-neg-in89.4%
distribute-rgt-neg-in89.4%
*-commutative89.4%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around inf 64.2%
*-commutative64.2%
associate-*r*64.3%
*-commutative64.3%
associate-*l*64.2%
Simplified64.2%
Final simplification49.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 (<= t -4.2e-166)
(* -9.0 (* z (* y t)))
(if (<= t 6.2e-69)
(* a (* 27.0 b))
(if (<= t 7.4e+43) (* x 2.0) (* t (* z (* y -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.2e-166) {
tmp = -9.0 * (z * (y * t));
} else if (t <= 6.2e-69) {
tmp = a * (27.0 * b);
} else if (t <= 7.4e+43) {
tmp = x * 2.0;
} else {
tmp = t * (z * (y * -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 (t <= (-4.2d-166)) then
tmp = (-9.0d0) * (z * (y * t))
else if (t <= 6.2d-69) then
tmp = a * (27.0d0 * b)
else if (t <= 7.4d+43) then
tmp = x * 2.0d0
else
tmp = t * (z * (y * (-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 (t <= -4.2e-166) {
tmp = -9.0 * (z * (y * t));
} else if (t <= 6.2e-69) {
tmp = a * (27.0 * b);
} else if (t <= 7.4e+43) {
tmp = x * 2.0;
} else {
tmp = t * (z * (y * -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 t <= -4.2e-166: tmp = -9.0 * (z * (y * t)) elif t <= 6.2e-69: tmp = a * (27.0 * b) elif t <= 7.4e+43: tmp = x * 2.0 else: tmp = t * (z * (y * -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.2e-166) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (t <= 6.2e-69) tmp = Float64(a * Float64(27.0 * b)); elseif (t <= 7.4e+43) tmp = Float64(x * 2.0); else tmp = Float64(t * Float64(z * Float64(y * -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 (t <= -4.2e-166)
tmp = -9.0 * (z * (y * t));
elseif (t <= 6.2e-69)
tmp = a * (27.0 * b);
elseif (t <= 7.4e+43)
tmp = x * 2.0;
else
tmp = t * (z * (y * -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[t, -4.2e-166], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e-69], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.4e+43], N[(x * 2.0), $MachinePrecision], N[(t * N[(z * N[(y * -9.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}\;t \leq -4.2 \cdot 10^{-166}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-69}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t \leq 7.4 \cdot 10^{+43}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if t < -4.1999999999999999e-166Initial program 94.6%
+-commutative94.6%
associate-+r-94.6%
*-commutative94.6%
cancel-sign-sub-inv94.6%
associate-*r*92.5%
distribute-lft-neg-in92.5%
*-commutative92.5%
cancel-sign-sub-inv92.5%
associate-+r-92.5%
associate-*l*93.5%
fma-define95.7%
cancel-sign-sub-inv95.7%
fma-define95.7%
distribute-lft-neg-in95.7%
distribute-rgt-neg-in95.7%
*-commutative95.7%
associate-*r*97.9%
associate-*l*97.9%
neg-mul-197.9%
associate-*r*97.9%
Simplified97.9%
Taylor expanded in t around inf 43.3%
*-commutative43.3%
associate-*r*43.2%
associate-*l*43.3%
Simplified43.3%
Taylor expanded in t around 0 43.3%
associate-*r*42.2%
Simplified42.2%
if -4.1999999999999999e-166 < t < 6.1999999999999999e-69Initial program 90.7%
+-commutative90.7%
associate-+r-90.7%
*-commutative90.7%
cancel-sign-sub-inv90.7%
associate-*r*98.5%
distribute-lft-neg-in98.5%
*-commutative98.5%
cancel-sign-sub-inv98.5%
associate-+r-98.5%
associate-*l*98.5%
fma-define98.5%
cancel-sign-sub-inv98.5%
fma-define98.5%
distribute-lft-neg-in98.5%
distribute-rgt-neg-in98.5%
*-commutative98.5%
associate-*r*90.8%
associate-*l*90.8%
neg-mul-190.8%
associate-*r*90.8%
Simplified90.8%
Taylor expanded in t around 0 85.5%
Taylor expanded in x around 0 50.7%
*-commutative50.7%
associate-*r*50.8%
Simplified50.8%
if 6.1999999999999999e-69 < t < 7.4000000000000002e43Initial program 96.5%
+-commutative96.5%
associate-+r-96.5%
*-commutative96.5%
cancel-sign-sub-inv96.5%
associate-*r*99.7%
distribute-lft-neg-in99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-+r-99.7%
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*96.6%
associate-*l*96.6%
neg-mul-196.6%
associate-*r*96.6%
Simplified96.6%
Taylor expanded in t around 0 61.7%
Taylor expanded in x around inf 34.4%
if 7.4000000000000002e43 < t Initial program 98.2%
+-commutative98.2%
associate-+r-98.2%
*-commutative98.2%
cancel-sign-sub-inv98.2%
associate-*r*87.8%
distribute-lft-neg-in87.8%
*-commutative87.8%
cancel-sign-sub-inv87.8%
associate-+r-87.8%
associate-*l*87.8%
fma-define89.4%
cancel-sign-sub-inv89.4%
fma-define89.4%
distribute-lft-neg-in89.4%
distribute-rgt-neg-in89.4%
*-commutative89.4%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around inf 64.2%
*-commutative64.2%
associate-*r*64.3%
*-commutative64.3%
associate-*l*64.2%
Simplified64.2%
Final simplification49.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 (<= t -4e-166)
(* -9.0 (* z (* y t)))
(if (<= t 3.8e-67)
(* a (* 27.0 b))
(if (<= t 2.8e+39) (* x 2.0) (* -9.0 (* t (* 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 (t <= -4e-166) {
tmp = -9.0 * (z * (y * t));
} else if (t <= 3.8e-67) {
tmp = a * (27.0 * b);
} else if (t <= 2.8e+39) {
tmp = x * 2.0;
} else {
tmp = -9.0 * (t * (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 (t <= (-4d-166)) then
tmp = (-9.0d0) * (z * (y * t))
else if (t <= 3.8d-67) then
tmp = a * (27.0d0 * b)
else if (t <= 2.8d+39) then
tmp = x * 2.0d0
else
tmp = (-9.0d0) * (t * (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 (t <= -4e-166) {
tmp = -9.0 * (z * (y * t));
} else if (t <= 3.8e-67) {
tmp = a * (27.0 * b);
} else if (t <= 2.8e+39) {
tmp = x * 2.0;
} else {
tmp = -9.0 * (t * (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 t <= -4e-166: tmp = -9.0 * (z * (y * t)) elif t <= 3.8e-67: tmp = a * (27.0 * b) elif t <= 2.8e+39: tmp = x * 2.0 else: tmp = -9.0 * (t * (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 (t <= -4e-166) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (t <= 3.8e-67) tmp = Float64(a * Float64(27.0 * b)); elseif (t <= 2.8e+39) tmp = Float64(x * 2.0); else tmp = Float64(-9.0 * Float64(t * 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 (t <= -4e-166)
tmp = -9.0 * (z * (y * t));
elseif (t <= 3.8e-67)
tmp = a * (27.0 * b);
elseif (t <= 2.8e+39)
tmp = x * 2.0;
else
tmp = -9.0 * (t * (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[t, -4e-166], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.8e-67], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+39], N[(x * 2.0), $MachinePrecision], N[(-9.0 * N[(t * 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}\;t \leq -4 \cdot 10^{-166}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 3.8 \cdot 10^{-67}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{+39}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if t < -4.00000000000000016e-166Initial program 94.6%
+-commutative94.6%
associate-+r-94.6%
*-commutative94.6%
cancel-sign-sub-inv94.6%
associate-*r*92.5%
distribute-lft-neg-in92.5%
*-commutative92.5%
cancel-sign-sub-inv92.5%
associate-+r-92.5%
associate-*l*93.5%
fma-define95.7%
cancel-sign-sub-inv95.7%
fma-define95.7%
distribute-lft-neg-in95.7%
distribute-rgt-neg-in95.7%
*-commutative95.7%
associate-*r*97.9%
associate-*l*97.9%
neg-mul-197.9%
associate-*r*97.9%
Simplified97.9%
Taylor expanded in t around inf 43.3%
*-commutative43.3%
associate-*r*43.2%
associate-*l*43.3%
Simplified43.3%
Taylor expanded in t around 0 43.3%
associate-*r*42.2%
Simplified42.2%
if -4.00000000000000016e-166 < t < 3.79999999999999988e-67Initial program 90.7%
+-commutative90.7%
associate-+r-90.7%
*-commutative90.7%
cancel-sign-sub-inv90.7%
associate-*r*98.5%
distribute-lft-neg-in98.5%
*-commutative98.5%
cancel-sign-sub-inv98.5%
associate-+r-98.5%
associate-*l*98.5%
fma-define98.5%
cancel-sign-sub-inv98.5%
fma-define98.5%
distribute-lft-neg-in98.5%
distribute-rgt-neg-in98.5%
*-commutative98.5%
associate-*r*90.8%
associate-*l*90.8%
neg-mul-190.8%
associate-*r*90.8%
Simplified90.8%
Taylor expanded in t around 0 85.5%
Taylor expanded in x around 0 50.7%
*-commutative50.7%
associate-*r*50.8%
Simplified50.8%
if 3.79999999999999988e-67 < t < 2.80000000000000001e39Initial program 96.5%
+-commutative96.5%
associate-+r-96.5%
*-commutative96.5%
cancel-sign-sub-inv96.5%
associate-*r*99.7%
distribute-lft-neg-in99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-+r-99.7%
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*96.6%
associate-*l*96.6%
neg-mul-196.6%
associate-*r*96.6%
Simplified96.6%
Taylor expanded in t around 0 61.7%
Taylor expanded in x around inf 34.4%
if 2.80000000000000001e39 < t Initial program 98.2%
+-commutative98.2%
associate-+r-98.2%
*-commutative98.2%
cancel-sign-sub-inv98.2%
associate-*r*87.8%
distribute-lft-neg-in87.8%
*-commutative87.8%
cancel-sign-sub-inv87.8%
associate-+r-87.8%
associate-*l*87.8%
fma-define89.4%
cancel-sign-sub-inv89.4%
fma-define89.4%
distribute-lft-neg-in89.4%
distribute-rgt-neg-in89.4%
*-commutative89.4%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around inf 64.2%
Final simplification49.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
(let* ((t_1 (* -9.0 (* t (* y z)))))
(if (<= t -4.2e-166)
t_1
(if (<= t 1.3e-68) (* a (* 27.0 b)) (if (<= t 1.8e+44) (* 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 = -9.0 * (t * (y * z));
double tmp;
if (t <= -4.2e-166) {
tmp = t_1;
} else if (t <= 1.3e-68) {
tmp = a * (27.0 * b);
} else if (t <= 1.8e+44) {
tmp = x * 2.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 (t <= (-4.2d-166)) then
tmp = t_1
else if (t <= 1.3d-68) then
tmp = a * (27.0d0 * b)
else if (t <= 1.8d+44) then
tmp = x * 2.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 (t <= -4.2e-166) {
tmp = t_1;
} else if (t <= 1.3e-68) {
tmp = a * (27.0 * b);
} else if (t <= 1.8e+44) {
tmp = x * 2.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 t <= -4.2e-166: tmp = t_1 elif t <= 1.3e-68: tmp = a * (27.0 * b) elif t <= 1.8e+44: tmp = x * 2.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 (t <= -4.2e-166) tmp = t_1; elseif (t <= 1.3e-68) tmp = Float64(a * Float64(27.0 * b)); elseif (t <= 1.8e+44) tmp = Float64(x * 2.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 (t <= -4.2e-166)
tmp = t_1;
elseif (t <= 1.3e-68)
tmp = a * (27.0 * b);
elseif (t <= 1.8e+44)
tmp = x * 2.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[t, -4.2e-166], t$95$1, If[LessEqual[t, 1.3e-68], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.8e+44], N[(x * 2.0), $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}\;t \leq -4.2 \cdot 10^{-166}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;t \leq 1.3 \cdot 10^{-68}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;t \leq 1.8 \cdot 10^{+44}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if t < -4.1999999999999999e-166 or 1.8e44 < t Initial program 96.1%
+-commutative96.1%
associate-+r-96.1%
*-commutative96.1%
cancel-sign-sub-inv96.1%
associate-*r*90.6%
distribute-lft-neg-in90.6%
*-commutative90.6%
cancel-sign-sub-inv90.6%
associate-+r-90.6%
associate-*l*91.2%
fma-define93.1%
cancel-sign-sub-inv93.1%
fma-define93.1%
distribute-lft-neg-in93.1%
distribute-rgt-neg-in93.1%
*-commutative93.1%
associate-*r*98.7%
associate-*l*98.7%
neg-mul-198.7%
associate-*r*98.7%
Simplified98.7%
Taylor expanded in t around inf 51.8%
if -4.1999999999999999e-166 < t < 1.2999999999999999e-68Initial program 90.7%
+-commutative90.7%
associate-+r-90.7%
*-commutative90.7%
cancel-sign-sub-inv90.7%
associate-*r*98.5%
distribute-lft-neg-in98.5%
*-commutative98.5%
cancel-sign-sub-inv98.5%
associate-+r-98.5%
associate-*l*98.5%
fma-define98.5%
cancel-sign-sub-inv98.5%
fma-define98.5%
distribute-lft-neg-in98.5%
distribute-rgt-neg-in98.5%
*-commutative98.5%
associate-*r*90.8%
associate-*l*90.8%
neg-mul-190.8%
associate-*r*90.8%
Simplified90.8%
Taylor expanded in t around 0 85.5%
Taylor expanded in x around 0 50.7%
*-commutative50.7%
associate-*r*50.8%
Simplified50.8%
if 1.2999999999999999e-68 < t < 1.8e44Initial program 96.5%
+-commutative96.5%
associate-+r-96.5%
*-commutative96.5%
cancel-sign-sub-inv96.5%
associate-*r*99.7%
distribute-lft-neg-in99.7%
*-commutative99.7%
cancel-sign-sub-inv99.7%
associate-+r-99.7%
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*96.6%
associate-*l*96.6%
neg-mul-196.6%
associate-*r*96.6%
Simplified96.6%
Taylor expanded in t around 0 61.7%
Taylor expanded in x around inf 34.4%
Final simplification49.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 -9.6e+94) (+ (* x 2.0) (* z (* y (* t -9.0)))) (+ (* b (* a 27.0)) (- (* x 2.0) (* t (* y (* 9.0 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 <= -9.6e+94) {
tmp = (x * 2.0) + (z * (y * (t * -9.0)));
} else {
tmp = (b * (a * 27.0)) + ((x * 2.0) - (t * (y * (9.0 * 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 <= (-9.6d+94)) then
tmp = (x * 2.0d0) + (z * (y * (t * (-9.0d0))))
else
tmp = (b * (a * 27.0d0)) + ((x * 2.0d0) - (t * (y * (9.0d0 * 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 <= -9.6e+94) {
tmp = (x * 2.0) + (z * (y * (t * -9.0)));
} else {
tmp = (b * (a * 27.0)) + ((x * 2.0) - (t * (y * (9.0 * 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 <= -9.6e+94: tmp = (x * 2.0) + (z * (y * (t * -9.0))) else: tmp = (b * (a * 27.0)) + ((x * 2.0) - (t * (y * (9.0 * 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 <= -9.6e+94) tmp = Float64(Float64(x * 2.0) + Float64(z * Float64(y * Float64(t * -9.0)))); else tmp = Float64(Float64(b * Float64(a * 27.0)) + Float64(Float64(x * 2.0) - Float64(t * Float64(y * Float64(9.0 * 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 <= -9.6e+94)
tmp = (x * 2.0) + (z * (y * (t * -9.0)));
else
tmp = (b * (a * 27.0)) + ((x * 2.0) - (t * (y * (9.0 * 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, -9.6e+94], N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(y * N[(9.0 * z), $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}\;z \leq -9.6 \cdot 10^{+94}:\\
\;\;\;\;x \cdot 2 + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right) + \left(x \cdot 2 - t \cdot \left(y \cdot \left(9 \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if z < -9.5999999999999993e94Initial program 84.1%
Taylor expanded in y around 0 84.2%
associate-*r*84.1%
*-commutative84.1%
associate-*r*84.2%
Simplified84.2%
Taylor expanded in a around 0 78.7%
*-commutative78.7%
associate-*r*78.7%
cancel-sign-sub-inv78.7%
metadata-eval78.7%
associate-*r*78.7%
*-commutative78.7%
associate-*r*86.2%
Simplified86.2%
Taylor expanded in t around 0 78.7%
associate-*r*78.8%
*-commutative78.8%
*-commutative78.8%
associate-*r*86.3%
Simplified86.3%
if -9.5999999999999993e94 < z Initial program 97.1%
Taylor expanded in y around 0 97.1%
associate-*r*97.1%
*-commutative97.1%
associate-*r*97.1%
Simplified97.1%
Final simplification95.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.26e-125) (not (<= z 1.7e-86))) (+ (* x 2.0) (* z (* -9.0 (* y t)))) (+ (* x 2.0) (* 27.0 (* a b)))))
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.26e-125) || !(z <= 1.7e-86)) {
tmp = (x * 2.0) + (z * (-9.0 * (y * t)));
} else {
tmp = (x * 2.0) + (27.0 * (a * b));
}
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.26d-125)) .or. (.not. (z <= 1.7d-86))) then
tmp = (x * 2.0d0) + (z * ((-9.0d0) * (y * t)))
else
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
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.26e-125) || !(z <= 1.7e-86)) {
tmp = (x * 2.0) + (z * (-9.0 * (y * t)));
} else {
tmp = (x * 2.0) + (27.0 * (a * b));
}
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.26e-125) or not (z <= 1.7e-86): tmp = (x * 2.0) + (z * (-9.0 * (y * t))) else: tmp = (x * 2.0) + (27.0 * (a * b)) 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.26e-125) || !(z <= 1.7e-86)) tmp = Float64(Float64(x * 2.0) + Float64(z * Float64(-9.0 * Float64(y * t)))); else tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); 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.26e-125) || ~((z <= 1.7e-86)))
tmp = (x * 2.0) + (z * (-9.0 * (y * t)));
else
tmp = (x * 2.0) + (27.0 * (a * b));
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.26e-125], N[Not[LessEqual[z, 1.7e-86]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(-9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $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.26 \cdot 10^{-125} \lor \neg \left(z \leq 1.7 \cdot 10^{-86}\right):\\
\;\;\;\;x \cdot 2 + z \cdot \left(-9 \cdot \left(y \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if z < -2.2599999999999999e-125 or 1.7e-86 < z Initial program 91.7%
Taylor expanded in y around 0 91.7%
associate-*r*91.7%
*-commutative91.7%
associate-*r*91.7%
Simplified91.7%
Taylor expanded in a around 0 73.7%
*-commutative73.7%
associate-*r*74.2%
cancel-sign-sub-inv74.2%
metadata-eval74.2%
associate-*r*73.7%
*-commutative73.7%
associate-*r*76.5%
Simplified76.5%
Taylor expanded in t around 0 73.7%
associate-*r*73.7%
*-commutative73.7%
*-commutative73.7%
associate-*r*76.4%
Simplified76.4%
Taylor expanded in y around 0 76.5%
if -2.2599999999999999e-125 < z < 1.7e-86Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*91.6%
distribute-lft-neg-in91.6%
*-commutative91.6%
cancel-sign-sub-inv91.6%
associate-+r-91.6%
associate-*l*91.6%
fma-define91.6%
cancel-sign-sub-inv91.6%
fma-define91.6%
distribute-lft-neg-in91.6%
distribute-rgt-neg-in91.6%
*-commutative91.6%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 88.2%
Final simplification80.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 (<= z -7.5e-126) (not (<= z 1.45e-86))) (+ (* x 2.0) (* -9.0 (* z (* y t)))) (+ (* x 2.0) (* 27.0 (* a b)))))
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 <= -7.5e-126) || !(z <= 1.45e-86)) {
tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
} else {
tmp = (x * 2.0) + (27.0 * (a * b));
}
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 <= (-7.5d-126)) .or. (.not. (z <= 1.45d-86))) then
tmp = (x * 2.0d0) + ((-9.0d0) * (z * (y * t)))
else
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
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 <= -7.5e-126) || !(z <= 1.45e-86)) {
tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
} else {
tmp = (x * 2.0) + (27.0 * (a * b));
}
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 <= -7.5e-126) or not (z <= 1.45e-86): tmp = (x * 2.0) + (-9.0 * (z * (y * t))) else: tmp = (x * 2.0) + (27.0 * (a * b)) 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 <= -7.5e-126) || !(z <= 1.45e-86)) tmp = Float64(Float64(x * 2.0) + Float64(-9.0 * Float64(z * Float64(y * t)))); else tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); 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 <= -7.5e-126) || ~((z <= 1.45e-86)))
tmp = (x * 2.0) + (-9.0 * (z * (y * t)));
else
tmp = (x * 2.0) + (27.0 * (a * b));
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, -7.5e-126], N[Not[LessEqual[z, 1.45e-86]], $MachinePrecision]], N[(N[(x * 2.0), $MachinePrecision] + N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $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 -7.5 \cdot 10^{-126} \lor \neg \left(z \leq 1.45 \cdot 10^{-86}\right):\\
\;\;\;\;x \cdot 2 + -9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if z < -7.49999999999999976e-126 or 1.45e-86 < z Initial program 91.7%
Taylor expanded in y around 0 91.7%
associate-*r*91.7%
*-commutative91.7%
associate-*r*91.7%
Simplified91.7%
Taylor expanded in a around 0 73.7%
*-commutative73.7%
associate-*r*74.2%
cancel-sign-sub-inv74.2%
metadata-eval74.2%
associate-*r*73.7%
*-commutative73.7%
associate-*r*76.5%
Simplified76.5%
if -7.49999999999999976e-126 < z < 1.45e-86Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*91.6%
distribute-lft-neg-in91.6%
*-commutative91.6%
cancel-sign-sub-inv91.6%
associate-+r-91.6%
associate-*l*91.6%
fma-define91.6%
cancel-sign-sub-inv91.6%
fma-define91.6%
distribute-lft-neg-in91.6%
distribute-rgt-neg-in91.6%
*-commutative91.6%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 88.2%
Final simplification80.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 (<= t -4.2e-166)
(+ (* x 2.0) (* z (* -9.0 (* y t))))
(if (<= t 3.1e+74)
(+ (* x 2.0) (* 27.0 (* a b)))
(- (* x 2.0) (* 9.0 (* t (* 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 (t <= -4.2e-166) {
tmp = (x * 2.0) + (z * (-9.0 * (y * t)));
} else if (t <= 3.1e+74) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (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 (t <= (-4.2d-166)) then
tmp = (x * 2.0d0) + (z * ((-9.0d0) * (y * t)))
else if (t <= 3.1d+74) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = (x * 2.0d0) - (9.0d0 * (t * (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 (t <= -4.2e-166) {
tmp = (x * 2.0) + (z * (-9.0 * (y * t)));
} else if (t <= 3.1e+74) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = (x * 2.0) - (9.0 * (t * (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 t <= -4.2e-166: tmp = (x * 2.0) + (z * (-9.0 * (y * t))) elif t <= 3.1e+74: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = (x * 2.0) - (9.0 * (t * (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 (t <= -4.2e-166) tmp = Float64(Float64(x * 2.0) + Float64(z * Float64(-9.0 * Float64(y * t)))); elseif (t <= 3.1e+74) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * 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 (t <= -4.2e-166)
tmp = (x * 2.0) + (z * (-9.0 * (y * t)));
elseif (t <= 3.1e+74)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = (x * 2.0) - (9.0 * (t * (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[t, -4.2e-166], N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(-9.0 * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.1e+74], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * 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}\;t \leq -4.2 \cdot 10^{-166}:\\
\;\;\;\;x \cdot 2 + z \cdot \left(-9 \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;t \leq 3.1 \cdot 10^{+74}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if t < -4.1999999999999999e-166Initial program 94.6%
Taylor expanded in y around 0 94.6%
associate-*r*94.6%
*-commutative94.6%
associate-*r*94.6%
Simplified94.6%
Taylor expanded in a around 0 72.3%
*-commutative72.3%
associate-*r*71.3%
cancel-sign-sub-inv71.3%
metadata-eval71.3%
associate-*r*72.3%
*-commutative72.3%
associate-*r*70.4%
Simplified70.4%
Taylor expanded in t around 0 72.3%
associate-*r*72.3%
*-commutative72.3%
*-commutative72.3%
associate-*r*70.3%
Simplified70.3%
Taylor expanded in y around 0 70.3%
if -4.1999999999999999e-166 < t < 3.10000000000000021e74Initial program 92.0%
+-commutative92.0%
associate-+r-92.0%
*-commutative92.0%
cancel-sign-sub-inv92.0%
associate-*r*98.0%
distribute-lft-neg-in98.0%
*-commutative98.0%
cancel-sign-sub-inv98.0%
associate-+r-98.0%
associate-*l*98.0%
fma-define98.9%
cancel-sign-sub-inv98.9%
fma-define98.9%
distribute-lft-neg-in98.9%
distribute-rgt-neg-in98.9%
*-commutative98.9%
associate-*r*92.9%
associate-*l*92.9%
neg-mul-192.9%
associate-*r*92.9%
Simplified92.9%
Taylor expanded in t around 0 77.2%
if 3.10000000000000021e74 < t Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*91.2%
associate-*l*91.2%
Simplified91.2%
Taylor expanded in a around 0 87.6%
Final simplification77.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 -1.02e-53) (* z (* y (* t -9.0))) (if (<= z 3.9e-33) (+ (* x 2.0) (* 27.0 (* a b))) (* t (* z (* y -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.02e-53) {
tmp = z * (y * (t * -9.0));
} else if (z <= 3.9e-33) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = t * (z * (y * -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.02d-53)) then
tmp = z * (y * (t * (-9.0d0)))
else if (z <= 3.9d-33) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = t * (z * (y * (-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.02e-53) {
tmp = z * (y * (t * -9.0));
} else if (z <= 3.9e-33) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = t * (z * (y * -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.02e-53: tmp = z * (y * (t * -9.0)) elif z <= 3.9e-33: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = t * (z * (y * -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.02e-53) tmp = Float64(z * Float64(y * Float64(t * -9.0))); elseif (z <= 3.9e-33) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(t * Float64(z * Float64(y * -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.02e-53)
tmp = z * (y * (t * -9.0));
elseif (z <= 3.9e-33)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = t * (z * (y * -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.02e-53], N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.9e-33], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(z * N[(y * -9.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.02 \cdot 10^{-53}:\\
\;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 3.9 \cdot 10^{-33}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(z \cdot \left(y \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -1.02000000000000002e-53Initial program 87.3%
+-commutative87.3%
associate-+r-87.3%
*-commutative87.3%
cancel-sign-sub-inv87.3%
associate-*r*95.5%
distribute-lft-neg-in95.5%
*-commutative95.5%
cancel-sign-sub-inv95.5%
associate-+r-95.5%
associate-*l*95.5%
fma-define98.4%
cancel-sign-sub-inv98.4%
fma-define98.4%
distribute-lft-neg-in98.4%
distribute-rgt-neg-in98.4%
*-commutative98.4%
associate-*r*90.2%
associate-*l*90.3%
neg-mul-190.3%
associate-*r*90.3%
Simplified90.3%
Taylor expanded in t around inf 50.8%
*-commutative50.8%
associate-*r*50.9%
associate-*l*50.9%
Simplified50.9%
Taylor expanded in t around 0 50.8%
associate-*r*57.5%
Simplified57.5%
Taylor expanded in t around 0 50.8%
associate-*r*70.7%
*-commutative70.7%
*-commutative70.7%
associate-*r*77.5%
Simplified57.5%
if -1.02000000000000002e-53 < z < 3.89999999999999974e-33Initial program 99.8%
+-commutative99.8%
associate-+r-99.8%
*-commutative99.8%
cancel-sign-sub-inv99.8%
associate-*r*91.2%
distribute-lft-neg-in91.2%
*-commutative91.2%
cancel-sign-sub-inv91.2%
associate-+r-91.2%
associate-*l*91.2%
fma-define91.2%
cancel-sign-sub-inv91.2%
fma-define91.2%
distribute-lft-neg-in91.2%
distribute-rgt-neg-in91.2%
*-commutative91.2%
associate-*r*99.8%
associate-*l*99.8%
neg-mul-199.8%
associate-*r*99.8%
Simplified99.8%
Taylor expanded in t around 0 83.1%
if 3.89999999999999974e-33 < z Initial program 92.8%
+-commutative92.8%
associate-+r-92.8%
*-commutative92.8%
cancel-sign-sub-inv92.8%
associate-*r*96.8%
distribute-lft-neg-in96.8%
*-commutative96.8%
cancel-sign-sub-inv96.8%
associate-+r-96.8%
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.9%
associate-*l*95.8%
neg-mul-195.8%
associate-*r*95.8%
Simplified95.8%
Taylor expanded in t around inf 59.9%
*-commutative59.9%
associate-*r*59.9%
*-commutative59.9%
associate-*l*60.0%
Simplified60.0%
Final simplification70.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 (+ (- (* x 2.0) (* (* y 9.0) (* z t))) (* a (* 27.0 b))))
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) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
}
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) - ((y * 9.0d0) * (z * t))) + (a * (27.0d0 * b))
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) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
}
[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) - ((y * 9.0) * (z * t))) + (a * (27.0 * b))
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(z * t))) + Float64(a * Float64(27.0 * b))) 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) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
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[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)
\end{array}
Initial program 94.6%
sub-neg94.6%
sub-neg94.6%
associate-*l*95.0%
associate-*l*95.4%
Simplified95.4%
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 (<= x -145000.0) (not (<= x 36.0))) (* x 2.0) (* a (* 27.0 b))))
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 ((x <= -145000.0) || !(x <= 36.0)) {
tmp = x * 2.0;
} else {
tmp = a * (27.0 * b);
}
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 ((x <= (-145000.0d0)) .or. (.not. (x <= 36.0d0))) then
tmp = x * 2.0d0
else
tmp = a * (27.0d0 * b)
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 ((x <= -145000.0) || !(x <= 36.0)) {
tmp = x * 2.0;
} else {
tmp = a * (27.0 * b);
}
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 (x <= -145000.0) or not (x <= 36.0): tmp = x * 2.0 else: tmp = a * (27.0 * b) 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 ((x <= -145000.0) || !(x <= 36.0)) tmp = Float64(x * 2.0); else tmp = Float64(a * Float64(27.0 * b)); 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 ((x <= -145000.0) || ~((x <= 36.0)))
tmp = x * 2.0;
else
tmp = a * (27.0 * b);
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[x, -145000.0], N[Not[LessEqual[x, 36.0]], $MachinePrecision]], N[(x * 2.0), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -145000 \lor \neg \left(x \leq 36\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if x < -145000 or 36 < x Initial program 94.5%
+-commutative94.5%
associate-+r-94.5%
*-commutative94.5%
cancel-sign-sub-inv94.5%
associate-*r*93.7%
distribute-lft-neg-in93.7%
*-commutative93.7%
cancel-sign-sub-inv93.7%
associate-+r-93.7%
associate-*l*93.7%
fma-define96.1%
cancel-sign-sub-inv96.1%
fma-define96.1%
distribute-lft-neg-in96.1%
distribute-rgt-neg-in96.1%
*-commutative96.1%
associate-*r*96.9%
associate-*l*96.9%
neg-mul-196.9%
associate-*r*96.9%
Simplified96.9%
Taylor expanded in t around 0 71.1%
Taylor expanded in x around inf 53.1%
if -145000 < x < 36Initial program 94.7%
+-commutative94.7%
associate-+r-94.7%
*-commutative94.7%
cancel-sign-sub-inv94.7%
associate-*r*94.0%
distribute-lft-neg-in94.0%
*-commutative94.0%
cancel-sign-sub-inv94.0%
associate-+r-94.0%
associate-*l*94.7%
fma-define94.7%
cancel-sign-sub-inv94.7%
fma-define94.7%
distribute-lft-neg-in94.7%
distribute-rgt-neg-in94.7%
*-commutative94.7%
associate-*r*95.5%
associate-*l*95.5%
neg-mul-195.5%
associate-*r*95.5%
Simplified95.5%
Taylor expanded in t around 0 51.9%
Taylor expanded in x around 0 44.8%
*-commutative44.8%
associate-*r*44.8%
Simplified44.8%
Final simplification48.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 (or (<= x -330000000.0) (not (<= x 40.0))) (* x 2.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 ((x <= -330000000.0) || !(x <= 40.0)) {
tmp = x * 2.0;
} else {
tmp = 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 ((x <= (-330000000.0d0)) .or. (.not. (x <= 40.0d0))) then
tmp = x * 2.0d0
else
tmp = 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 ((x <= -330000000.0) || !(x <= 40.0)) {
tmp = x * 2.0;
} else {
tmp = 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 (x <= -330000000.0) or not (x <= 40.0): tmp = x * 2.0 else: tmp = 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 ((x <= -330000000.0) || !(x <= 40.0)) tmp = Float64(x * 2.0); else tmp = 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 ((x <= -330000000.0) || ~((x <= 40.0)))
tmp = x * 2.0;
else
tmp = 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[Or[LessEqual[x, -330000000.0], N[Not[LessEqual[x, 40.0]], $MachinePrecision]], N[(x * 2.0), $MachinePrecision], N[(b * N[(a * 27.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}\;x \leq -330000000 \lor \neg \left(x \leq 40\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if x < -3.3e8 or 40 < x Initial program 94.5%
+-commutative94.5%
associate-+r-94.5%
*-commutative94.5%
cancel-sign-sub-inv94.5%
associate-*r*93.7%
distribute-lft-neg-in93.7%
*-commutative93.7%
cancel-sign-sub-inv93.7%
associate-+r-93.7%
associate-*l*93.7%
fma-define96.1%
cancel-sign-sub-inv96.1%
fma-define96.1%
distribute-lft-neg-in96.1%
distribute-rgt-neg-in96.1%
*-commutative96.1%
associate-*r*96.9%
associate-*l*96.9%
neg-mul-196.9%
associate-*r*96.9%
Simplified96.9%
Taylor expanded in t around 0 71.1%
Taylor expanded in x around inf 53.1%
if -3.3e8 < x < 40Initial program 94.7%
+-commutative94.7%
associate-+r-94.7%
*-commutative94.7%
cancel-sign-sub-inv94.7%
associate-*r*94.0%
distribute-lft-neg-in94.0%
*-commutative94.0%
cancel-sign-sub-inv94.0%
associate-+r-94.0%
associate-*l*94.7%
fma-define94.7%
cancel-sign-sub-inv94.7%
fma-define94.7%
distribute-lft-neg-in94.7%
distribute-rgt-neg-in94.7%
*-commutative94.7%
associate-*r*95.5%
associate-*l*95.5%
neg-mul-195.5%
associate-*r*95.5%
Simplified95.5%
Taylor expanded in t around 0 51.9%
Taylor expanded in b around inf 51.9%
Taylor expanded in x around 0 44.8%
Final simplification48.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 (or (<= x -64000000000.0) (not (<= x 29.0))) (* x 2.0) (* 27.0 (* a b))))
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 ((x <= -64000000000.0) || !(x <= 29.0)) {
tmp = x * 2.0;
} else {
tmp = 27.0 * (a * b);
}
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 ((x <= (-64000000000.0d0)) .or. (.not. (x <= 29.0d0))) then
tmp = x * 2.0d0
else
tmp = 27.0d0 * (a * b)
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 ((x <= -64000000000.0) || !(x <= 29.0)) {
tmp = x * 2.0;
} else {
tmp = 27.0 * (a * b);
}
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 (x <= -64000000000.0) or not (x <= 29.0): tmp = x * 2.0 else: tmp = 27.0 * (a * b) 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 ((x <= -64000000000.0) || !(x <= 29.0)) tmp = Float64(x * 2.0); else tmp = Float64(27.0 * Float64(a * b)); 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 ((x <= -64000000000.0) || ~((x <= 29.0)))
tmp = x * 2.0;
else
tmp = 27.0 * (a * b);
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[x, -64000000000.0], N[Not[LessEqual[x, 29.0]], $MachinePrecision]], N[(x * 2.0), $MachinePrecision], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -64000000000 \lor \neg \left(x \leq 29\right):\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if x < -6.4e10 or 29 < x Initial program 94.5%
+-commutative94.5%
associate-+r-94.5%
*-commutative94.5%
cancel-sign-sub-inv94.5%
associate-*r*93.7%
distribute-lft-neg-in93.7%
*-commutative93.7%
cancel-sign-sub-inv93.7%
associate-+r-93.7%
associate-*l*93.7%
fma-define96.1%
cancel-sign-sub-inv96.1%
fma-define96.1%
distribute-lft-neg-in96.1%
distribute-rgt-neg-in96.1%
*-commutative96.1%
associate-*r*96.9%
associate-*l*96.9%
neg-mul-196.9%
associate-*r*96.9%
Simplified96.9%
Taylor expanded in t around 0 71.1%
Taylor expanded in x around inf 53.1%
if -6.4e10 < x < 29Initial program 94.7%
+-commutative94.7%
associate-+r-94.7%
*-commutative94.7%
cancel-sign-sub-inv94.7%
associate-*r*94.0%
distribute-lft-neg-in94.0%
*-commutative94.0%
cancel-sign-sub-inv94.0%
associate-+r-94.0%
associate-*l*94.7%
fma-define94.7%
cancel-sign-sub-inv94.7%
fma-define94.7%
distribute-lft-neg-in94.7%
distribute-rgt-neg-in94.7%
*-commutative94.7%
associate-*r*95.5%
associate-*l*95.5%
neg-mul-195.5%
associate-*r*95.5%
Simplified95.5%
Taylor expanded in a around inf 44.8%
Final simplification48.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 (* 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.6%
+-commutative94.6%
associate-+r-94.6%
*-commutative94.6%
cancel-sign-sub-inv94.6%
associate-*r*93.8%
distribute-lft-neg-in93.8%
*-commutative93.8%
cancel-sign-sub-inv93.8%
associate-+r-93.8%
associate-*l*94.2%
fma-define95.4%
cancel-sign-sub-inv95.4%
fma-define95.4%
distribute-lft-neg-in95.4%
distribute-rgt-neg-in95.4%
*-commutative95.4%
associate-*r*96.2%
associate-*l*96.2%
neg-mul-196.2%
associate-*r*96.2%
Simplified96.2%
Taylor expanded in t around 0 61.3%
Taylor expanded in x around inf 30.7%
Final simplification30.7%
(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 2024146
(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)))