
(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 14 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: y, z, and t should be sorted in increasing order before calling this function. NOTE: 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+141) (fma x 2.0 (fma t (* (* y z) -9.0) (* (* a 27.0) b))) (fma a (* 27.0 b) (- (* x 2.0) (* 9.0 (* y (* z t)))))))
assert(y < z && z < t);
assert(a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (((y * 9.0) * z) <= 1e+141) {
tmp = fma(x, 2.0, fma(t, ((y * z) * -9.0), ((a * 27.0) * b)));
} else {
tmp = fma(a, (27.0 * b), ((x * 2.0) - (9.0 * (y * (z * t)))));
}
return tmp;
}
y, z, t = sort([y, z, t]) a, b = sort([a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (Float64(Float64(y * 9.0) * z) <= 1e+141) tmp = fma(x, 2.0, fma(t, Float64(Float64(y * z) * -9.0), Float64(Float64(a * 27.0) * b))); else tmp = fma(a, Float64(27.0 * b), Float64(Float64(x * 2.0) - Float64(9.0 * Float64(y * Float64(z * t))))); end return tmp end
NOTE: y, z, and t should be sorted in increasing order before calling this function. NOTE: 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+141], N[(x * 2.0 + N[(t * N[(N[(y * z), $MachinePrecision] * -9.0), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z, t] = \mathsf{sort}([y, z, t])\\
[a, b] = \mathsf{sort}([a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;\left(y \cdot 9\right) \cdot z \leq 10^{+141}:\\
\;\;\;\;\mathsf{fma}\left(x, 2, \mathsf{fma}\left(t, \left(y \cdot z\right) \cdot -9, \left(a \cdot 27\right) \cdot b\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - 9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y 9) z) < 1.00000000000000002e141Initial program 95.9%
associate-+l-95.9%
fma-neg95.9%
neg-sub095.9%
associate-+l-95.9%
neg-sub095.9%
*-commutative95.9%
distribute-rgt-neg-in95.9%
fma-def95.9%
*-commutative95.9%
associate-*r*95.9%
distribute-rgt-neg-in95.9%
*-commutative95.9%
metadata-eval95.9%
Simplified95.9%
if 1.00000000000000002e141 < (*.f64 (*.f64 y 9) z) Initial program 86.9%
+-commutative86.9%
associate-*l*86.9%
fma-def92.2%
associate-*l*97.2%
*-commutative97.2%
associate-*l*97.3%
Simplified97.3%
Final simplification96.1%
NOTE: y, z, and t should be sorted in increasing order before calling this function. NOTE: a and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (fma a (* 27.0 b) (- (* x 2.0) (* 9.0 (* y (* z t))))))
assert(y < z && z < t);
assert(a < b);
double code(double x, double y, double z, double t, double a, double b) {
return fma(a, (27.0 * b), ((x * 2.0) - (9.0 * (y * (z * t)))));
}
y, z, t = sort([y, z, t]) a, b = sort([a, b]) function code(x, y, z, t, a, b) return fma(a, Float64(27.0 * b), Float64(Float64(x * 2.0) - Float64(9.0 * Float64(y * Float64(z * t))))) end
NOTE: y, z, and t should be sorted in increasing order before calling this function. NOTE: a and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(a * N[(27.0 * b), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[y, z, t] = \mathsf{sort}([y, z, t])\\
[a, b] = \mathsf{sort}([a, b])\\
\\
\mathsf{fma}\left(a, 27 \cdot b, x \cdot 2 - 9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\right)
\end{array}
Initial program 94.5%
+-commutative94.5%
associate-*l*94.5%
fma-def96.1%
associate-*l*94.7%
*-commutative94.7%
associate-*l*94.7%
Simplified94.7%
Final simplification94.7%
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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 (* y (* z t)))) (t_2 (* 27.0 (* a b))))
(if (<= b -1.22e-53)
t_2
(if (<= b -1.76e-141)
t_1
(if (<= b -1.15e-186)
(* x 2.0)
(if (<= b -3.2e-270)
t_1
(if (<= b 8.5e-222)
(* x 2.0)
(if (<= b 4.5e+60)
t_1
(if (<= b 8.8e+183)
t_2
(if (<= b 9.5e+203) (* x 2.0) (* (* a 27.0) b)))))))))))assert(y < z && z < t);
assert(a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -9.0 * (y * (z * t));
double t_2 = 27.0 * (a * b);
double tmp;
if (b <= -1.22e-53) {
tmp = t_2;
} else if (b <= -1.76e-141) {
tmp = t_1;
} else if (b <= -1.15e-186) {
tmp = x * 2.0;
} else if (b <= -3.2e-270) {
tmp = t_1;
} else if (b <= 8.5e-222) {
tmp = x * 2.0;
} else if (b <= 4.5e+60) {
tmp = t_1;
} else if (b <= 8.8e+183) {
tmp = t_2;
} else if (b <= 9.5e+203) {
tmp = x * 2.0;
} else {
tmp = (a * 27.0) * b;
}
return tmp;
}
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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) :: t_2
real(8) :: tmp
t_1 = (-9.0d0) * (y * (z * t))
t_2 = 27.0d0 * (a * b)
if (b <= (-1.22d-53)) then
tmp = t_2
else if (b <= (-1.76d-141)) then
tmp = t_1
else if (b <= (-1.15d-186)) then
tmp = x * 2.0d0
else if (b <= (-3.2d-270)) then
tmp = t_1
else if (b <= 8.5d-222) then
tmp = x * 2.0d0
else if (b <= 4.5d+60) then
tmp = t_1
else if (b <= 8.8d+183) then
tmp = t_2
else if (b <= 9.5d+203) then
tmp = x * 2.0d0
else
tmp = (a * 27.0d0) * b
end if
code = tmp
end function
assert y < z && z < t;
assert a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = -9.0 * (y * (z * t));
double t_2 = 27.0 * (a * b);
double tmp;
if (b <= -1.22e-53) {
tmp = t_2;
} else if (b <= -1.76e-141) {
tmp = t_1;
} else if (b <= -1.15e-186) {
tmp = x * 2.0;
} else if (b <= -3.2e-270) {
tmp = t_1;
} else if (b <= 8.5e-222) {
tmp = x * 2.0;
} else if (b <= 4.5e+60) {
tmp = t_1;
} else if (b <= 8.8e+183) {
tmp = t_2;
} else if (b <= 9.5e+203) {
tmp = x * 2.0;
} else {
tmp = (a * 27.0) * b;
}
return tmp;
}
[y, z, t] = sort([y, z, t]) [a, b] = sort([a, b]) def code(x, y, z, t, a, b): t_1 = -9.0 * (y * (z * t)) t_2 = 27.0 * (a * b) tmp = 0 if b <= -1.22e-53: tmp = t_2 elif b <= -1.76e-141: tmp = t_1 elif b <= -1.15e-186: tmp = x * 2.0 elif b <= -3.2e-270: tmp = t_1 elif b <= 8.5e-222: tmp = x * 2.0 elif b <= 4.5e+60: tmp = t_1 elif b <= 8.8e+183: tmp = t_2 elif b <= 9.5e+203: tmp = x * 2.0 else: tmp = (a * 27.0) * b return tmp
y, z, t = sort([y, z, t]) a, b = sort([a, b]) function code(x, y, z, t, a, b) t_1 = Float64(-9.0 * Float64(y * Float64(z * t))) t_2 = Float64(27.0 * Float64(a * b)) tmp = 0.0 if (b <= -1.22e-53) tmp = t_2; elseif (b <= -1.76e-141) tmp = t_1; elseif (b <= -1.15e-186) tmp = Float64(x * 2.0); elseif (b <= -3.2e-270) tmp = t_1; elseif (b <= 8.5e-222) tmp = Float64(x * 2.0); elseif (b <= 4.5e+60) tmp = t_1; elseif (b <= 8.8e+183) tmp = t_2; elseif (b <= 9.5e+203) tmp = Float64(x * 2.0); else tmp = Float64(Float64(a * 27.0) * b); end return tmp end
y, z, t = num2cell(sort([y, z, t])){:}
a, b = num2cell(sort([a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = -9.0 * (y * (z * t));
t_2 = 27.0 * (a * b);
tmp = 0.0;
if (b <= -1.22e-53)
tmp = t_2;
elseif (b <= -1.76e-141)
tmp = t_1;
elseif (b <= -1.15e-186)
tmp = x * 2.0;
elseif (b <= -3.2e-270)
tmp = t_1;
elseif (b <= 8.5e-222)
tmp = x * 2.0;
elseif (b <= 4.5e+60)
tmp = t_1;
elseif (b <= 8.8e+183)
tmp = t_2;
elseif (b <= 9.5e+203)
tmp = x * 2.0;
else
tmp = (a * 27.0) * b;
end
tmp_2 = tmp;
end
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.22e-53], t$95$2, If[LessEqual[b, -1.76e-141], t$95$1, If[LessEqual[b, -1.15e-186], N[(x * 2.0), $MachinePrecision], If[LessEqual[b, -3.2e-270], t$95$1, If[LessEqual[b, 8.5e-222], N[(x * 2.0), $MachinePrecision], If[LessEqual[b, 4.5e+60], t$95$1, If[LessEqual[b, 8.8e+183], t$95$2, If[LessEqual[b, 9.5e+203], N[(x * 2.0), $MachinePrecision], N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
[y, z, t] = \mathsf{sort}([y, z, t])\\
[a, b] = \mathsf{sort}([a, b])\\
\\
\begin{array}{l}
t_1 := -9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
t_2 := 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;b \leq -1.22 \cdot 10^{-53}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -1.76 \cdot 10^{-141}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -1.15 \cdot 10^{-186}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq -3.2 \cdot 10^{-270}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{-222}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 4.5 \cdot 10^{+60}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 8.8 \cdot 10^{+183}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{+203}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
if b < -1.22000000000000003e-53 or 4.50000000000000013e60 < b < 8.79999999999999962e183Initial program 95.0%
+-commutative95.0%
associate-*l*95.0%
fma-def98.0%
associate-*l*97.0%
*-commutative97.0%
associate-*l*97.0%
Simplified97.0%
Taylor expanded in a around inf 55.0%
if -1.22000000000000003e-53 < b < -1.76000000000000013e-141 or -1.15e-186 < b < -3.19999999999999988e-270 or 8.5000000000000003e-222 < b < 4.50000000000000013e60Initial program 95.2%
+-commutative95.2%
associate-*l*95.3%
fma-def95.3%
associate-*l*94.2%
*-commutative94.2%
associate-*l*94.2%
Simplified94.2%
Taylor expanded in y around inf 45.0%
if -1.76000000000000013e-141 < b < -1.15e-186 or -3.19999999999999988e-270 < b < 8.5000000000000003e-222 or 8.79999999999999962e183 < b < 9.4999999999999995e203Initial program 95.6%
+-commutative95.6%
associate-*l*95.5%
fma-def95.5%
associate-*l*91.3%
*-commutative91.3%
associate-*l*91.3%
Simplified91.3%
Taylor expanded in x around inf 60.4%
if 9.4999999999999995e203 < b Initial program 89.2%
+-commutative89.2%
associate-*l*89.2%
fma-def92.7%
associate-*l*92.9%
*-commutative92.9%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in x around 0 69.2%
cancel-sign-sub-inv69.2%
associate-*r*69.3%
metadata-eval69.3%
add-sqr-sqrt69.3%
associate-*r*69.3%
fma-def69.3%
add-sqr-sqrt47.3%
sqrt-unprod47.9%
swap-sqr47.9%
metadata-eval47.9%
metadata-eval47.9%
swap-sqr47.9%
sqrt-unprod39.9%
add-sqr-sqrt61.9%
*-commutative61.9%
associate-*l*61.9%
Applied egg-rr61.9%
Taylor expanded in a around inf 66.1%
*-commutative66.1%
*-commutative66.1%
associate-*l*66.3%
Simplified66.3%
Final simplification53.9%
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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 (* t (* (* y z) -9.0))) (t_2 (* 27.0 (* a b))))
(if (<= b -2.65e-54)
t_2
(if (<= b -1.75e-140)
t_1
(if (<= b -1.5e-180)
(* x 2.0)
(if (<= b -5.4e-270)
(* -9.0 (* y (* z t)))
(if (<= b 1.7e-204)
(* x 2.0)
(if (<= b 8.5e+59)
t_1
(if (<= b 8.8e+183)
t_2
(if (<= b 9.5e+203) (* x 2.0) (* (* a 27.0) b)))))))))))assert(y < z && z < t);
assert(a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * ((y * z) * -9.0);
double t_2 = 27.0 * (a * b);
double tmp;
if (b <= -2.65e-54) {
tmp = t_2;
} else if (b <= -1.75e-140) {
tmp = t_1;
} else if (b <= -1.5e-180) {
tmp = x * 2.0;
} else if (b <= -5.4e-270) {
tmp = -9.0 * (y * (z * t));
} else if (b <= 1.7e-204) {
tmp = x * 2.0;
} else if (b <= 8.5e+59) {
tmp = t_1;
} else if (b <= 8.8e+183) {
tmp = t_2;
} else if (b <= 9.5e+203) {
tmp = x * 2.0;
} else {
tmp = (a * 27.0) * b;
}
return tmp;
}
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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) :: t_2
real(8) :: tmp
t_1 = t * ((y * z) * (-9.0d0))
t_2 = 27.0d0 * (a * b)
if (b <= (-2.65d-54)) then
tmp = t_2
else if (b <= (-1.75d-140)) then
tmp = t_1
else if (b <= (-1.5d-180)) then
tmp = x * 2.0d0
else if (b <= (-5.4d-270)) then
tmp = (-9.0d0) * (y * (z * t))
else if (b <= 1.7d-204) then
tmp = x * 2.0d0
else if (b <= 8.5d+59) then
tmp = t_1
else if (b <= 8.8d+183) then
tmp = t_2
else if (b <= 9.5d+203) then
tmp = x * 2.0d0
else
tmp = (a * 27.0d0) * b
end if
code = tmp
end function
assert y < z && z < t;
assert a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * ((y * z) * -9.0);
double t_2 = 27.0 * (a * b);
double tmp;
if (b <= -2.65e-54) {
tmp = t_2;
} else if (b <= -1.75e-140) {
tmp = t_1;
} else if (b <= -1.5e-180) {
tmp = x * 2.0;
} else if (b <= -5.4e-270) {
tmp = -9.0 * (y * (z * t));
} else if (b <= 1.7e-204) {
tmp = x * 2.0;
} else if (b <= 8.5e+59) {
tmp = t_1;
} else if (b <= 8.8e+183) {
tmp = t_2;
} else if (b <= 9.5e+203) {
tmp = x * 2.0;
} else {
tmp = (a * 27.0) * b;
}
return tmp;
}
[y, z, t] = sort([y, z, t]) [a, b] = sort([a, b]) def code(x, y, z, t, a, b): t_1 = t * ((y * z) * -9.0) t_2 = 27.0 * (a * b) tmp = 0 if b <= -2.65e-54: tmp = t_2 elif b <= -1.75e-140: tmp = t_1 elif b <= -1.5e-180: tmp = x * 2.0 elif b <= -5.4e-270: tmp = -9.0 * (y * (z * t)) elif b <= 1.7e-204: tmp = x * 2.0 elif b <= 8.5e+59: tmp = t_1 elif b <= 8.8e+183: tmp = t_2 elif b <= 9.5e+203: tmp = x * 2.0 else: tmp = (a * 27.0) * b return tmp
y, z, t = sort([y, z, t]) a, b = sort([a, b]) function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(Float64(y * z) * -9.0)) t_2 = Float64(27.0 * Float64(a * b)) tmp = 0.0 if (b <= -2.65e-54) tmp = t_2; elseif (b <= -1.75e-140) tmp = t_1; elseif (b <= -1.5e-180) tmp = Float64(x * 2.0); elseif (b <= -5.4e-270) tmp = Float64(-9.0 * Float64(y * Float64(z * t))); elseif (b <= 1.7e-204) tmp = Float64(x * 2.0); elseif (b <= 8.5e+59) tmp = t_1; elseif (b <= 8.8e+183) tmp = t_2; elseif (b <= 9.5e+203) tmp = Float64(x * 2.0); else tmp = Float64(Float64(a * 27.0) * b); end return tmp end
y, z, t = num2cell(sort([y, z, t])){:}
a, b = num2cell(sort([a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = t * ((y * z) * -9.0);
t_2 = 27.0 * (a * b);
tmp = 0.0;
if (b <= -2.65e-54)
tmp = t_2;
elseif (b <= -1.75e-140)
tmp = t_1;
elseif (b <= -1.5e-180)
tmp = x * 2.0;
elseif (b <= -5.4e-270)
tmp = -9.0 * (y * (z * t));
elseif (b <= 1.7e-204)
tmp = x * 2.0;
elseif (b <= 8.5e+59)
tmp = t_1;
elseif (b <= 8.8e+183)
tmp = t_2;
elseif (b <= 9.5e+203)
tmp = x * 2.0;
else
tmp = (a * 27.0) * b;
end
tmp_2 = tmp;
end
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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[(t * N[(N[(y * z), $MachinePrecision] * -9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.65e-54], t$95$2, If[LessEqual[b, -1.75e-140], t$95$1, If[LessEqual[b, -1.5e-180], N[(x * 2.0), $MachinePrecision], If[LessEqual[b, -5.4e-270], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.7e-204], N[(x * 2.0), $MachinePrecision], If[LessEqual[b, 8.5e+59], t$95$1, If[LessEqual[b, 8.8e+183], t$95$2, If[LessEqual[b, 9.5e+203], N[(x * 2.0), $MachinePrecision], N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
[y, z, t] = \mathsf{sort}([y, z, t])\\
[a, b] = \mathsf{sort}([a, b])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(\left(y \cdot z\right) \cdot -9\right)\\
t_2 := 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;b \leq -2.65 \cdot 10^{-54}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -1.75 \cdot 10^{-140}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -1.5 \cdot 10^{-180}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq -5.4 \cdot 10^{-270}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;b \leq 1.7 \cdot 10^{-204}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 8.5 \cdot 10^{+59}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 8.8 \cdot 10^{+183}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{+203}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
if b < -2.65000000000000028e-54 or 8.4999999999999999e59 < b < 8.79999999999999962e183Initial program 95.0%
+-commutative95.0%
associate-*l*95.0%
fma-def98.0%
associate-*l*97.0%
*-commutative97.0%
associate-*l*97.0%
Simplified97.0%
Taylor expanded in a around inf 55.0%
if -2.65000000000000028e-54 < b < -1.7499999999999999e-140 or 1.7000000000000001e-204 < b < 8.4999999999999999e59Initial program 93.4%
+-commutative93.4%
associate-*l*93.4%
fma-def93.4%
associate-*l*96.7%
*-commutative96.7%
associate-*l*96.7%
Simplified96.7%
Taylor expanded in x around 0 67.6%
Taylor expanded in a around 0 47.1%
associate-*r*47.2%
*-commutative47.2%
*-commutative47.2%
associate-*r*45.5%
*-commutative45.5%
*-commutative45.5%
associate-*l*45.5%
Simplified45.5%
if -1.7499999999999999e-140 < b < -1.5e-180 or -5.40000000000000014e-270 < b < 1.7000000000000001e-204 or 8.79999999999999962e183 < b < 9.4999999999999995e203Initial program 96.0%
+-commutative96.0%
associate-*l*95.9%
fma-def95.9%
associate-*l*90.1%
*-commutative90.1%
associate-*l*90.1%
Simplified90.1%
Taylor expanded in x around inf 59.8%
if -1.5e-180 < b < -5.40000000000000014e-270Initial program 99.8%
+-commutative99.8%
associate-*l*99.8%
fma-def99.8%
associate-*l*90.4%
*-commutative90.4%
associate-*l*90.3%
Simplified90.3%
Taylor expanded in y around inf 37.3%
if 9.4999999999999995e203 < b Initial program 89.2%
+-commutative89.2%
associate-*l*89.2%
fma-def92.7%
associate-*l*92.9%
*-commutative92.9%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in x around 0 69.2%
cancel-sign-sub-inv69.2%
associate-*r*69.3%
metadata-eval69.3%
add-sqr-sqrt69.3%
associate-*r*69.3%
fma-def69.3%
add-sqr-sqrt47.3%
sqrt-unprod47.9%
swap-sqr47.9%
metadata-eval47.9%
metadata-eval47.9%
swap-sqr47.9%
sqrt-unprod39.9%
add-sqr-sqrt61.9%
*-commutative61.9%
associate-*l*61.9%
Applied egg-rr61.9%
Taylor expanded in a around inf 66.1%
*-commutative66.1%
*-commutative66.1%
associate-*l*66.3%
Simplified66.3%
Final simplification53.5%
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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 (* t (* (* y z) -9.0))) (t_2 (* 27.0 (* a b))))
(if (<= b -8.6e-52)
t_2
(if (<= b -9.5e-139)
t_1
(if (<= b -6.8e-189)
(* x 2.0)
(if (<= b -8e-270)
(* z (* y (* t -9.0)))
(if (<= b 7.5e-204)
(* x 2.0)
(if (<= b 1.12e+60)
t_1
(if (<= b 8.8e+183)
t_2
(if (<= b 9.5e+203) (* x 2.0) (* (* a 27.0) b)))))))))))assert(y < z && z < t);
assert(a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * ((y * z) * -9.0);
double t_2 = 27.0 * (a * b);
double tmp;
if (b <= -8.6e-52) {
tmp = t_2;
} else if (b <= -9.5e-139) {
tmp = t_1;
} else if (b <= -6.8e-189) {
tmp = x * 2.0;
} else if (b <= -8e-270) {
tmp = z * (y * (t * -9.0));
} else if (b <= 7.5e-204) {
tmp = x * 2.0;
} else if (b <= 1.12e+60) {
tmp = t_1;
} else if (b <= 8.8e+183) {
tmp = t_2;
} else if (b <= 9.5e+203) {
tmp = x * 2.0;
} else {
tmp = (a * 27.0) * b;
}
return tmp;
}
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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) :: t_2
real(8) :: tmp
t_1 = t * ((y * z) * (-9.0d0))
t_2 = 27.0d0 * (a * b)
if (b <= (-8.6d-52)) then
tmp = t_2
else if (b <= (-9.5d-139)) then
tmp = t_1
else if (b <= (-6.8d-189)) then
tmp = x * 2.0d0
else if (b <= (-8d-270)) then
tmp = z * (y * (t * (-9.0d0)))
else if (b <= 7.5d-204) then
tmp = x * 2.0d0
else if (b <= 1.12d+60) then
tmp = t_1
else if (b <= 8.8d+183) then
tmp = t_2
else if (b <= 9.5d+203) then
tmp = x * 2.0d0
else
tmp = (a * 27.0d0) * b
end if
code = tmp
end function
assert y < z && z < t;
assert a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = t * ((y * z) * -9.0);
double t_2 = 27.0 * (a * b);
double tmp;
if (b <= -8.6e-52) {
tmp = t_2;
} else if (b <= -9.5e-139) {
tmp = t_1;
} else if (b <= -6.8e-189) {
tmp = x * 2.0;
} else if (b <= -8e-270) {
tmp = z * (y * (t * -9.0));
} else if (b <= 7.5e-204) {
tmp = x * 2.0;
} else if (b <= 1.12e+60) {
tmp = t_1;
} else if (b <= 8.8e+183) {
tmp = t_2;
} else if (b <= 9.5e+203) {
tmp = x * 2.0;
} else {
tmp = (a * 27.0) * b;
}
return tmp;
}
[y, z, t] = sort([y, z, t]) [a, b] = sort([a, b]) def code(x, y, z, t, a, b): t_1 = t * ((y * z) * -9.0) t_2 = 27.0 * (a * b) tmp = 0 if b <= -8.6e-52: tmp = t_2 elif b <= -9.5e-139: tmp = t_1 elif b <= -6.8e-189: tmp = x * 2.0 elif b <= -8e-270: tmp = z * (y * (t * -9.0)) elif b <= 7.5e-204: tmp = x * 2.0 elif b <= 1.12e+60: tmp = t_1 elif b <= 8.8e+183: tmp = t_2 elif b <= 9.5e+203: tmp = x * 2.0 else: tmp = (a * 27.0) * b return tmp
y, z, t = sort([y, z, t]) a, b = sort([a, b]) function code(x, y, z, t, a, b) t_1 = Float64(t * Float64(Float64(y * z) * -9.0)) t_2 = Float64(27.0 * Float64(a * b)) tmp = 0.0 if (b <= -8.6e-52) tmp = t_2; elseif (b <= -9.5e-139) tmp = t_1; elseif (b <= -6.8e-189) tmp = Float64(x * 2.0); elseif (b <= -8e-270) tmp = Float64(z * Float64(y * Float64(t * -9.0))); elseif (b <= 7.5e-204) tmp = Float64(x * 2.0); elseif (b <= 1.12e+60) tmp = t_1; elseif (b <= 8.8e+183) tmp = t_2; elseif (b <= 9.5e+203) tmp = Float64(x * 2.0); else tmp = Float64(Float64(a * 27.0) * b); end return tmp end
y, z, t = num2cell(sort([y, z, t])){:}
a, b = num2cell(sort([a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = t * ((y * z) * -9.0);
t_2 = 27.0 * (a * b);
tmp = 0.0;
if (b <= -8.6e-52)
tmp = t_2;
elseif (b <= -9.5e-139)
tmp = t_1;
elseif (b <= -6.8e-189)
tmp = x * 2.0;
elseif (b <= -8e-270)
tmp = z * (y * (t * -9.0));
elseif (b <= 7.5e-204)
tmp = x * 2.0;
elseif (b <= 1.12e+60)
tmp = t_1;
elseif (b <= 8.8e+183)
tmp = t_2;
elseif (b <= 9.5e+203)
tmp = x * 2.0;
else
tmp = (a * 27.0) * b;
end
tmp_2 = tmp;
end
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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[(t * N[(N[(y * z), $MachinePrecision] * -9.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -8.6e-52], t$95$2, If[LessEqual[b, -9.5e-139], t$95$1, If[LessEqual[b, -6.8e-189], N[(x * 2.0), $MachinePrecision], If[LessEqual[b, -8e-270], N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 7.5e-204], N[(x * 2.0), $MachinePrecision], If[LessEqual[b, 1.12e+60], t$95$1, If[LessEqual[b, 8.8e+183], t$95$2, If[LessEqual[b, 9.5e+203], N[(x * 2.0), $MachinePrecision], N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]]]]]]]]]]]
\begin{array}{l}
[y, z, t] = \mathsf{sort}([y, z, t])\\
[a, b] = \mathsf{sort}([a, b])\\
\\
\begin{array}{l}
t_1 := t \cdot \left(\left(y \cdot z\right) \cdot -9\right)\\
t_2 := 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;b \leq -8.6 \cdot 10^{-52}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq -9.5 \cdot 10^{-139}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq -6.8 \cdot 10^{-189}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq -8 \cdot 10^{-270}:\\
\;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;b \leq 7.5 \cdot 10^{-204}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 1.12 \cdot 10^{+60}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 8.8 \cdot 10^{+183}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{+203}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
if b < -8.6000000000000007e-52 or 1.1199999999999999e60 < b < 8.79999999999999962e183Initial program 94.9%
+-commutative94.9%
associate-*l*94.9%
fma-def97.9%
associate-*l*97.0%
*-commutative97.0%
associate-*l*97.0%
Simplified97.0%
Taylor expanded in a around inf 54.5%
if -8.6000000000000007e-52 < b < -9.5000000000000006e-139 or 7.5000000000000003e-204 < b < 1.1199999999999999e60Initial program 93.4%
+-commutative93.4%
associate-*l*93.5%
fma-def93.5%
associate-*l*96.8%
*-commutative96.8%
associate-*l*96.7%
Simplified96.7%
Taylor expanded in x around 0 68.1%
Taylor expanded in a around 0 46.3%
associate-*r*46.4%
*-commutative46.4%
*-commutative46.4%
associate-*r*44.7%
*-commutative44.7%
*-commutative44.7%
associate-*l*44.8%
Simplified44.8%
if -9.5000000000000006e-139 < b < -6.8000000000000002e-189 or -8.0000000000000003e-270 < b < 7.5000000000000003e-204 or 8.79999999999999962e183 < b < 9.4999999999999995e203Initial program 96.1%
+-commutative96.1%
associate-*l*96.1%
fma-def96.1%
associate-*l*90.5%
*-commutative90.5%
associate-*l*90.5%
Simplified90.5%
Taylor expanded in x around inf 57.4%
if -6.8000000000000002e-189 < b < -8.0000000000000003e-270Initial program 99.8%
+-commutative99.8%
associate-*l*99.8%
fma-def99.8%
associate-*l*89.4%
*-commutative89.4%
associate-*l*89.3%
Simplified89.3%
Taylor expanded in y around inf 35.7%
*-commutative35.7%
*-commutative35.7%
associate-*r*46.2%
associate-*r*46.4%
*-commutative46.4%
associate-*l*46.0%
Simplified46.0%
if 9.4999999999999995e203 < b Initial program 89.2%
+-commutative89.2%
associate-*l*89.2%
fma-def92.7%
associate-*l*92.9%
*-commutative92.9%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in x around 0 69.2%
cancel-sign-sub-inv69.2%
associate-*r*69.3%
metadata-eval69.3%
add-sqr-sqrt69.3%
associate-*r*69.3%
fma-def69.3%
add-sqr-sqrt47.3%
sqrt-unprod47.9%
swap-sqr47.9%
metadata-eval47.9%
metadata-eval47.9%
swap-sqr47.9%
sqrt-unprod39.9%
add-sqr-sqrt61.9%
*-commutative61.9%
associate-*l*61.9%
Applied egg-rr61.9%
Taylor expanded in a around inf 66.1%
*-commutative66.1%
*-commutative66.1%
associate-*l*66.3%
Simplified66.3%
Final simplification53.5%
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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 (* a b)) (* 9.0 (* y (* z t))))))
(if (<= b -6.8e-91)
t_1
(if (<= b 2.65e-20)
(+ (* x 2.0) (* (* y z) (* t -9.0)))
(if (<= b 1.6e+165) t_1 (- (* x 2.0) (* a (* b -27.0))))))))assert(y < z && z < t);
assert(a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (27.0 * (a * b)) - (9.0 * (y * (z * t)));
double tmp;
if (b <= -6.8e-91) {
tmp = t_1;
} else if (b <= 2.65e-20) {
tmp = (x * 2.0) + ((y * z) * (t * -9.0));
} else if (b <= 1.6e+165) {
tmp = t_1;
} else {
tmp = (x * 2.0) - (a * (b * -27.0));
}
return tmp;
}
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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 * (a * b)) - (9.0d0 * (y * (z * t)))
if (b <= (-6.8d-91)) then
tmp = t_1
else if (b <= 2.65d-20) then
tmp = (x * 2.0d0) + ((y * z) * (t * (-9.0d0)))
else if (b <= 1.6d+165) then
tmp = t_1
else
tmp = (x * 2.0d0) - (a * (b * (-27.0d0)))
end if
code = tmp
end function
assert y < z && z < t;
assert a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (27.0 * (a * b)) - (9.0 * (y * (z * t)));
double tmp;
if (b <= -6.8e-91) {
tmp = t_1;
} else if (b <= 2.65e-20) {
tmp = (x * 2.0) + ((y * z) * (t * -9.0));
} else if (b <= 1.6e+165) {
tmp = t_1;
} else {
tmp = (x * 2.0) - (a * (b * -27.0));
}
return tmp;
}
[y, z, t] = sort([y, z, t]) [a, b] = sort([a, b]) def code(x, y, z, t, a, b): t_1 = (27.0 * (a * b)) - (9.0 * (y * (z * t))) tmp = 0 if b <= -6.8e-91: tmp = t_1 elif b <= 2.65e-20: tmp = (x * 2.0) + ((y * z) * (t * -9.0)) elif b <= 1.6e+165: tmp = t_1 else: tmp = (x * 2.0) - (a * (b * -27.0)) return tmp
y, z, t = sort([y, z, t]) a, b = sort([a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(27.0 * Float64(a * b)) - Float64(9.0 * Float64(y * Float64(z * t)))) tmp = 0.0 if (b <= -6.8e-91) tmp = t_1; elseif (b <= 2.65e-20) tmp = Float64(Float64(x * 2.0) + Float64(Float64(y * z) * Float64(t * -9.0))); elseif (b <= 1.6e+165) tmp = t_1; else tmp = Float64(Float64(x * 2.0) - Float64(a * Float64(b * -27.0))); end return tmp end
y, z, t = num2cell(sort([y, z, t])){:}
a, b = num2cell(sort([a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (27.0 * (a * b)) - (9.0 * (y * (z * t)));
tmp = 0.0;
if (b <= -6.8e-91)
tmp = t_1;
elseif (b <= 2.65e-20)
tmp = (x * 2.0) + ((y * z) * (t * -9.0));
elseif (b <= 1.6e+165)
tmp = t_1;
else
tmp = (x * 2.0) - (a * (b * -27.0));
end
tmp_2 = tmp;
end
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -6.8e-91], t$95$1, If[LessEqual[b, 2.65e-20], N[(N[(x * 2.0), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.6e+165], t$95$1, N[(N[(x * 2.0), $MachinePrecision] - N[(a * N[(b * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[y, z, t] = \mathsf{sort}([y, z, t])\\
[a, b] = \mathsf{sort}([a, b])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(a \cdot b\right) - 9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{if}\;b \leq -6.8 \cdot 10^{-91}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 2.65 \cdot 10^{-20}:\\
\;\;\;\;x \cdot 2 + \left(y \cdot z\right) \cdot \left(t \cdot -9\right)\\
\mathbf{elif}\;b \leq 1.6 \cdot 10^{+165}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - a \cdot \left(b \cdot -27\right)\\
\end{array}
\end{array}
if b < -6.80000000000000053e-91 or 2.6500000000000001e-20 < b < 1.6e165Initial program 96.3%
+-commutative96.3%
associate-*l*96.3%
fma-def98.9%
associate-*l*97.3%
*-commutative97.3%
associate-*l*97.3%
Simplified97.3%
Taylor expanded in x around 0 79.9%
if -6.80000000000000053e-91 < b < 2.6500000000000001e-20Initial program 94.5%
+-commutative94.5%
associate-*l*94.5%
fma-def94.5%
associate-*l*93.7%
*-commutative93.7%
associate-*l*93.6%
Simplified93.6%
Taylor expanded in a around 0 83.8%
sub-neg83.8%
*-commutative83.8%
*-commutative83.8%
*-commutative83.8%
associate-*l*83.8%
*-commutative83.8%
+-commutative83.8%
distribute-rgt-neg-in83.8%
*-commutative83.8%
distribute-rgt-neg-in83.8%
metadata-eval83.8%
associate-*r*83.8%
associate-*r*84.7%
fma-def84.7%
*-commutative84.7%
Simplified84.7%
fma-udef84.7%
Applied egg-rr84.7%
if 1.6e165 < b Initial program 89.3%
associate-+l-89.3%
sub-neg89.3%
neg-mul-189.3%
metadata-eval89.3%
metadata-eval89.3%
cancel-sign-sub-inv89.3%
metadata-eval89.3%
*-lft-identity89.3%
associate-*l*86.9%
associate-*l*86.9%
Simplified86.9%
Taylor expanded in y around 0 82.0%
*-commutative82.0%
associate-*l*82.1%
Simplified82.1%
Final simplification82.2%
NOTE: y, z, and t should be sorted in increasing order before calling this function. NOTE: a and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z -5.6e+106) (- (* x 2.0) (* 9.0 (* y (* z t)))) (+ (* (* a 27.0) b) (- (* x 2.0) (* (* (* y 9.0) z) t)))))
assert(y < z && z < t);
assert(a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5.6e+106) {
tmp = (x * 2.0) - (9.0 * (y * (z * t)));
} else {
tmp = ((a * 27.0) * b) + ((x * 2.0) - (((y * 9.0) * z) * t));
}
return tmp;
}
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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 <= (-5.6d+106)) then
tmp = (x * 2.0d0) - (9.0d0 * (y * (z * t)))
else
tmp = ((a * 27.0d0) * b) + ((x * 2.0d0) - (((y * 9.0d0) * z) * t))
end if
code = tmp
end function
assert y < z && z < t;
assert a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5.6e+106) {
tmp = (x * 2.0) - (9.0 * (y * (z * t)));
} else {
tmp = ((a * 27.0) * b) + ((x * 2.0) - (((y * 9.0) * z) * t));
}
return tmp;
}
[y, z, t] = sort([y, z, t]) [a, b] = sort([a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -5.6e+106: tmp = (x * 2.0) - (9.0 * (y * (z * t))) else: tmp = ((a * 27.0) * b) + ((x * 2.0) - (((y * 9.0) * z) * t)) return tmp
y, z, t = sort([y, z, t]) a, b = sort([a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5.6e+106) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(y * Float64(z * t)))); else tmp = Float64(Float64(Float64(a * 27.0) * b) + Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t))); end return tmp end
y, z, t = num2cell(sort([y, z, t])){:}
a, b = num2cell(sort([a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -5.6e+106)
tmp = (x * 2.0) - (9.0 * (y * (z * t)));
else
tmp = ((a * 27.0) * b) + ((x * 2.0) - (((y * 9.0) * z) * t));
end
tmp_2 = tmp;
end
NOTE: y, z, and t should be sorted in increasing order before calling this function. NOTE: a and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5.6e+106], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z, t] = \mathsf{sort}([y, z, t])\\
[a, b] = \mathsf{sort}([a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.6 \cdot 10^{+106}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\\
\end{array}
\end{array}
if z < -5.59999999999999986e106Initial program 85.9%
+-commutative85.9%
associate-*l*85.9%
fma-def85.9%
associate-*l*86.0%
*-commutative86.0%
associate-*l*85.9%
Simplified85.9%
Taylor expanded in a around 0 68.9%
if -5.59999999999999986e106 < z Initial program 95.9%
Final simplification92.3%
NOTE: y, z, and t should be sorted in increasing order before calling this function. NOTE: a and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z -5e-211) (+ (* x 2.0) (- (* a (* 27.0 b)) (* (* y 9.0) (* z t)))) (+ (* (* a 27.0) b) (- (* x 2.0) (* (* (* y 9.0) z) t)))))
assert(y < z && z < t);
assert(a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5e-211) {
tmp = (x * 2.0) + ((a * (27.0 * b)) - ((y * 9.0) * (z * t)));
} else {
tmp = ((a * 27.0) * b) + ((x * 2.0) - (((y * 9.0) * z) * t));
}
return tmp;
}
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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 <= (-5d-211)) then
tmp = (x * 2.0d0) + ((a * (27.0d0 * b)) - ((y * 9.0d0) * (z * t)))
else
tmp = ((a * 27.0d0) * b) + ((x * 2.0d0) - (((y * 9.0d0) * z) * t))
end if
code = tmp
end function
assert y < z && z < t;
assert a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -5e-211) {
tmp = (x * 2.0) + ((a * (27.0 * b)) - ((y * 9.0) * (z * t)));
} else {
tmp = ((a * 27.0) * b) + ((x * 2.0) - (((y * 9.0) * z) * t));
}
return tmp;
}
[y, z, t] = sort([y, z, t]) [a, b] = sort([a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -5e-211: tmp = (x * 2.0) + ((a * (27.0 * b)) - ((y * 9.0) * (z * t))) else: tmp = ((a * 27.0) * b) + ((x * 2.0) - (((y * 9.0) * z) * t)) return tmp
y, z, t = sort([y, z, t]) a, b = sort([a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -5e-211) tmp = Float64(Float64(x * 2.0) + Float64(Float64(a * Float64(27.0 * b)) - Float64(Float64(y * 9.0) * Float64(z * t)))); else tmp = Float64(Float64(Float64(a * 27.0) * b) + Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t))); end return tmp end
y, z, t = num2cell(sort([y, z, t])){:}
a, b = num2cell(sort([a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -5e-211)
tmp = (x * 2.0) + ((a * (27.0 * b)) - ((y * 9.0) * (z * t)));
else
tmp = ((a * 27.0) * b) + ((x * 2.0) - (((y * 9.0) * z) * t));
end
tmp_2 = tmp;
end
NOTE: y, z, and t should be sorted in increasing order before calling this function. NOTE: a and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -5e-211], N[(N[(x * 2.0), $MachinePrecision] + N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[y, z, t] = \mathsf{sort}([y, z, t])\\
[a, b] = \mathsf{sort}([a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-211}:\\
\;\;\;\;x \cdot 2 + \left(a \cdot \left(27 \cdot b\right) - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right)\\
\end{array}
\end{array}
if z < -5.0000000000000002e-211Initial program 94.7%
associate-+l-94.7%
sub-neg94.7%
neg-mul-194.7%
metadata-eval94.7%
metadata-eval94.7%
cancel-sign-sub-inv94.7%
metadata-eval94.7%
*-lft-identity94.7%
associate-*l*92.8%
associate-*l*92.8%
Simplified92.8%
if -5.0000000000000002e-211 < z Initial program 94.4%
Final simplification93.8%
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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 (- (* x 2.0) (* a (* b -27.0)))))
(if (<= z -9e-53)
(* -9.0 (* y (* z t)))
(if (<= z 2.25e-63)
t_1
(if (<= z 3.95e-23)
(* t (* (* y z) -9.0))
(if (<= z 1.6e+35) t_1 (* z (* y (* t -9.0)))))))))assert(y < z && z < t);
assert(a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * 2.0) - (a * (b * -27.0));
double tmp;
if (z <= -9e-53) {
tmp = -9.0 * (y * (z * t));
} else if (z <= 2.25e-63) {
tmp = t_1;
} else if (z <= 3.95e-23) {
tmp = t * ((y * z) * -9.0);
} else if (z <= 1.6e+35) {
tmp = t_1;
} else {
tmp = z * (y * (t * -9.0));
}
return tmp;
}
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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 = (x * 2.0d0) - (a * (b * (-27.0d0)))
if (z <= (-9d-53)) then
tmp = (-9.0d0) * (y * (z * t))
else if (z <= 2.25d-63) then
tmp = t_1
else if (z <= 3.95d-23) then
tmp = t * ((y * z) * (-9.0d0))
else if (z <= 1.6d+35) then
tmp = t_1
else
tmp = z * (y * (t * (-9.0d0)))
end if
code = tmp
end function
assert y < z && z < t;
assert a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (x * 2.0) - (a * (b * -27.0));
double tmp;
if (z <= -9e-53) {
tmp = -9.0 * (y * (z * t));
} else if (z <= 2.25e-63) {
tmp = t_1;
} else if (z <= 3.95e-23) {
tmp = t * ((y * z) * -9.0);
} else if (z <= 1.6e+35) {
tmp = t_1;
} else {
tmp = z * (y * (t * -9.0));
}
return tmp;
}
[y, z, t] = sort([y, z, t]) [a, b] = sort([a, b]) def code(x, y, z, t, a, b): t_1 = (x * 2.0) - (a * (b * -27.0)) tmp = 0 if z <= -9e-53: tmp = -9.0 * (y * (z * t)) elif z <= 2.25e-63: tmp = t_1 elif z <= 3.95e-23: tmp = t * ((y * z) * -9.0) elif z <= 1.6e+35: tmp = t_1 else: tmp = z * (y * (t * -9.0)) return tmp
y, z, t = sort([y, z, t]) a, b = sort([a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(x * 2.0) - Float64(a * Float64(b * -27.0))) tmp = 0.0 if (z <= -9e-53) tmp = Float64(-9.0 * Float64(y * Float64(z * t))); elseif (z <= 2.25e-63) tmp = t_1; elseif (z <= 3.95e-23) tmp = Float64(t * Float64(Float64(y * z) * -9.0)); elseif (z <= 1.6e+35) tmp = t_1; else tmp = Float64(z * Float64(y * Float64(t * -9.0))); end return tmp end
y, z, t = num2cell(sort([y, z, t])){:}
a, b = num2cell(sort([a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (x * 2.0) - (a * (b * -27.0));
tmp = 0.0;
if (z <= -9e-53)
tmp = -9.0 * (y * (z * t));
elseif (z <= 2.25e-63)
tmp = t_1;
elseif (z <= 3.95e-23)
tmp = t * ((y * z) * -9.0);
elseif (z <= 1.6e+35)
tmp = t_1;
else
tmp = z * (y * (t * -9.0));
end
tmp_2 = tmp;
end
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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[(x * 2.0), $MachinePrecision] - N[(a * N[(b * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -9e-53], N[(-9.0 * N[(y * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.25e-63], t$95$1, If[LessEqual[z, 3.95e-23], N[(t * N[(N[(y * z), $MachinePrecision] * -9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.6e+35], t$95$1, N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[y, z, t] = \mathsf{sort}([y, z, t])\\
[a, b] = \mathsf{sort}([a, b])\\
\\
\begin{array}{l}
t_1 := x \cdot 2 - a \cdot \left(b \cdot -27\right)\\
\mathbf{if}\;z \leq -9 \cdot 10^{-53}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(z \cdot t\right)\right)\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-63}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 3.95 \cdot 10^{-23}:\\
\;\;\;\;t \cdot \left(\left(y \cdot z\right) \cdot -9\right)\\
\mathbf{elif}\;z \leq 1.6 \cdot 10^{+35}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -8.9999999999999997e-53Initial program 91.6%
+-commutative91.6%
associate-*l*91.6%
fma-def91.6%
associate-*l*88.5%
*-commutative88.5%
associate-*l*88.5%
Simplified88.5%
Taylor expanded in y around inf 41.8%
if -8.9999999999999997e-53 < z < 2.25e-63 or 3.9500000000000002e-23 < z < 1.59999999999999991e35Initial program 98.3%
associate-+l-98.3%
sub-neg98.3%
neg-mul-198.3%
metadata-eval98.3%
metadata-eval98.3%
cancel-sign-sub-inv98.3%
metadata-eval98.3%
*-lft-identity98.3%
associate-*l*96.8%
associate-*l*96.9%
Simplified96.9%
Taylor expanded in y around 0 79.9%
*-commutative79.9%
associate-*l*80.0%
Simplified80.0%
if 2.25e-63 < z < 3.9500000000000002e-23Initial program 100.0%
+-commutative100.0%
associate-*l*100.0%
fma-def100.0%
associate-*l*100.0%
*-commutative100.0%
associate-*l*100.0%
Simplified100.0%
Taylor expanded in x around 0 71.0%
Taylor expanded in a around 0 41.8%
associate-*r*41.8%
*-commutative41.8%
*-commutative41.8%
associate-*r*41.7%
*-commutative41.7%
*-commutative41.7%
associate-*l*41.7%
Simplified41.7%
if 1.59999999999999991e35 < z Initial program 87.7%
+-commutative87.7%
associate-*l*87.7%
fma-def93.1%
associate-*l*93.3%
*-commutative93.3%
associate-*l*93.2%
Simplified93.2%
Taylor expanded in y around inf 55.0%
*-commutative55.0%
*-commutative55.0%
associate-*r*57.5%
associate-*r*57.5%
*-commutative57.5%
associate-*l*60.7%
Simplified60.7%
Final simplification65.6%
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: a and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= b -8.6e-52)
(* 27.0 (* a b))
(if (<= b 1.9e+57)
(+ (* x 2.0) (* (* y z) (* t -9.0)))
(- (* x 2.0) (* a (* b -27.0))))))assert(y < z && z < t);
assert(a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -8.6e-52) {
tmp = 27.0 * (a * b);
} else if (b <= 1.9e+57) {
tmp = (x * 2.0) + ((y * z) * (t * -9.0));
} else {
tmp = (x * 2.0) - (a * (b * -27.0));
}
return tmp;
}
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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 <= (-8.6d-52)) then
tmp = 27.0d0 * (a * b)
else if (b <= 1.9d+57) then
tmp = (x * 2.0d0) + ((y * z) * (t * (-9.0d0)))
else
tmp = (x * 2.0d0) - (a * (b * (-27.0d0)))
end if
code = tmp
end function
assert y < z && z < t;
assert a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -8.6e-52) {
tmp = 27.0 * (a * b);
} else if (b <= 1.9e+57) {
tmp = (x * 2.0) + ((y * z) * (t * -9.0));
} else {
tmp = (x * 2.0) - (a * (b * -27.0));
}
return tmp;
}
[y, z, t] = sort([y, z, t]) [a, b] = sort([a, b]) def code(x, y, z, t, a, b): tmp = 0 if b <= -8.6e-52: tmp = 27.0 * (a * b) elif b <= 1.9e+57: tmp = (x * 2.0) + ((y * z) * (t * -9.0)) else: tmp = (x * 2.0) - (a * (b * -27.0)) return tmp
y, z, t = sort([y, z, t]) a, b = sort([a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -8.6e-52) tmp = Float64(27.0 * Float64(a * b)); elseif (b <= 1.9e+57) tmp = Float64(Float64(x * 2.0) + Float64(Float64(y * z) * Float64(t * -9.0))); else tmp = Float64(Float64(x * 2.0) - Float64(a * Float64(b * -27.0))); end return tmp end
y, z, t = num2cell(sort([y, z, t])){:}
a, b = num2cell(sort([a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (b <= -8.6e-52)
tmp = 27.0 * (a * b);
elseif (b <= 1.9e+57)
tmp = (x * 2.0) + ((y * z) * (t * -9.0));
else
tmp = (x * 2.0) - (a * (b * -27.0));
end
tmp_2 = tmp;
end
NOTE: y, z, and t should be sorted in increasing order before calling this function. NOTE: a and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -8.6e-52], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.9e+57], N[(N[(x * 2.0), $MachinePrecision] + N[(N[(y * z), $MachinePrecision] * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(a * N[(b * -27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[y, z, t] = \mathsf{sort}([y, z, t])\\
[a, b] = \mathsf{sort}([a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -8.6 \cdot 10^{-52}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;b \leq 1.9 \cdot 10^{+57}:\\
\;\;\;\;x \cdot 2 + \left(y \cdot z\right) \cdot \left(t \cdot -9\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - a \cdot \left(b \cdot -27\right)\\
\end{array}
\end{array}
if b < -8.6000000000000007e-52Initial program 95.7%
+-commutative95.7%
associate-*l*95.7%
fma-def98.5%
associate-*l*95.9%
*-commutative95.9%
associate-*l*95.9%
Simplified95.9%
Taylor expanded in a around inf 50.3%
if -8.6000000000000007e-52 < b < 1.8999999999999999e57Initial program 95.2%
+-commutative95.2%
associate-*l*95.2%
fma-def95.2%
associate-*l*94.5%
*-commutative94.5%
associate-*l*94.5%
Simplified94.5%
Taylor expanded in a around 0 79.7%
sub-neg79.7%
*-commutative79.7%
*-commutative79.7%
*-commutative79.7%
associate-*l*79.7%
*-commutative79.7%
+-commutative79.7%
distribute-rgt-neg-in79.7%
*-commutative79.7%
distribute-rgt-neg-in79.7%
metadata-eval79.7%
associate-*r*79.7%
associate-*r*81.2%
fma-def81.2%
*-commutative81.2%
Simplified81.2%
fma-udef81.2%
Applied egg-rr81.2%
if 1.8999999999999999e57 < b Initial program 91.8%
associate-+l-91.8%
sub-neg91.8%
neg-mul-191.8%
metadata-eval91.8%
metadata-eval91.8%
cancel-sign-sub-inv91.8%
metadata-eval91.8%
*-lft-identity91.8%
associate-*l*90.4%
associate-*l*90.3%
Simplified90.3%
Taylor expanded in y around 0 79.5%
*-commutative79.5%
associate-*l*79.5%
Simplified79.5%
Final simplification72.1%
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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 -3.1e-103)
(and (not (<= b 1.52e-21))
(or (<= b 8.8e+183) (not (<= b 9.5e+203)))))
(* 27.0 (* a b))
(* x 2.0)))assert(y < z && z < t);
assert(a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.1e-103) || (!(b <= 1.52e-21) && ((b <= 8.8e+183) || !(b <= 9.5e+203)))) {
tmp = 27.0 * (a * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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 <= (-3.1d-103)) .or. (.not. (b <= 1.52d-21)) .and. (b <= 8.8d+183) .or. (.not. (b <= 9.5d+203))) then
tmp = 27.0d0 * (a * b)
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert y < z && z < t;
assert a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((b <= -3.1e-103) || (!(b <= 1.52e-21) && ((b <= 8.8e+183) || !(b <= 9.5e+203)))) {
tmp = 27.0 * (a * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
[y, z, t] = sort([y, z, t]) [a, b] = sort([a, b]) def code(x, y, z, t, a, b): tmp = 0 if (b <= -3.1e-103) or (not (b <= 1.52e-21) and ((b <= 8.8e+183) or not (b <= 9.5e+203))): tmp = 27.0 * (a * b) else: tmp = x * 2.0 return tmp
y, z, t = sort([y, z, t]) a, b = sort([a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if ((b <= -3.1e-103) || (!(b <= 1.52e-21) && ((b <= 8.8e+183) || !(b <= 9.5e+203)))) tmp = Float64(27.0 * Float64(a * b)); else tmp = Float64(x * 2.0); end return tmp end
y, z, t = num2cell(sort([y, z, t])){:}
a, b = num2cell(sort([a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((b <= -3.1e-103) || (~((b <= 1.52e-21)) && ((b <= 8.8e+183) || ~((b <= 9.5e+203)))))
tmp = 27.0 * (a * b);
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: y, z, and t should be sorted in increasing order before calling this function. NOTE: a and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[b, -3.1e-103], And[N[Not[LessEqual[b, 1.52e-21]], $MachinePrecision], Or[LessEqual[b, 8.8e+183], N[Not[LessEqual[b, 9.5e+203]], $MachinePrecision]]]], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]
\begin{array}{l}
[y, z, t] = \mathsf{sort}([y, z, t])\\
[a, b] = \mathsf{sort}([a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -3.1 \cdot 10^{-103} \lor \neg \left(b \leq 1.52 \cdot 10^{-21}\right) \land \left(b \leq 8.8 \cdot 10^{+183} \lor \neg \left(b \leq 9.5 \cdot 10^{+203}\right)\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if b < -3.1000000000000001e-103 or 1.52000000000000009e-21 < b < 8.79999999999999962e183 or 9.4999999999999995e203 < b Initial program 93.8%
+-commutative93.8%
associate-*l*93.9%
fma-def96.6%
associate-*l*96.6%
*-commutative96.6%
associate-*l*96.6%
Simplified96.6%
Taylor expanded in a around inf 56.3%
if -3.1000000000000001e-103 < b < 1.52000000000000009e-21 or 8.79999999999999962e183 < b < 9.4999999999999995e203Initial program 95.5%
+-commutative95.5%
associate-*l*95.5%
fma-def95.5%
associate-*l*92.1%
*-commutative92.1%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in x around inf 46.6%
Final simplification52.2%
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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 (* a b))))
(if (<= b -2.75e-84)
t_1
(if (<= b 1.06e-21)
(* x 2.0)
(if (<= b 6e+183)
t_1
(if (<= b 9.5e+203) (* x 2.0) (* a (* 27.0 b))))))))assert(y < z && z < t);
assert(a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double tmp;
if (b <= -2.75e-84) {
tmp = t_1;
} else if (b <= 1.06e-21) {
tmp = x * 2.0;
} else if (b <= 6e+183) {
tmp = t_1;
} else if (b <= 9.5e+203) {
tmp = x * 2.0;
} else {
tmp = a * (27.0 * b);
}
return tmp;
}
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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 * (a * b)
if (b <= (-2.75d-84)) then
tmp = t_1
else if (b <= 1.06d-21) then
tmp = x * 2.0d0
else if (b <= 6d+183) then
tmp = t_1
else if (b <= 9.5d+203) then
tmp = x * 2.0d0
else
tmp = a * (27.0d0 * b)
end if
code = tmp
end function
assert y < z && z < t;
assert a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double tmp;
if (b <= -2.75e-84) {
tmp = t_1;
} else if (b <= 1.06e-21) {
tmp = x * 2.0;
} else if (b <= 6e+183) {
tmp = t_1;
} else if (b <= 9.5e+203) {
tmp = x * 2.0;
} else {
tmp = a * (27.0 * b);
}
return tmp;
}
[y, z, t] = sort([y, z, t]) [a, b] = sort([a, b]) def code(x, y, z, t, a, b): t_1 = 27.0 * (a * b) tmp = 0 if b <= -2.75e-84: tmp = t_1 elif b <= 1.06e-21: tmp = x * 2.0 elif b <= 6e+183: tmp = t_1 elif b <= 9.5e+203: tmp = x * 2.0 else: tmp = a * (27.0 * b) return tmp
y, z, t = sort([y, z, t]) a, b = sort([a, b]) function code(x, y, z, t, a, b) t_1 = Float64(27.0 * Float64(a * b)) tmp = 0.0 if (b <= -2.75e-84) tmp = t_1; elseif (b <= 1.06e-21) tmp = Float64(x * 2.0); elseif (b <= 6e+183) tmp = t_1; elseif (b <= 9.5e+203) tmp = Float64(x * 2.0); else tmp = Float64(a * Float64(27.0 * b)); end return tmp end
y, z, t = num2cell(sort([y, z, t])){:}
a, b = num2cell(sort([a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = 27.0 * (a * b);
tmp = 0.0;
if (b <= -2.75e-84)
tmp = t_1;
elseif (b <= 1.06e-21)
tmp = x * 2.0;
elseif (b <= 6e+183)
tmp = t_1;
elseif (b <= 9.5e+203)
tmp = x * 2.0;
else
tmp = a * (27.0 * b);
end
tmp_2 = tmp;
end
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -2.75e-84], t$95$1, If[LessEqual[b, 1.06e-21], N[(x * 2.0), $MachinePrecision], If[LessEqual[b, 6e+183], t$95$1, If[LessEqual[b, 9.5e+203], N[(x * 2.0), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[y, z, t] = \mathsf{sort}([y, z, t])\\
[a, b] = \mathsf{sort}([a, b])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;b \leq -2.75 \cdot 10^{-84}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.06 \cdot 10^{-21}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 6 \cdot 10^{+183}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{+203}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if b < -2.7500000000000001e-84 or 1.05999999999999994e-21 < b < 5.99999999999999992e183Initial program 94.9%
+-commutative94.9%
associate-*l*95.0%
fma-def97.5%
associate-*l*97.5%
*-commutative97.5%
associate-*l*97.5%
Simplified97.5%
Taylor expanded in a around inf 54.0%
if -2.7500000000000001e-84 < b < 1.05999999999999994e-21 or 5.99999999999999992e183 < b < 9.4999999999999995e203Initial program 95.5%
+-commutative95.5%
associate-*l*95.5%
fma-def95.5%
associate-*l*92.1%
*-commutative92.1%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in x around inf 46.6%
if 9.4999999999999995e203 < b Initial program 89.2%
+-commutative89.2%
associate-*l*89.2%
fma-def92.7%
associate-*l*92.9%
*-commutative92.9%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in x around 0 69.2%
cancel-sign-sub-inv69.2%
associate-*r*69.3%
metadata-eval69.3%
add-sqr-sqrt69.3%
associate-*r*69.3%
fma-def69.3%
add-sqr-sqrt47.3%
sqrt-unprod47.9%
swap-sqr47.9%
metadata-eval47.9%
metadata-eval47.9%
swap-sqr47.9%
sqrt-unprod39.9%
add-sqr-sqrt61.9%
*-commutative61.9%
associate-*l*61.9%
Applied egg-rr61.9%
Taylor expanded in a around inf 66.1%
associate-*r*66.3%
*-commutative66.3%
associate-*l*66.2%
Simplified66.2%
Final simplification52.2%
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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 (* a b))))
(if (<= b -7.9e-87)
t_1
(if (<= b 5.2e-22)
(* x 2.0)
(if (<= b 8.8e+183)
t_1
(if (<= b 9.5e+203) (* x 2.0) (* (* a 27.0) b)))))))assert(y < z && z < t);
assert(a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double tmp;
if (b <= -7.9e-87) {
tmp = t_1;
} else if (b <= 5.2e-22) {
tmp = x * 2.0;
} else if (b <= 8.8e+183) {
tmp = t_1;
} else if (b <= 9.5e+203) {
tmp = x * 2.0;
} else {
tmp = (a * 27.0) * b;
}
return tmp;
}
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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 * (a * b)
if (b <= (-7.9d-87)) then
tmp = t_1
else if (b <= 5.2d-22) then
tmp = x * 2.0d0
else if (b <= 8.8d+183) then
tmp = t_1
else if (b <= 9.5d+203) then
tmp = x * 2.0d0
else
tmp = (a * 27.0d0) * b
end if
code = tmp
end function
assert y < z && z < t;
assert a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double tmp;
if (b <= -7.9e-87) {
tmp = t_1;
} else if (b <= 5.2e-22) {
tmp = x * 2.0;
} else if (b <= 8.8e+183) {
tmp = t_1;
} else if (b <= 9.5e+203) {
tmp = x * 2.0;
} else {
tmp = (a * 27.0) * b;
}
return tmp;
}
[y, z, t] = sort([y, z, t]) [a, b] = sort([a, b]) def code(x, y, z, t, a, b): t_1 = 27.0 * (a * b) tmp = 0 if b <= -7.9e-87: tmp = t_1 elif b <= 5.2e-22: tmp = x * 2.0 elif b <= 8.8e+183: tmp = t_1 elif b <= 9.5e+203: tmp = x * 2.0 else: tmp = (a * 27.0) * b return tmp
y, z, t = sort([y, z, t]) a, b = sort([a, b]) function code(x, y, z, t, a, b) t_1 = Float64(27.0 * Float64(a * b)) tmp = 0.0 if (b <= -7.9e-87) tmp = t_1; elseif (b <= 5.2e-22) tmp = Float64(x * 2.0); elseif (b <= 8.8e+183) tmp = t_1; elseif (b <= 9.5e+203) tmp = Float64(x * 2.0); else tmp = Float64(Float64(a * 27.0) * b); end return tmp end
y, z, t = num2cell(sort([y, z, t])){:}
a, b = num2cell(sort([a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = 27.0 * (a * b);
tmp = 0.0;
if (b <= -7.9e-87)
tmp = t_1;
elseif (b <= 5.2e-22)
tmp = x * 2.0;
elseif (b <= 8.8e+183)
tmp = t_1;
elseif (b <= 9.5e+203)
tmp = x * 2.0;
else
tmp = (a * 27.0) * b;
end
tmp_2 = tmp;
end
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -7.9e-87], t$95$1, If[LessEqual[b, 5.2e-22], N[(x * 2.0), $MachinePrecision], If[LessEqual[b, 8.8e+183], t$95$1, If[LessEqual[b, 9.5e+203], N[(x * 2.0), $MachinePrecision], N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]]]]]]
\begin{array}{l}
[y, z, t] = \mathsf{sort}([y, z, t])\\
[a, b] = \mathsf{sort}([a, b])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;b \leq -7.9 \cdot 10^{-87}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 5.2 \cdot 10^{-22}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;b \leq 8.8 \cdot 10^{+183}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{+203}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
if b < -7.90000000000000033e-87 or 5.2e-22 < b < 8.79999999999999962e183Initial program 94.9%
+-commutative94.9%
associate-*l*95.0%
fma-def97.5%
associate-*l*97.5%
*-commutative97.5%
associate-*l*97.5%
Simplified97.5%
Taylor expanded in a around inf 54.0%
if -7.90000000000000033e-87 < b < 5.2e-22 or 8.79999999999999962e183 < b < 9.4999999999999995e203Initial program 95.5%
+-commutative95.5%
associate-*l*95.5%
fma-def95.5%
associate-*l*92.1%
*-commutative92.1%
associate-*l*92.0%
Simplified92.0%
Taylor expanded in x around inf 46.6%
if 9.4999999999999995e203 < b Initial program 89.2%
+-commutative89.2%
associate-*l*89.2%
fma-def92.7%
associate-*l*92.9%
*-commutative92.9%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in x around 0 69.2%
cancel-sign-sub-inv69.2%
associate-*r*69.3%
metadata-eval69.3%
add-sqr-sqrt69.3%
associate-*r*69.3%
fma-def69.3%
add-sqr-sqrt47.3%
sqrt-unprod47.9%
swap-sqr47.9%
metadata-eval47.9%
metadata-eval47.9%
swap-sqr47.9%
sqrt-unprod39.9%
add-sqr-sqrt61.9%
*-commutative61.9%
associate-*l*61.9%
Applied egg-rr61.9%
Taylor expanded in a around inf 66.1%
*-commutative66.1%
*-commutative66.1%
associate-*l*66.3%
Simplified66.3%
Final simplification52.2%
NOTE: y, z, and t should be sorted in increasing order before calling this function. NOTE: 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(y < z && z < t);
assert(a < b);
double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
NOTE: y, z, and t should be sorted in increasing order before calling this function.
NOTE: 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 y < z && z < t;
assert a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
[y, z, t] = sort([y, z, t]) [a, b] = sort([a, b]) def code(x, y, z, t, a, b): return x * 2.0
y, z, t = sort([y, z, t]) a, b = sort([a, b]) function code(x, y, z, t, a, b) return Float64(x * 2.0) end
y, z, t = num2cell(sort([y, z, t])){:}
a, b = num2cell(sort([a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = x * 2.0;
end
NOTE: y, z, and t should be sorted in increasing order before calling this function. NOTE: 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}
[y, z, t] = \mathsf{sort}([y, z, t])\\
[a, b] = \mathsf{sort}([a, b])\\
\\
x \cdot 2
\end{array}
Initial program 94.5%
+-commutative94.5%
associate-*l*94.5%
fma-def96.1%
associate-*l*94.7%
*-commutative94.7%
associate-*l*94.7%
Simplified94.7%
Taylor expanded in x around inf 30.2%
Final simplification30.2%
(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 2023257
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:herbie-target
(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)))
(+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))