
(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 12 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 (+ (+ (* a (* 27.0 b)) (* y (* t (* z -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 * (t * (z * -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 * (t * (z * (-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 * (t * (z * -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 * (t * (z * -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(Float64(a * Float64(27.0 * b)) + Float64(y * Float64(t * Float64(z * -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 * (t * (z * -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[(N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $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])\\
\\
\left(a \cdot \left(27 \cdot b\right) + y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\right) + x \cdot 2
\end{array}
Initial program 93.9%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval96.8%
Simplified96.8%
Final simplification96.8%
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 (* 27.0 (* a b)))
(t_2 (* b (* a 27.0)))
(t_3 (* -9.0 (* y (* t z)))))
(if (<= t_2 -1e+25)
(+ t_3 t_1)
(if (<= t_2 2e+34) (+ t_3 (* x 2.0)) (+ t_1 (* 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 t_1 = 27.0 * (a * b);
double t_2 = b * (a * 27.0);
double t_3 = -9.0 * (y * (t * z));
double tmp;
if (t_2 <= -1e+25) {
tmp = t_3 + t_1;
} else if (t_2 <= 2e+34) {
tmp = t_3 + (x * 2.0);
} else {
tmp = t_1 + (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) :: t_1
real(8) :: t_2
real(8) :: t_3
real(8) :: tmp
t_1 = 27.0d0 * (a * b)
t_2 = b * (a * 27.0d0)
t_3 = (-9.0d0) * (y * (t * z))
if (t_2 <= (-1d+25)) then
tmp = t_3 + t_1
else if (t_2 <= 2d+34) then
tmp = t_3 + (x * 2.0d0)
else
tmp = t_1 + (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 t_1 = 27.0 * (a * b);
double t_2 = b * (a * 27.0);
double t_3 = -9.0 * (y * (t * z));
double tmp;
if (t_2 <= -1e+25) {
tmp = t_3 + t_1;
} else if (t_2 <= 2e+34) {
tmp = t_3 + (x * 2.0);
} else {
tmp = t_1 + (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): t_1 = 27.0 * (a * b) t_2 = b * (a * 27.0) t_3 = -9.0 * (y * (t * z)) tmp = 0 if t_2 <= -1e+25: tmp = t_3 + t_1 elif t_2 <= 2e+34: tmp = t_3 + (x * 2.0) else: tmp = t_1 + (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) t_1 = Float64(27.0 * Float64(a * b)) t_2 = Float64(b * Float64(a * 27.0)) t_3 = Float64(-9.0 * Float64(y * Float64(t * z))) tmp = 0.0 if (t_2 <= -1e+25) tmp = Float64(t_3 + t_1); elseif (t_2 <= 2e+34) tmp = Float64(t_3 + Float64(x * 2.0)); else tmp = Float64(t_1 + 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)
t_1 = 27.0 * (a * b);
t_2 = b * (a * 27.0);
t_3 = -9.0 * (y * (t * z));
tmp = 0.0;
if (t_2 <= -1e+25)
tmp = t_3 + t_1;
elseif (t_2 <= 2e+34)
tmp = t_3 + (x * 2.0);
else
tmp = t_1 + (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_] := Block[{t$95$1 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(-9.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+25], N[(t$95$3 + t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 2e+34], N[(t$95$3 + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(x * 2.0), $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 := 27 \cdot \left(a \cdot b\right)\\
t_2 := b \cdot \left(a \cdot 27\right)\\
t_3 := -9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+25}:\\
\;\;\;\;t\_3 + t\_1\\
\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+34}:\\
\;\;\;\;t\_3 + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t\_1 + x \cdot 2\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -1.00000000000000009e25Initial program 92.0%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval98.1%
Simplified98.1%
Taylor expanded in x around 0
+-lowering-+.f64N/A
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6490.3%
Simplified90.3%
if -1.00000000000000009e25 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 1.99999999999999989e34Initial program 94.3%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval96.7%
Simplified96.7%
Taylor expanded in a around 0
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6489.1%
Simplified89.1%
if 1.99999999999999989e34 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 95.3%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval95.1%
Simplified95.1%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6484.7%
Simplified84.7%
Final simplification88.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
(let* ((t_1 (* b (* a 27.0))) (t_2 (+ (* 27.0 (* a b)) (* x 2.0))))
(if (<= t_1 -1e+25)
t_2
(if (<= t_1 2e+34) (+ (* -9.0 (* y (* t z))) (* x 2.0)) t_2))))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 = b * (a * 27.0);
double t_2 = (27.0 * (a * b)) + (x * 2.0);
double tmp;
if (t_1 <= -1e+25) {
tmp = t_2;
} else if (t_1 <= 2e+34) {
tmp = (-9.0 * (y * (t * z))) + (x * 2.0);
} else {
tmp = t_2;
}
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 = b * (a * 27.0d0)
t_2 = (27.0d0 * (a * b)) + (x * 2.0d0)
if (t_1 <= (-1d+25)) then
tmp = t_2
else if (t_1 <= 2d+34) then
tmp = ((-9.0d0) * (y * (t * z))) + (x * 2.0d0)
else
tmp = t_2
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 = b * (a * 27.0);
double t_2 = (27.0 * (a * b)) + (x * 2.0);
double tmp;
if (t_1 <= -1e+25) {
tmp = t_2;
} else if (t_1 <= 2e+34) {
tmp = (-9.0 * (y * (t * z))) + (x * 2.0);
} else {
tmp = t_2;
}
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 = b * (a * 27.0) t_2 = (27.0 * (a * b)) + (x * 2.0) tmp = 0 if t_1 <= -1e+25: tmp = t_2 elif t_1 <= 2e+34: tmp = (-9.0 * (y * (t * z))) + (x * 2.0) else: tmp = t_2 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(b * Float64(a * 27.0)) t_2 = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) tmp = 0.0 if (t_1 <= -1e+25) tmp = t_2; elseif (t_1 <= 2e+34) tmp = Float64(Float64(-9.0 * Float64(y * Float64(t * z))) + Float64(x * 2.0)); else tmp = t_2; 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 = b * (a * 27.0);
t_2 = (27.0 * (a * b)) + (x * 2.0);
tmp = 0.0;
if (t_1 <= -1e+25)
tmp = t_2;
elseif (t_1 <= 2e+34)
tmp = (-9.0 * (y * (t * z))) + (x * 2.0);
else
tmp = t_2;
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[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+25], t$95$2, If[LessEqual[t$95$1, 2e+34], N[(N[(-9.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\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 := b \cdot \left(a \cdot 27\right)\\
t_2 := 27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+25}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+34}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(t \cdot z\right)\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -1.00000000000000009e25 or 1.99999999999999989e34 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 93.4%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval96.9%
Simplified96.9%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6481.6%
Simplified81.6%
if -1.00000000000000009e25 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 1.99999999999999989e34Initial program 94.3%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval96.7%
Simplified96.7%
Taylor expanded in a around 0
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6489.1%
Simplified89.1%
Final simplification86.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.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* b (* a 27.0))) (t_2 (+ (* 27.0 (* a b)) (* x 2.0))))
(if (<= t_1 -1e+17)
t_2
(if (<= t_1 2e+34) (+ (* -9.0 (* t (* y z))) (* x 2.0)) t_2))))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 = b * (a * 27.0);
double t_2 = (27.0 * (a * b)) + (x * 2.0);
double tmp;
if (t_1 <= -1e+17) {
tmp = t_2;
} else if (t_1 <= 2e+34) {
tmp = (-9.0 * (t * (y * z))) + (x * 2.0);
} else {
tmp = t_2;
}
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 = b * (a * 27.0d0)
t_2 = (27.0d0 * (a * b)) + (x * 2.0d0)
if (t_1 <= (-1d+17)) then
tmp = t_2
else if (t_1 <= 2d+34) then
tmp = ((-9.0d0) * (t * (y * z))) + (x * 2.0d0)
else
tmp = t_2
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 = b * (a * 27.0);
double t_2 = (27.0 * (a * b)) + (x * 2.0);
double tmp;
if (t_1 <= -1e+17) {
tmp = t_2;
} else if (t_1 <= 2e+34) {
tmp = (-9.0 * (t * (y * z))) + (x * 2.0);
} else {
tmp = t_2;
}
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 = b * (a * 27.0) t_2 = (27.0 * (a * b)) + (x * 2.0) tmp = 0 if t_1 <= -1e+17: tmp = t_2 elif t_1 <= 2e+34: tmp = (-9.0 * (t * (y * z))) + (x * 2.0) else: tmp = t_2 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(b * Float64(a * 27.0)) t_2 = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)) tmp = 0.0 if (t_1 <= -1e+17) tmp = t_2; elseif (t_1 <= 2e+34) tmp = Float64(Float64(-9.0 * Float64(t * Float64(y * z))) + Float64(x * 2.0)); else tmp = t_2; 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 = b * (a * 27.0);
t_2 = (27.0 * (a * b)) + (x * 2.0);
tmp = 0.0;
if (t_1 <= -1e+17)
tmp = t_2;
elseif (t_1 <= 2e+34)
tmp = (-9.0 * (t * (y * z))) + (x * 2.0);
else
tmp = t_2;
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[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+17], t$95$2, If[LessEqual[t$95$1, 2e+34], N[(N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\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 := b \cdot \left(a \cdot 27\right)\\
t_2 := 27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{+17}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+34}:\\
\;\;\;\;-9 \cdot \left(t \cdot \left(y \cdot z\right)\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if (*.f64 (*.f64 a #s(literal 27 binary64)) b) < -1e17 or 1.99999999999999989e34 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) Initial program 92.5%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval96.9%
Simplified96.9%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6480.9%
Simplified80.9%
if -1e17 < (*.f64 (*.f64 a #s(literal 27 binary64)) b) < 1.99999999999999989e34Initial program 94.9%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval96.6%
Simplified96.6%
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6498.1%
Applied egg-rr98.1%
Taylor expanded in a around 0
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6487.3%
Simplified87.3%
Final simplification84.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 -2.4e-58)
(* y (* t (* z -9.0)))
(if (<= z 4.8e-231)
(* 27.0 (* a b))
(if (<= z 5.9e-50) (* x 2.0) (* (* z -9.0) (* 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 tmp;
if (z <= -2.4e-58) {
tmp = y * (t * (z * -9.0));
} else if (z <= 4.8e-231) {
tmp = 27.0 * (a * b);
} else if (z <= 5.9e-50) {
tmp = x * 2.0;
} else {
tmp = (z * -9.0) * (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) :: tmp
if (z <= (-2.4d-58)) then
tmp = y * (t * (z * (-9.0d0)))
else if (z <= 4.8d-231) then
tmp = 27.0d0 * (a * b)
else if (z <= 5.9d-50) then
tmp = x * 2.0d0
else
tmp = (z * (-9.0d0)) * (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 tmp;
if (z <= -2.4e-58) {
tmp = y * (t * (z * -9.0));
} else if (z <= 4.8e-231) {
tmp = 27.0 * (a * b);
} else if (z <= 5.9e-50) {
tmp = x * 2.0;
} else {
tmp = (z * -9.0) * (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): tmp = 0 if z <= -2.4e-58: tmp = y * (t * (z * -9.0)) elif z <= 4.8e-231: tmp = 27.0 * (a * b) elif z <= 5.9e-50: tmp = x * 2.0 else: tmp = (z * -9.0) * (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) tmp = 0.0 if (z <= -2.4e-58) tmp = Float64(y * Float64(t * Float64(z * -9.0))); elseif (z <= 4.8e-231) tmp = Float64(27.0 * Float64(a * b)); elseif (z <= 5.9e-50) tmp = Float64(x * 2.0); else tmp = Float64(Float64(z * -9.0) * 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)
tmp = 0.0;
if (z <= -2.4e-58)
tmp = y * (t * (z * -9.0));
elseif (z <= 4.8e-231)
tmp = 27.0 * (a * b);
elseif (z <= 5.9e-50)
tmp = x * 2.0;
else
tmp = (z * -9.0) * (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_] := If[LessEqual[z, -2.4e-58], N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.8e-231], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.9e-50], N[(x * 2.0), $MachinePrecision], N[(N[(z * -9.0), $MachinePrecision] * N[(y * t), $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.4 \cdot 10^{-58}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-231}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq 5.9 \cdot 10^{-50}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot -9\right) \cdot \left(y \cdot t\right)\\
\end{array}
\end{array}
if z < -2.4000000000000001e-58Initial program 83.8%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval94.7%
Simplified94.7%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6461.8%
Simplified61.8%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6461.8%
Applied egg-rr61.8%
if -2.4000000000000001e-58 < z < 4.79999999999999983e-231Initial program 98.4%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6443.6%
Simplified43.6%
if 4.79999999999999983e-231 < z < 5.9e-50Initial program 99.8%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf
*-lowering-*.f6455.2%
Simplified55.2%
if 5.9e-50 < z Initial program 97.4%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval94.4%
Simplified94.4%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6456.3%
Simplified56.3%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6458.1%
Applied egg-rr58.1%
Final simplification55.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.
(FPCore (x y z t a b)
:precision binary64
(if (<= z -2.9e-57)
(* -9.0 (* y (* t z)))
(if (<= z 2.3e-233)
(* 27.0 (* a b))
(if (<= z 6.2e-48) (* x 2.0) (* (* z -9.0) (* 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 tmp;
if (z <= -2.9e-57) {
tmp = -9.0 * (y * (t * z));
} else if (z <= 2.3e-233) {
tmp = 27.0 * (a * b);
} else if (z <= 6.2e-48) {
tmp = x * 2.0;
} else {
tmp = (z * -9.0) * (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) :: tmp
if (z <= (-2.9d-57)) then
tmp = (-9.0d0) * (y * (t * z))
else if (z <= 2.3d-233) then
tmp = 27.0d0 * (a * b)
else if (z <= 6.2d-48) then
tmp = x * 2.0d0
else
tmp = (z * (-9.0d0)) * (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 tmp;
if (z <= -2.9e-57) {
tmp = -9.0 * (y * (t * z));
} else if (z <= 2.3e-233) {
tmp = 27.0 * (a * b);
} else if (z <= 6.2e-48) {
tmp = x * 2.0;
} else {
tmp = (z * -9.0) * (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): tmp = 0 if z <= -2.9e-57: tmp = -9.0 * (y * (t * z)) elif z <= 2.3e-233: tmp = 27.0 * (a * b) elif z <= 6.2e-48: tmp = x * 2.0 else: tmp = (z * -9.0) * (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) tmp = 0.0 if (z <= -2.9e-57) tmp = Float64(-9.0 * Float64(y * Float64(t * z))); elseif (z <= 2.3e-233) tmp = Float64(27.0 * Float64(a * b)); elseif (z <= 6.2e-48) tmp = Float64(x * 2.0); else tmp = Float64(Float64(z * -9.0) * 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)
tmp = 0.0;
if (z <= -2.9e-57)
tmp = -9.0 * (y * (t * z));
elseif (z <= 2.3e-233)
tmp = 27.0 * (a * b);
elseif (z <= 6.2e-48)
tmp = x * 2.0;
else
tmp = (z * -9.0) * (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_] := If[LessEqual[z, -2.9e-57], N[(-9.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e-233], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.2e-48], N[(x * 2.0), $MachinePrecision], N[(N[(z * -9.0), $MachinePrecision] * N[(y * t), $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.9 \cdot 10^{-57}:\\
\;\;\;\;-9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\\
\mathbf{elif}\;z \leq 2.3 \cdot 10^{-233}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq 6.2 \cdot 10^{-48}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot -9\right) \cdot \left(y \cdot t\right)\\
\end{array}
\end{array}
if z < -2.90000000000000025e-57Initial program 83.8%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval94.7%
Simplified94.7%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6461.8%
Simplified61.8%
if -2.90000000000000025e-57 < z < 2.3000000000000002e-233Initial program 98.4%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6443.6%
Simplified43.6%
if 2.3000000000000002e-233 < z < 6.20000000000000033e-48Initial program 99.8%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf
*-lowering-*.f6456.3%
Simplified56.3%
if 6.20000000000000033e-48 < z Initial program 97.3%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval94.4%
Simplified94.4%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6457.0%
Simplified57.0%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6458.8%
Applied egg-rr58.8%
Final simplification55.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
(let* ((t_1 (* -9.0 (* y (* t z)))))
(if (<= z -1.25e-57)
t_1
(if (<= z 4.4e-229) (* 27.0 (* a b)) (if (<= z 2.7e-45) (* x 2.0) 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 * (y * (t * z));
double tmp;
if (z <= -1.25e-57) {
tmp = t_1;
} else if (z <= 4.4e-229) {
tmp = 27.0 * (a * b);
} else if (z <= 2.7e-45) {
tmp = x * 2.0;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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) * (y * (t * z))
if (z <= (-1.25d-57)) then
tmp = t_1
else if (z <= 4.4d-229) then
tmp = 27.0d0 * (a * b)
else if (z <= 2.7d-45) then
tmp = x * 2.0d0
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 * (y * (t * z));
double tmp;
if (z <= -1.25e-57) {
tmp = t_1;
} else if (z <= 4.4e-229) {
tmp = 27.0 * (a * b);
} else if (z <= 2.7e-45) {
tmp = x * 2.0;
} 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 * (y * (t * z)) tmp = 0 if z <= -1.25e-57: tmp = t_1 elif z <= 4.4e-229: tmp = 27.0 * (a * b) elif z <= 2.7e-45: tmp = x * 2.0 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(y * Float64(t * z))) tmp = 0.0 if (z <= -1.25e-57) tmp = t_1; elseif (z <= 4.4e-229) tmp = Float64(27.0 * Float64(a * b)); elseif (z <= 2.7e-45) tmp = Float64(x * 2.0); else tmp = t_1; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 * (y * (t * z));
tmp = 0.0;
if (z <= -1.25e-57)
tmp = t_1;
elseif (z <= 4.4e-229)
tmp = 27.0 * (a * b);
elseif (z <= 2.7e-45)
tmp = x * 2.0;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.25e-57], t$95$1, If[LessEqual[z, 4.4e-229], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.7e-45], N[(x * 2.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := -9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\\
\mathbf{if}\;z \leq -1.25 \cdot 10^{-57}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-229}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq 2.7 \cdot 10^{-45}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if z < -1.25e-57 or 2.69999999999999985e-45 < z Initial program 90.4%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval94.6%
Simplified94.6%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6459.5%
Simplified59.5%
if -1.25e-57 < z < 4.3999999999999998e-229Initial program 98.4%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6443.6%
Simplified43.6%
if 4.3999999999999998e-229 < z < 2.69999999999999985e-45Initial program 99.8%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval99.9%
Simplified99.9%
Taylor expanded in x around inf
*-lowering-*.f6456.3%
Simplified56.3%
Final simplification54.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 -5.8e-43) (* y (* t (* z -9.0))) (if (<= z 1.7e-26) (+ (* 27.0 (* a b)) (* x 2.0)) (* (* z -9.0) (* 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 tmp;
if (z <= -5.8e-43) {
tmp = y * (t * (z * -9.0));
} else if (z <= 1.7e-26) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (z * -9.0) * (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) :: tmp
if (z <= (-5.8d-43)) then
tmp = y * (t * (z * (-9.0d0)))
else if (z <= 1.7d-26) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = (z * (-9.0d0)) * (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 tmp;
if (z <= -5.8e-43) {
tmp = y * (t * (z * -9.0));
} else if (z <= 1.7e-26) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (z * -9.0) * (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): tmp = 0 if z <= -5.8e-43: tmp = y * (t * (z * -9.0)) elif z <= 1.7e-26: tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = (z * -9.0) * (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) tmp = 0.0 if (z <= -5.8e-43) tmp = Float64(y * Float64(t * Float64(z * -9.0))); elseif (z <= 1.7e-26) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); else tmp = Float64(Float64(z * -9.0) * 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)
tmp = 0.0;
if (z <= -5.8e-43)
tmp = y * (t * (z * -9.0));
elseif (z <= 1.7e-26)
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = (z * -9.0) * (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_] := If[LessEqual[z, -5.8e-43], N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.7e-26], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(z * -9.0), $MachinePrecision] * N[(y * t), $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 -5.8 \cdot 10^{-43}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-26}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot -9\right) \cdot \left(y \cdot t\right)\\
\end{array}
\end{array}
if z < -5.8000000000000003e-43Initial program 82.9%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval94.4%
Simplified94.4%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6462.4%
Simplified62.4%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.4%
Applied egg-rr62.4%
if -5.8000000000000003e-43 < z < 1.70000000000000007e-26Initial program 99.0%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6489.9%
Simplified89.9%
if 1.70000000000000007e-26 < z Initial program 97.1%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval93.9%
Simplified93.9%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6460.4%
Simplified60.4%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.3%
Applied egg-rr62.3%
Final simplification74.8%
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.48e-40) (* y (* t (* z -9.0))) (if (<= z 1.55e-21) (+ (* b (* a 27.0)) (* x 2.0)) (* (* z -9.0) (* 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 tmp;
if (z <= -1.48e-40) {
tmp = y * (t * (z * -9.0));
} else if (z <= 1.55e-21) {
tmp = (b * (a * 27.0)) + (x * 2.0);
} else {
tmp = (z * -9.0) * (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) :: tmp
if (z <= (-1.48d-40)) then
tmp = y * (t * (z * (-9.0d0)))
else if (z <= 1.55d-21) then
tmp = (b * (a * 27.0d0)) + (x * 2.0d0)
else
tmp = (z * (-9.0d0)) * (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 tmp;
if (z <= -1.48e-40) {
tmp = y * (t * (z * -9.0));
} else if (z <= 1.55e-21) {
tmp = (b * (a * 27.0)) + (x * 2.0);
} else {
tmp = (z * -9.0) * (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): tmp = 0 if z <= -1.48e-40: tmp = y * (t * (z * -9.0)) elif z <= 1.55e-21: tmp = (b * (a * 27.0)) + (x * 2.0) else: tmp = (z * -9.0) * (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) tmp = 0.0 if (z <= -1.48e-40) tmp = Float64(y * Float64(t * Float64(z * -9.0))); elseif (z <= 1.55e-21) tmp = Float64(Float64(b * Float64(a * 27.0)) + Float64(x * 2.0)); else tmp = Float64(Float64(z * -9.0) * 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)
tmp = 0.0;
if (z <= -1.48e-40)
tmp = y * (t * (z * -9.0));
elseif (z <= 1.55e-21)
tmp = (b * (a * 27.0)) + (x * 2.0);
else
tmp = (z * -9.0) * (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_] := If[LessEqual[z, -1.48e-40], N[(y * N[(t * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e-21], N[(N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(z * -9.0), $MachinePrecision] * N[(y * t), $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.48 \cdot 10^{-40}:\\
\;\;\;\;y \cdot \left(t \cdot \left(z \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq 1.55 \cdot 10^{-21}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;\left(z \cdot -9\right) \cdot \left(y \cdot t\right)\\
\end{array}
\end{array}
if z < -1.4800000000000001e-40Initial program 82.9%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval94.4%
Simplified94.4%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6462.4%
Simplified62.4%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
*-commutativeN/A
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.4%
Applied egg-rr62.4%
if -1.4800000000000001e-40 < z < 1.5499999999999999e-21Initial program 99.0%
Taylor expanded in x around inf
*-lowering-*.f6488.4%
Simplified88.4%
if 1.5499999999999999e-21 < z Initial program 97.0%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval93.8%
Simplified93.8%
Taylor expanded in y around inf
*-lowering-*.f64N/A
*-commutativeN/A
associate-*l*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f6460.7%
Simplified60.7%
*-commutativeN/A
associate-*r*N/A
associate-*r*N/A
*-commutativeN/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
*-lowering-*.f6462.7%
Applied egg-rr62.7%
Final simplification74.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 (<= a -4e+103) (* 27.0 (* a b)) (if (<= a 1e-137) (* x 2.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 (a <= -4e+103) {
tmp = 27.0 * (a * b);
} else if (a <= 1e-137) {
tmp = x * 2.0;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
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 <= (-4d+103)) then
tmp = 27.0d0 * (a * b)
else if (a <= 1d-137) then
tmp = x * 2.0d0
else
tmp = b * (a * 27.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
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 <= -4e+103) {
tmp = 27.0 * (a * b);
} else if (a <= 1e-137) {
tmp = x * 2.0;
} else {
tmp = b * (a * 27.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) [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 <= -4e+103: tmp = 27.0 * (a * b) elif a <= 1e-137: tmp = x * 2.0 else: tmp = b * (a * 27.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) 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 <= -4e+103) tmp = Float64(27.0 * Float64(a * b)); elseif (a <= 1e-137) tmp = Float64(x * 2.0); else tmp = Float64(b * Float64(a * 27.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
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 <= -4e+103)
tmp = 27.0 * (a * b);
elseif (a <= 1e-137)
tmp = x * 2.0;
else
tmp = b * (a * 27.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. 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, -4e+103], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 1e-137], N[(x * 2.0), $MachinePrecision], N[(b * N[(a * 27.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -4 \cdot 10^{+103}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;a \leq 10^{-137}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;b \cdot \left(a \cdot 27\right)\\
\end{array}
\end{array}
if a < -4e103Initial program 97.3%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval99.8%
Simplified99.8%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6464.4%
Simplified64.4%
if -4e103 < a < 9.99999999999999978e-138Initial program 96.3%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval96.9%
Simplified96.9%
Taylor expanded in x around inf
*-lowering-*.f6438.1%
Simplified38.1%
if 9.99999999999999978e-138 < a Initial program 88.7%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval95.2%
Simplified95.2%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6437.0%
Simplified37.0%
associate-*r*N/A
*-lowering-*.f64N/A
*-lowering-*.f6437.0%
Applied egg-rr37.0%
Final simplification41.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 (let* ((t_1 (* 27.0 (* a b)))) (if (<= a -4e+103) t_1 (if (<= a 1e-137) (* x 2.0) 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 = 27.0 * (a * b);
double tmp;
if (a <= -4e+103) {
tmp = t_1;
} else if (a <= 1e-137) {
tmp = x * 2.0;
} else {
tmp = t_1;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = 27.0d0 * (a * b)
if (a <= (-4d+103)) then
tmp = t_1
else if (a <= 1d-137) then
tmp = x * 2.0d0
else
tmp = t_1
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double tmp;
if (a <= -4e+103) {
tmp = t_1;
} else if (a <= 1e-137) {
tmp = x * 2.0;
} 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 = 27.0 * (a * b) tmp = 0 if a <= -4e+103: tmp = t_1 elif a <= 1e-137: tmp = x * 2.0 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(27.0 * Float64(a * b)) tmp = 0.0 if (a <= -4e+103) tmp = t_1; elseif (a <= 1e-137) tmp = Float64(x * 2.0); else tmp = t_1; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = 27.0 * (a * b);
tmp = 0.0;
if (a <= -4e+103)
tmp = t_1;
elseif (a <= 1e-137)
tmp = x * 2.0;
else
tmp = t_1;
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -4e+103], t$95$1, If[LessEqual[a, 1e-137], N[(x * 2.0), $MachinePrecision], t$95$1]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\\\
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;a \leq -4 \cdot 10^{+103}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;a \leq 10^{-137}:\\
\;\;\;\;x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;t\_1\\
\end{array}
\end{array}
if a < -4e103 or 9.99999999999999978e-138 < a Initial program 91.3%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval96.6%
Simplified96.6%
Taylor expanded in a around inf
*-lowering-*.f64N/A
*-lowering-*.f6445.1%
Simplified45.1%
if -4e103 < a < 9.99999999999999978e-138Initial program 96.3%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval96.9%
Simplified96.9%
Taylor expanded in x around inf
*-lowering-*.f6438.1%
Simplified38.1%
Final simplification41.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 (* 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.9%
sub-negN/A
associate-+l+N/A
+-lowering-+.f64N/A
*-lowering-*.f64N/A
+-commutativeN/A
+-lowering-+.f64N/A
associate-*l*N/A
*-lowering-*.f64N/A
*-lowering-*.f64N/A
associate-*l*N/A
associate-*l*N/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
associate-*r*N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
*-commutativeN/A
distribute-rgt-neg-inN/A
*-lowering-*.f64N/A
metadata-eval96.8%
Simplified96.8%
Taylor expanded in x around inf
*-lowering-*.f6430.2%
Simplified30.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 2024158
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:alt
(! :herbie-platform default (if (< y 7590524218811189/100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ (- (* x 2) (* (* (* y 9) z) t)) (* a (* 27 b))) (+ (- (* x 2) (* 9 (* y (* t z)))) (* (* a 27) b))))
(+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))