
(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. 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.5e-275) (fma a (* 27.0 b) (fma x 2.0 (* y (* z (* t -9.0))))) (fma a (* 27.0 b) (fma x 2.0 (* t (* y (* z -9.0)))))))
assert(x < y && y < z && z < t && t < a && 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 <= -1.5e-275) {
tmp = fma(a, (27.0 * b), fma(x, 2.0, (y * (z * (t * -9.0)))));
} else {
tmp = fma(a, (27.0 * b), fma(x, 2.0, (t * (y * (z * -9.0)))));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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.5e-275) tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(y * Float64(z * Float64(t * -9.0))))); else tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(t * Float64(y * Float64(z * -9.0))))); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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.5e-275], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.5 \cdot 10^{-275}:\\
\;\;\;\;\mathsf{fma}\left(a, 27 \cdot b, \mathsf{fma}\left(x, 2, y \cdot \left(z \cdot \left(t \cdot -9\right)\right)\right)\right)\\
\mathbf{else}:\\
\;\;\;\;\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)\\
\end{array}
\end{array}
if z < -1.5e-275Initial program 89.4%
+-commutative89.4%
associate-+r-89.4%
*-commutative89.4%
cancel-sign-sub-inv89.4%
associate-*r*94.0%
distribute-lft-neg-in94.0%
*-commutative94.0%
cancel-sign-sub-inv94.0%
associate-+r-94.0%
associate-*l*94.1%
fma-def96.1%
fma-neg96.1%
associate-*l*96.9%
distribute-rgt-neg-in96.9%
*-commutative96.9%
associate-*l*96.9%
*-commutative96.9%
distribute-lft-neg-in96.9%
associate-*r*96.9%
Simplified96.9%
if -1.5e-275 < z Initial program 96.1%
+-commutative96.1%
associate-+r-96.1%
*-commutative96.1%
cancel-sign-sub-inv96.1%
associate-*r*96.7%
distribute-lft-neg-in96.7%
*-commutative96.7%
cancel-sign-sub-inv96.7%
associate-+r-96.7%
associate-*l*96.7%
fma-def96.7%
cancel-sign-sub-inv96.7%
fma-def96.7%
distribute-lft-neg-in96.7%
distribute-rgt-neg-in96.7%
*-commutative96.7%
associate-*r*96.0%
associate-*l*96.1%
neg-mul-196.1%
associate-*r*96.1%
Simplified96.1%
Final simplification96.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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 6.5e-231) (+ (- (* x 2.0) (* (* y 9.0) (* z t))) (* a (* 27.0 b))) (fma a (* 27.0 b) (fma x 2.0 (* t (* y (* z -9.0)))))))
assert(x < y && y < z && z < t && t < a && 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 <= 6.5e-231) {
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + (a * (27.0 * b));
} else {
tmp = fma(a, (27.0 * b), fma(x, 2.0, (t * (y * (z * -9.0)))));
}
return tmp;
}
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 <= 6.5e-231) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(z * t))) + Float64(a * Float64(27.0 * b))); else tmp = fma(a, Float64(27.0 * b), fma(x, 2.0, Float64(t * Float64(y * Float64(z * -9.0))))); end return tmp end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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, 6.5e-231], 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], N[(a * N[(27.0 * b), $MachinePrecision] + N[(x * 2.0 + N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 6.5 \cdot 10^{-231}:\\
\;\;\;\;\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\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)\\
\end{array}
\end{array}
if z < 6.5000000000000004e-231Initial program 91.2%
sub-neg91.2%
sub-neg91.2%
associate-*l*95.8%
associate-*l*95.8%
Simplified95.8%
if 6.5000000000000004e-231 < z Initial program 95.5%
+-commutative95.5%
associate-+r-95.5%
*-commutative95.5%
cancel-sign-sub-inv95.5%
associate-*r*97.0%
distribute-lft-neg-in97.0%
*-commutative97.0%
cancel-sign-sub-inv97.0%
associate-+r-97.0%
associate-*l*96.9%
fma-def96.9%
cancel-sign-sub-inv96.9%
fma-def96.9%
distribute-lft-neg-in96.9%
distribute-rgt-neg-in96.9%
*-commutative96.9%
associate-*r*95.4%
associate-*l*95.5%
neg-mul-195.5%
associate-*r*95.5%
Simplified95.5%
Final simplification95.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (* z y)))) (t_2 (* b (* a 27.0))))
(if (<= t_2 -400.0)
(+ t_2 (* x 2.0))
(if (<= t_2 5e-15) (- (* x 2.0) t_1) (- (* 27.0 (* a b)) t_1)))))assert(x < y && y < z && z < t && t < a && 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 t_1 = 9.0 * (t * (z * y));
double t_2 = b * (a * 27.0);
double tmp;
if (t_2 <= -400.0) {
tmp = t_2 + (x * 2.0);
} else if (t_2 <= 5e-15) {
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.
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) :: t_2
real(8) :: tmp
t_1 = 9.0d0 * (t * (z * y))
t_2 = b * (a * 27.0d0)
if (t_2 <= (-400.0d0)) then
tmp = t_2 + (x * 2.0d0)
else if (t_2 <= 5d-15) 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;
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 * (z * y));
double t_2 = b * (a * 27.0);
double tmp;
if (t_2 <= -400.0) {
tmp = t_2 + (x * 2.0);
} else if (t_2 <= 5e-15) {
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]) [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 * (z * y)) t_2 = b * (a * 27.0) tmp = 0 if t_2 <= -400.0: tmp = t_2 + (x * 2.0) elif t_2 <= 5e-15: 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]) 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(z * y))) t_2 = Float64(b * Float64(a * 27.0)) tmp = 0.0 if (t_2 <= -400.0) tmp = Float64(t_2 + Float64(x * 2.0)); elseif (t_2 <= 5e-15) 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])){:}
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 * (z * y));
t_2 = b * (a * 27.0);
tmp = 0.0;
if (t_2 <= -400.0)
tmp = t_2 + (x * 2.0);
elseif (t_2 <= 5e-15)
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.
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[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -400.0], N[(t$95$2 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 5e-15], 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])\\\\
[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(z \cdot y\right)\right)\\
t_2 := b \cdot \left(a \cdot 27\right)\\
\mathbf{if}\;t\_2 \leq -400:\\
\;\;\;\;t\_2 + x \cdot 2\\
\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-15}:\\
\;\;\;\;x \cdot 2 - t\_1\\
\mathbf{else}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) - t\_1\\
\end{array}
\end{array}
if (*.f64 (*.f64 a 27) b) < -400Initial program 93.4%
sub-neg93.4%
sub-neg93.4%
associate-*l*96.5%
associate-*l*96.5%
Simplified96.5%
Taylor expanded in y around 0 85.6%
*-commutative85.6%
associate-*r*85.6%
*-commutative85.6%
log1p-expm1-u36.3%
Applied egg-rr36.3%
log1p-expm1-u85.6%
associate-*r*85.6%
Applied egg-rr85.6%
if -400 < (*.f64 (*.f64 a 27) b) < 4.99999999999999999e-15Initial program 92.2%
sub-neg92.2%
sub-neg92.2%
associate-*l*96.0%
associate-*l*96.0%
Simplified96.0%
Taylor expanded in a around 0 86.3%
if 4.99999999999999999e-15 < (*.f64 (*.f64 a 27) b) Initial program 95.6%
sub-neg95.6%
sub-neg95.6%
associate-*l*97.0%
associate-*l*97.0%
Simplified97.0%
Taylor expanded in x around 0 84.4%
Final simplification85.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (* z y)))))
(if (<= z -230.0)
t_1
(if (<= z -6e-158)
(* a (* 27.0 b))
(if (<= z -5.5e-236)
(* x 2.0)
(if (<= z 3.3e-130) (* 27.0 (* a b)) t_1))))))assert(x < y && y < z && z < t && t < a && 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 t_1 = -9.0 * (t * (z * y));
double tmp;
if (z <= -230.0) {
tmp = t_1;
} else if (z <= -6e-158) {
tmp = a * (27.0 * b);
} else if (z <= -5.5e-236) {
tmp = x * 2.0;
} else if (z <= 3.3e-130) {
tmp = 27.0 * (a * b);
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 * (z * y))
if (z <= (-230.0d0)) then
tmp = t_1
else if (z <= (-6d-158)) then
tmp = a * (27.0d0 * b)
else if (z <= (-5.5d-236)) then
tmp = x * 2.0d0
else if (z <= 3.3d-130) then
tmp = 27.0d0 * (a * b)
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 * (z * y));
double tmp;
if (z <= -230.0) {
tmp = t_1;
} else if (z <= -6e-158) {
tmp = a * (27.0 * b);
} else if (z <= -5.5e-236) {
tmp = x * 2.0;
} else if (z <= 3.3e-130) {
tmp = 27.0 * (a * b);
} else {
tmp = t_1;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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 * (z * y)) tmp = 0 if z <= -230.0: tmp = t_1 elif z <= -6e-158: tmp = a * (27.0 * b) elif z <= -5.5e-236: tmp = x * 2.0 elif z <= 3.3e-130: tmp = 27.0 * (a * b) else: tmp = t_1 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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(z * y))) tmp = 0.0 if (z <= -230.0) tmp = t_1; elseif (z <= -6e-158) tmp = Float64(a * Float64(27.0 * b)); elseif (z <= -5.5e-236) tmp = Float64(x * 2.0); elseif (z <= 3.3e-130) tmp = Float64(27.0 * Float64(a * b)); else tmp = t_1; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 * (z * y));
tmp = 0.0;
if (z <= -230.0)
tmp = t_1;
elseif (z <= -6e-158)
tmp = a * (27.0 * b);
elseif (z <= -5.5e-236)
tmp = x * 2.0;
elseif (z <= 3.3e-130)
tmp = 27.0 * (a * b);
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.
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[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -230.0], t$95$1, If[LessEqual[z, -6e-158], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.5e-236], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 3.3e-130], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[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(z \cdot y\right)\right)\\
\mathbf{if}\;z \leq -230:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -6 \cdot 10^{-158}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-236}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{-130}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -230 or 3.2999999999999998e-130 < z Initial program 88.9%
sub-neg88.9%
sub-neg88.9%
associate-*l*94.6%
associate-*l*94.6%
Simplified94.6%
Taylor expanded in y around inf 48.3%
if -230 < z < -6e-158Initial program 99.9%
sub-neg99.9%
sub-neg99.9%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in a around inf 41.3%
associate-*r*41.3%
*-commutative41.3%
associate-*r*41.3%
Simplified41.3%
if -6e-158 < z < -5.49999999999999959e-236Initial program 99.5%
sub-neg99.5%
sub-neg99.5%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around inf 40.9%
if -5.49999999999999959e-236 < z < 3.2999999999999998e-130Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*98.1%
associate-*l*98.0%
Simplified98.0%
Taylor expanded in a around inf 53.3%
Final simplification47.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 -135.0)
(* -9.0 (* z (* y t)))
(if (<= z -5e-158)
(* a (* 27.0 b))
(if (<= z -3.2e-236)
(* x 2.0)
(if (<= z 4.3e-128) (* 27.0 (* a b)) (* -9.0 (* t (* z y))))))))assert(x < y && y < z && z < t && t < a && 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 <= -135.0) {
tmp = -9.0 * (z * (y * t));
} else if (z <= -5e-158) {
tmp = a * (27.0 * b);
} else if (z <= -3.2e-236) {
tmp = x * 2.0;
} else if (z <= 4.3e-128) {
tmp = 27.0 * (a * b);
} else {
tmp = -9.0 * (t * (z * y));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= (-135.0d0)) then
tmp = (-9.0d0) * (z * (y * t))
else if (z <= (-5d-158)) then
tmp = a * (27.0d0 * b)
else if (z <= (-3.2d-236)) then
tmp = x * 2.0d0
else if (z <= 4.3d-128) then
tmp = 27.0d0 * (a * b)
else
tmp = (-9.0d0) * (t * (z * y))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 <= -135.0) {
tmp = -9.0 * (z * (y * t));
} else if (z <= -5e-158) {
tmp = a * (27.0 * b);
} else if (z <= -3.2e-236) {
tmp = x * 2.0;
} else if (z <= 4.3e-128) {
tmp = 27.0 * (a * b);
} else {
tmp = -9.0 * (t * (z * y));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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 <= -135.0: tmp = -9.0 * (z * (y * t)) elif z <= -5e-158: tmp = a * (27.0 * b) elif z <= -3.2e-236: tmp = x * 2.0 elif z <= 4.3e-128: tmp = 27.0 * (a * b) else: tmp = -9.0 * (t * (z * y)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 <= -135.0) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (z <= -5e-158) tmp = Float64(a * Float64(27.0 * b)); elseif (z <= -3.2e-236) tmp = Float64(x * 2.0); elseif (z <= 4.3e-128) tmp = Float64(27.0 * Float64(a * b)); else tmp = Float64(-9.0 * Float64(t * Float64(z * y))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 <= -135.0)
tmp = -9.0 * (z * (y * t));
elseif (z <= -5e-158)
tmp = a * (27.0 * b);
elseif (z <= -3.2e-236)
tmp = x * 2.0;
elseif (z <= 4.3e-128)
tmp = 27.0 * (a * b);
else
tmp = -9.0 * (t * (z * y));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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, -135.0], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5e-158], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.2e-236], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 4.3e-128], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], N[(-9.0 * N[(t * N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -135:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq -5 \cdot 10^{-158}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;z \leq -3.2 \cdot 10^{-236}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 4.3 \cdot 10^{-128}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\end{array}
\end{array}
if z < -135Initial program 75.1%
sub-neg75.1%
sub-neg75.1%
associate-*l*90.4%
associate-*l*90.4%
Simplified90.4%
Taylor expanded in x around 0 54.6%
Taylor expanded in a around 0 46.6%
associate-*r*59.6%
Simplified59.6%
if -135 < z < -4.99999999999999972e-158Initial program 99.9%
sub-neg99.9%
sub-neg99.9%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in a around inf 41.3%
associate-*r*41.3%
*-commutative41.3%
associate-*r*41.3%
Simplified41.3%
if -4.99999999999999972e-158 < z < -3.2e-236Initial program 99.5%
sub-neg99.5%
sub-neg99.5%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around inf 40.9%
if -3.2e-236 < z < 4.29999999999999994e-128Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*98.1%
associate-*l*98.0%
Simplified98.0%
Taylor expanded in a around inf 52.4%
if 4.29999999999999994e-128 < z Initial program 94.3%
sub-neg94.3%
sub-neg94.3%
associate-*l*96.2%
associate-*l*96.2%
Simplified96.2%
Taylor expanded in y around inf 49.4%
Final simplification50.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 -75.0)
(* -9.0 (* z (* y t)))
(if (<= z -5.5e-158)
(* a (* 27.0 b))
(if (<= z -4.1e-238)
(* x 2.0)
(if (<= z 6e-128) (* 27.0 (* a b)) (* t (* y (* z -9.0))))))))assert(x < y && y < z && z < t && t < a && 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 <= -75.0) {
tmp = -9.0 * (z * (y * t));
} else if (z <= -5.5e-158) {
tmp = a * (27.0 * b);
} else if (z <= -4.1e-238) {
tmp = x * 2.0;
} else if (z <= 6e-128) {
tmp = 27.0 * (a * b);
} else {
tmp = t * (y * (z * -9.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= (-75.0d0)) then
tmp = (-9.0d0) * (z * (y * t))
else if (z <= (-5.5d-158)) then
tmp = a * (27.0d0 * b)
else if (z <= (-4.1d-238)) then
tmp = x * 2.0d0
else if (z <= 6d-128) then
tmp = 27.0d0 * (a * b)
else
tmp = t * (y * (z * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 <= -75.0) {
tmp = -9.0 * (z * (y * t));
} else if (z <= -5.5e-158) {
tmp = a * (27.0 * b);
} else if (z <= -4.1e-238) {
tmp = x * 2.0;
} else if (z <= 6e-128) {
tmp = 27.0 * (a * b);
} else {
tmp = t * (y * (z * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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 <= -75.0: tmp = -9.0 * (z * (y * t)) elif z <= -5.5e-158: tmp = a * (27.0 * b) elif z <= -4.1e-238: tmp = x * 2.0 elif z <= 6e-128: tmp = 27.0 * (a * b) else: tmp = t * (y * (z * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 <= -75.0) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (z <= -5.5e-158) tmp = Float64(a * Float64(27.0 * b)); elseif (z <= -4.1e-238) tmp = Float64(x * 2.0); elseif (z <= 6e-128) tmp = Float64(27.0 * Float64(a * b)); else tmp = Float64(t * Float64(y * Float64(z * -9.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 <= -75.0)
tmp = -9.0 * (z * (y * t));
elseif (z <= -5.5e-158)
tmp = a * (27.0 * b);
elseif (z <= -4.1e-238)
tmp = x * 2.0;
elseif (z <= 6e-128)
tmp = 27.0 * (a * b);
else
tmp = t * (y * (z * -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. 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, -75.0], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.5e-158], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.1e-238], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 6e-128], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -75:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq -5.5 \cdot 10^{-158}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;z \leq -4.1 \cdot 10^{-238}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-128}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -75Initial program 75.7%
sub-neg75.7%
sub-neg75.7%
associate-*l*90.6%
associate-*l*90.7%
Simplified90.7%
Taylor expanded in x around 0 55.7%
Taylor expanded in a around 0 45.5%
associate-*r*58.2%
Simplified58.2%
if -75 < z < -5.50000000000000025e-158Initial program 99.9%
sub-neg99.9%
sub-neg99.9%
associate-*l*99.7%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in a around inf 38.8%
associate-*r*38.8%
*-commutative38.8%
associate-*r*38.9%
Simplified38.9%
if -5.50000000000000025e-158 < z < -4.1000000000000001e-238Initial program 99.5%
sub-neg99.5%
sub-neg99.5%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around inf 40.9%
if -4.1000000000000001e-238 < z < 5.99999999999999956e-128Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*98.1%
associate-*l*98.0%
Simplified98.0%
Taylor expanded in a around inf 52.4%
if 5.99999999999999956e-128 < z Initial program 94.3%
sub-neg94.3%
sub-neg94.3%
associate-*l*96.2%
associate-*l*96.2%
Simplified96.2%
Taylor expanded in y around inf 49.4%
*-commutative49.4%
associate-*l*49.4%
*-commutative49.4%
associate-*l*49.3%
Simplified49.3%
Taylor expanded in z around 0 49.4%
*-commutative49.4%
*-commutative49.4%
*-commutative49.4%
associate-*l*49.3%
Simplified49.3%
Final simplification49.7%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (<= (* a 27.0) -5e+120)
(+ (* b (* a 27.0)) (* x 2.0))
(if (<= (* a 27.0) 1e+20)
(- (* x 2.0) (* 9.0 (* t (* z y))))
(+ (* x 2.0) (* 27.0 (* a b))))))assert(x < y && y < z && z < t && t < a && 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 ((a * 27.0) <= -5e+120) {
tmp = (b * (a * 27.0)) + (x * 2.0);
} else if ((a * 27.0) <= 1e+20) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} 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.
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 ((a * 27.0d0) <= (-5d+120)) then
tmp = (b * (a * 27.0d0)) + (x * 2.0d0)
else if ((a * 27.0d0) <= 1d+20) then
tmp = (x * 2.0d0) - (9.0d0 * (t * (z * y)))
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;
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 ((a * 27.0) <= -5e+120) {
tmp = (b * (a * 27.0)) + (x * 2.0);
} else if ((a * 27.0) <= 1e+20) {
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
} else {
tmp = (x * 2.0) + (27.0 * (a * b));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (a * 27.0) <= -5e+120: tmp = (b * (a * 27.0)) + (x * 2.0) elif (a * 27.0) <= 1e+20: tmp = (x * 2.0) - (9.0 * (t * (z * y))) else: tmp = (x * 2.0) + (27.0 * (a * b)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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(a * 27.0) <= -5e+120) tmp = Float64(Float64(b * Float64(a * 27.0)) + Float64(x * 2.0)); elseif (Float64(a * 27.0) <= 1e+20) tmp = Float64(Float64(x * 2.0) - Float64(9.0 * Float64(t * Float64(z * y)))); 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])){:}
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 ((a * 27.0) <= -5e+120)
tmp = (b * (a * 27.0)) + (x * 2.0);
elseif ((a * 27.0) <= 1e+20)
tmp = (x * 2.0) - (9.0 * (t * (z * y)));
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. 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[(a * 27.0), $MachinePrecision], -5e+120], N[(N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a * 27.0), $MachinePrecision], 1e+20], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(t * N[(z * y), $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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \cdot 27 \leq -5 \cdot 10^{+120}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right) + x \cdot 2\\
\mathbf{elif}\;a \cdot 27 \leq 10^{+20}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(t \cdot \left(z \cdot y\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\end{array}
\end{array}
if (*.f64 a 27) < -5.00000000000000019e120Initial program 97.5%
sub-neg97.5%
sub-neg97.5%
associate-*l*97.6%
associate-*l*97.6%
Simplified97.6%
Taylor expanded in y around 0 91.2%
*-commutative91.2%
associate-*r*91.4%
*-commutative91.4%
log1p-expm1-u52.0%
Applied egg-rr52.0%
log1p-expm1-u91.4%
associate-*r*91.4%
Applied egg-rr91.4%
if -5.00000000000000019e120 < (*.f64 a 27) < 1e20Initial program 92.8%
sub-neg92.8%
sub-neg92.8%
associate-*l*95.9%
associate-*l*95.8%
Simplified95.8%
Taylor expanded in a around 0 77.8%
if 1e20 < (*.f64 a 27) Initial program 92.3%
sub-neg92.3%
sub-neg92.3%
associate-*l*96.8%
associate-*l*96.9%
Simplified96.9%
Taylor expanded in y around 0 70.3%
Final simplification78.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (* a (* 27.0 b))))
(if (<= z 1e-55)
(+ t_1 (+ (* y (* z (* t -9.0))) (* x 2.0)))
(+ t_1 (- (* x 2.0) (* 9.0 (* z (* y t))))))))assert(x < y && y < z && z < t && t < a && 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 t_1 = a * (27.0 * b);
double tmp;
if (z <= 1e-55) {
tmp = t_1 + ((y * (z * (t * -9.0))) + (x * 2.0));
} else {
tmp = t_1 + ((x * 2.0) - (9.0 * (z * (y * t))));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = a * (27.0d0 * b)
if (z <= 1d-55) then
tmp = t_1 + ((y * (z * (t * (-9.0d0)))) + (x * 2.0d0))
else
tmp = t_1 + ((x * 2.0d0) - (9.0d0 * (z * (y * t))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 = a * (27.0 * b);
double tmp;
if (z <= 1e-55) {
tmp = t_1 + ((y * (z * (t * -9.0))) + (x * 2.0));
} else {
tmp = t_1 + ((x * 2.0) - (9.0 * (z * (y * t))));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = a * (27.0 * b) tmp = 0 if z <= 1e-55: tmp = t_1 + ((y * (z * (t * -9.0))) + (x * 2.0)) else: tmp = t_1 + ((x * 2.0) - (9.0 * (z * (y * t)))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(27.0 * b)) tmp = 0.0 if (z <= 1e-55) tmp = Float64(t_1 + Float64(Float64(y * Float64(z * Float64(t * -9.0))) + Float64(x * 2.0))); else tmp = Float64(t_1 + Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t))))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 = a * (27.0 * b);
tmp = 0.0;
if (z <= 1e-55)
tmp = t_1 + ((y * (z * (t * -9.0))) + (x * 2.0));
else
tmp = t_1 + ((x * 2.0) - (9.0 * (z * (y * t))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 1e-55], N[(t$95$1 + N[(N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;z \leq 10^{-55}:\\
\;\;\;\;t\_1 + \left(y \cdot \left(z \cdot \left(t \cdot -9\right)\right) + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \left(x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if z < 9.99999999999999995e-56Initial program 93.3%
sub-neg93.3%
sub-neg93.3%
associate-*l*96.8%
associate-*l*96.7%
Simplified96.7%
sub-neg96.7%
*-commutative96.7%
distribute-rgt-neg-in96.7%
*-commutative96.7%
distribute-lft-neg-in96.7%
metadata-eval96.7%
associate-*l*96.7%
associate-*r*96.8%
*-commutative96.8%
Applied egg-rr96.8%
if 9.99999999999999995e-56 < z Initial program 93.6%
sub-neg93.6%
sub-neg93.6%
associate-*l*95.8%
associate-*l*95.8%
Simplified95.8%
Taylor expanded in y around 0 93.7%
associate-*r*98.7%
*-commutative98.7%
Simplified98.7%
Final simplification97.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 (* a (* 27.0 b))))
(if (<= z 5e-57)
(+ (- (* x 2.0) (* (* y 9.0) (* z t))) t_1)
(+ t_1 (- (* x 2.0) (* 9.0 (* z (* y t))))))))assert(x < y && y < z && z < t && t < a && 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 t_1 = a * (27.0 * b);
double tmp;
if (z <= 5e-57) {
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + t_1;
} else {
tmp = t_1 + ((x * 2.0) - (9.0 * (z * (y * t))));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = a * (27.0d0 * b)
if (z <= 5d-57) then
tmp = ((x * 2.0d0) - ((y * 9.0d0) * (z * t))) + t_1
else
tmp = t_1 + ((x * 2.0d0) - (9.0d0 * (z * (y * t))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 = a * (27.0 * b);
double tmp;
if (z <= 5e-57) {
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + t_1;
} else {
tmp = t_1 + ((x * 2.0) - (9.0 * (z * (y * t))));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = a * (27.0 * b) tmp = 0 if z <= 5e-57: tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + t_1 else: tmp = t_1 + ((x * 2.0) - (9.0 * (z * (y * t)))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(27.0 * b)) tmp = 0.0 if (z <= 5e-57) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(y * 9.0) * Float64(z * t))) + t_1); else tmp = Float64(t_1 + Float64(Float64(x * 2.0) - Float64(9.0 * Float64(z * Float64(y * t))))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 = a * (27.0 * b);
tmp = 0.0;
if (z <= 5e-57)
tmp = ((x * 2.0) - ((y * 9.0) * (z * t))) + t_1;
else
tmp = t_1 + ((x * 2.0) - (9.0 * (z * (y * t))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, 5e-57], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(y * 9.0), $MachinePrecision] * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], N[(t$95$1 + N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;z \leq 5 \cdot 10^{-57}:\\
\;\;\;\;\left(x \cdot 2 - \left(y \cdot 9\right) \cdot \left(z \cdot t\right)\right) + t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_1 + \left(x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\right)\\
\end{array}
\end{array}
if z < 5.0000000000000002e-57Initial program 93.3%
sub-neg93.3%
sub-neg93.3%
associate-*l*96.8%
associate-*l*96.7%
Simplified96.7%
if 5.0000000000000002e-57 < z Initial program 93.6%
sub-neg93.6%
sub-neg93.6%
associate-*l*95.8%
associate-*l*95.8%
Simplified95.8%
Taylor expanded in y around 0 93.7%
associate-*r*98.7%
*-commutative98.7%
Simplified98.7%
Final simplification97.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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 -2e-308) (+ (* a (* 27.0 b)) (+ (* y (* z (* t -9.0))) (* x 2.0))) (+ (- (* x 2.0) (* t (* z (* y 9.0)))) (* b (* a 27.0)))))
assert(x < y && y < z && z < t && t < a && 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 <= -2e-308) {
tmp = (a * (27.0 * b)) + ((y * (z * (t * -9.0))) + (x * 2.0));
} else {
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= (-2d-308)) then
tmp = (a * (27.0d0 * b)) + ((y * (z * (t * (-9.0d0)))) + (x * 2.0d0))
else
tmp = ((x * 2.0d0) - (t * (z * (y * 9.0d0)))) + (b * (a * 27.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 <= -2e-308) {
tmp = (a * (27.0 * b)) + ((y * (z * (t * -9.0))) + (x * 2.0));
} else {
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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 <= -2e-308: tmp = (a * (27.0 * b)) + ((y * (z * (t * -9.0))) + (x * 2.0)) else: tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 <= -2e-308) tmp = Float64(Float64(a * Float64(27.0 * b)) + Float64(Float64(y * Float64(z * Float64(t * -9.0))) + Float64(x * 2.0))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(t * Float64(z * Float64(y * 9.0)))) + Float64(b * Float64(a * 27.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 <= -2e-308)
tmp = (a * (27.0 * b)) + ((y * (z * (t * -9.0))) + (x * 2.0));
else
tmp = ((x * 2.0) - (t * (z * (y * 9.0)))) + (b * (a * 27.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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, -2e-308], N[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(z * N[(y * 9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -2 \cdot 10^{-308}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right) + \left(y \cdot \left(z \cdot \left(t \cdot -9\right)\right) + x \cdot 2\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - t \cdot \left(z \cdot \left(y \cdot 9\right)\right)\right) + b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if z < -1.9999999999999998e-308Initial program 90.0%
sub-neg90.0%
sub-neg90.0%
associate-*l*95.2%
associate-*l*95.2%
Simplified95.2%
sub-neg95.2%
*-commutative95.2%
distribute-rgt-neg-in95.2%
*-commutative95.2%
distribute-lft-neg-in95.2%
metadata-eval95.2%
associate-*l*95.2%
associate-*r*95.3%
*-commutative95.3%
Applied egg-rr95.3%
if -1.9999999999999998e-308 < z Initial program 95.9%
Final simplification95.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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 -6600.0) (* -9.0 (* z (* y t))) (if (<= z 4.7e-26) (+ (* x 2.0) (* 27.0 (* a b))) (* t (* y (* z -9.0))))))
assert(x < y && y < z && z < t && t < a && 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 <= -6600.0) {
tmp = -9.0 * (z * (y * t));
} else if (z <= 4.7e-26) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = t * (y * (z * -9.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= (-6600.0d0)) then
tmp = (-9.0d0) * (z * (y * t))
else if (z <= 4.7d-26) then
tmp = (x * 2.0d0) + (27.0d0 * (a * b))
else
tmp = t * (y * (z * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 <= -6600.0) {
tmp = -9.0 * (z * (y * t));
} else if (z <= 4.7e-26) {
tmp = (x * 2.0) + (27.0 * (a * b));
} else {
tmp = t * (y * (z * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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 <= -6600.0: tmp = -9.0 * (z * (y * t)) elif z <= 4.7e-26: tmp = (x * 2.0) + (27.0 * (a * b)) else: tmp = t * (y * (z * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 <= -6600.0) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (z <= 4.7e-26) tmp = Float64(Float64(x * 2.0) + Float64(27.0 * Float64(a * b))); else tmp = Float64(t * Float64(y * Float64(z * -9.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 <= -6600.0)
tmp = -9.0 * (z * (y * t));
elseif (z <= 4.7e-26)
tmp = (x * 2.0) + (27.0 * (a * b));
else
tmp = t * (y * (z * -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. 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, -6600.0], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.7e-26], N[(N[(x * 2.0), $MachinePrecision] + N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -6600:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq 4.7 \cdot 10^{-26}:\\
\;\;\;\;x \cdot 2 + 27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -6600Initial program 75.1%
sub-neg75.1%
sub-neg75.1%
associate-*l*90.4%
associate-*l*90.4%
Simplified90.4%
Taylor expanded in x around 0 54.6%
Taylor expanded in a around 0 46.6%
associate-*r*59.6%
Simplified59.6%
if -6600 < z < 4.69999999999999989e-26Initial program 99.7%
sub-neg99.7%
sub-neg99.7%
associate-*l*99.0%
associate-*l*99.0%
Simplified99.0%
Taylor expanded in y around 0 79.0%
if 4.69999999999999989e-26 < z Initial program 92.9%
sub-neg92.9%
sub-neg92.9%
associate-*l*95.3%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in y around inf 52.4%
*-commutative52.4%
associate-*l*52.4%
*-commutative52.4%
associate-*l*52.4%
Simplified52.4%
Taylor expanded in z around 0 52.4%
*-commutative52.4%
*-commutative52.4%
*-commutative52.4%
associate-*l*52.4%
Simplified52.4%
Final simplification67.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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 -1320.0) (* -9.0 (* z (* y t))) (if (<= z 5.2e-26) (+ (* b (* a 27.0)) (* x 2.0)) (* t (* y (* z -9.0))))))
assert(x < y && y < z && z < t && t < a && 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 <= -1320.0) {
tmp = -9.0 * (z * (y * t));
} else if (z <= 5.2e-26) {
tmp = (b * (a * 27.0)) + (x * 2.0);
} else {
tmp = t * (y * (z * -9.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= (-1320.0d0)) then
tmp = (-9.0d0) * (z * (y * t))
else if (z <= 5.2d-26) then
tmp = (b * (a * 27.0d0)) + (x * 2.0d0)
else
tmp = t * (y * (z * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 <= -1320.0) {
tmp = -9.0 * (z * (y * t));
} else if (z <= 5.2e-26) {
tmp = (b * (a * 27.0)) + (x * 2.0);
} else {
tmp = t * (y * (z * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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 <= -1320.0: tmp = -9.0 * (z * (y * t)) elif z <= 5.2e-26: tmp = (b * (a * 27.0)) + (x * 2.0) else: tmp = t * (y * (z * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 <= -1320.0) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (z <= 5.2e-26) tmp = Float64(Float64(b * Float64(a * 27.0)) + Float64(x * 2.0)); else tmp = Float64(t * Float64(y * Float64(z * -9.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 <= -1320.0)
tmp = -9.0 * (z * (y * t));
elseif (z <= 5.2e-26)
tmp = (b * (a * 27.0)) + (x * 2.0);
else
tmp = t * (y * (z * -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. 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, -1320.0], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.2e-26], N[(N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -1320:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq 5.2 \cdot 10^{-26}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -1320Initial program 75.1%
sub-neg75.1%
sub-neg75.1%
associate-*l*90.4%
associate-*l*90.4%
Simplified90.4%
Taylor expanded in x around 0 54.6%
Taylor expanded in a around 0 46.6%
associate-*r*59.6%
Simplified59.6%
if -1320 < z < 5.2000000000000002e-26Initial program 99.7%
sub-neg99.7%
sub-neg99.7%
associate-*l*99.0%
associate-*l*99.0%
Simplified99.0%
Taylor expanded in y around 0 79.0%
*-commutative79.0%
associate-*r*78.9%
*-commutative78.9%
log1p-expm1-u48.8%
Applied egg-rr48.8%
log1p-expm1-u78.9%
associate-*r*79.0%
Applied egg-rr79.0%
if 5.2000000000000002e-26 < z Initial program 92.9%
sub-neg92.9%
sub-neg92.9%
associate-*l*95.3%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in y around inf 52.4%
*-commutative52.4%
associate-*l*52.4%
*-commutative52.4%
associate-*l*52.4%
Simplified52.4%
Taylor expanded in z around 0 52.4%
*-commutative52.4%
*-commutative52.4%
*-commutative52.4%
associate-*l*52.4%
Simplified52.4%
Final simplification67.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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 (+ (* a (* 27.0 b)) (+ (* y (* z (* t -9.0))) (* x 2.0))))
assert(x < y && y < z && z < t && t < a && 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) {
return (a * (27.0 * b)) + ((y * (z * (t * -9.0))) + (x * 2.0));
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 = (a * (27.0d0 * b)) + ((y * (z * (t * (-9.0d0)))) + (x * 2.0d0))
end function
assert x < y && y < z && z < t && t < a && a < b;
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 (a * (27.0 * b)) + ((y * (z * (t * -9.0))) + (x * 2.0));
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return (a * (27.0 * b)) + ((y * (z * (t * -9.0))) + (x * 2.0))
x, y, z, t, a, b = sort([x, y, z, t, a, 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(a * Float64(27.0 * b)) + Float64(Float64(y * Float64(z * Float64(t * -9.0))) + Float64(x * 2.0))) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = (a * (27.0 * b)) + ((y * (z * (t * -9.0))) + (x * 2.0));
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(N[(y * N[(z * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
a \cdot \left(27 \cdot b\right) + \left(y \cdot \left(z \cdot \left(t \cdot -9\right)\right) + x \cdot 2\right)
\end{array}
Initial program 93.4%
sub-neg93.4%
sub-neg93.4%
associate-*l*96.4%
associate-*l*96.4%
Simplified96.4%
sub-neg96.4%
*-commutative96.4%
distribute-rgt-neg-in96.4%
*-commutative96.4%
distribute-lft-neg-in96.4%
metadata-eval96.4%
associate-*l*96.4%
associate-*r*96.4%
*-commutative96.4%
Applied egg-rr96.4%
Final simplification96.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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 (<= a -1.16e+39) (not (<= a 1.05e-144))) (* 27.0 (* a b)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && 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 ((a <= -1.16e+39) || !(a <= 1.05e-144)) {
tmp = 27.0 * (a * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 ((a <= (-1.16d+39)) .or. (.not. (a <= 1.05d-144))) then
tmp = 27.0d0 * (a * b)
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 ((a <= -1.16e+39) || !(a <= 1.05e-144)) {
tmp = 27.0 * (a * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (a <= -1.16e+39) or not (a <= 1.05e-144): tmp = 27.0 * (a * b) else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 ((a <= -1.16e+39) || !(a <= 1.05e-144)) tmp = Float64(27.0 * Float64(a * b)); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 ((a <= -1.16e+39) || ~((a <= 1.05e-144)))
tmp = 27.0 * (a * b);
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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[a, -1.16e+39], N[Not[LessEqual[a, 1.05e-144]], $MachinePrecision]], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.16 \cdot 10^{+39} \lor \neg \left(a \leq 1.05 \cdot 10^{-144}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if a < -1.16000000000000003e39 or 1.0500000000000001e-144 < a Initial program 94.0%
sub-neg94.0%
sub-neg94.0%
associate-*l*95.4%
associate-*l*95.4%
Simplified95.4%
Taylor expanded in a around inf 52.8%
if -1.16000000000000003e39 < a < 1.0500000000000001e-144Initial program 92.6%
sub-neg92.6%
sub-neg92.6%
associate-*l*97.9%
associate-*l*97.9%
Simplified97.9%
Taylor expanded in x around inf 40.9%
Final simplification47.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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 (<= a -8e+38) (not (<= a 1.25e-139))) (* a (* 27.0 b)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && 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 ((a <= -8e+38) || !(a <= 1.25e-139)) {
tmp = a * (27.0 * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 ((a <= (-8d+38)) .or. (.not. (a <= 1.25d-139))) then
tmp = a * (27.0d0 * b)
else
tmp = x * 2.0d0
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 ((a <= -8e+38) || !(a <= 1.25e-139)) {
tmp = a * (27.0 * b);
} else {
tmp = x * 2.0;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if (a <= -8e+38) or not (a <= 1.25e-139): tmp = a * (27.0 * b) else: tmp = x * 2.0 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 ((a <= -8e+38) || !(a <= 1.25e-139)) tmp = Float64(a * Float64(27.0 * b)); else tmp = Float64(x * 2.0); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 ((a <= -8e+38) || ~((a <= 1.25e-139)))
tmp = a * (27.0 * b);
else
tmp = x * 2.0;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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[a, -8e+38], N[Not[LessEqual[a, 1.25e-139]], $MachinePrecision]], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], N[(x * 2.0), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8 \cdot 10^{+38} \lor \neg \left(a \leq 1.25 \cdot 10^{-139}\right):\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if a < -7.99999999999999982e38 or 1.25000000000000008e-139 < a Initial program 94.0%
sub-neg94.0%
sub-neg94.0%
associate-*l*95.3%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in a around inf 53.4%
associate-*r*53.4%
*-commutative53.4%
associate-*r*53.4%
Simplified53.4%
if -7.99999999999999982e38 < a < 1.25000000000000008e-139Initial program 92.7%
sub-neg92.7%
sub-neg92.7%
associate-*l*97.9%
associate-*l*97.9%
Simplified97.9%
Taylor expanded in x around inf 41.1%
Final simplification48.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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 (<= a -8.5e+38) (* b (* a 27.0)) (if (<= a 1.25e-139) (* x 2.0) (* a (* 27.0 b)))))
assert(x < y && y < z && z < t && t < a && 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 (a <= -8.5e+38) {
tmp = b * (a * 27.0);
} else if (a <= 1.25e-139) {
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.
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 (a <= (-8.5d+38)) then
tmp = b * (a * 27.0d0)
else if (a <= 1.25d-139) 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;
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 (a <= -8.5e+38) {
tmp = b * (a * 27.0);
} else if (a <= 1.25e-139) {
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]) [x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if a <= -8.5e+38: tmp = b * (a * 27.0) elif a <= 1.25e-139: 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]) 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 (a <= -8.5e+38) tmp = Float64(b * Float64(a * 27.0)); elseif (a <= 1.25e-139) 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])){:}
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 (a <= -8.5e+38)
tmp = b * (a * 27.0);
elseif (a <= 1.25e-139)
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. 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[a, -8.5e+38], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1.25e-139], 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])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.5 \cdot 10^{+38}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\mathbf{elif}\;a \leq 1.25 \cdot 10^{-139}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if a < -8.4999999999999997e38Initial program 95.0%
sub-neg95.0%
sub-neg95.0%
associate-*l*93.4%
associate-*l*93.3%
Simplified93.3%
Taylor expanded in x around 0 83.4%
Taylor expanded in a around inf 67.1%
associate-*r*67.3%
Simplified67.3%
if -8.4999999999999997e38 < a < 1.25000000000000008e-139Initial program 92.7%
sub-neg92.7%
sub-neg92.7%
associate-*l*97.9%
associate-*l*97.9%
Simplified97.9%
Taylor expanded in x around inf 41.1%
if 1.25000000000000008e-139 < a Initial program 93.3%
sub-neg93.3%
sub-neg93.3%
associate-*l*96.6%
associate-*l*96.6%
Simplified96.6%
Taylor expanded in a around inf 44.3%
associate-*r*44.2%
*-commutative44.2%
associate-*r*44.2%
Simplified44.2%
Final simplification48.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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);
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.
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;
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]) [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]) 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])){:}
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. 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, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x \cdot 2
\end{array}
Initial program 93.4%
sub-neg93.4%
sub-neg93.4%
associate-*l*96.4%
associate-*l*96.4%
Simplified96.4%
Taylor expanded in x around inf 28.4%
Final simplification28.4%
(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 2024026
(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)))