
(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 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z t a b) :precision binary64 (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* (* a 27.0) b)))
double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + ((a * 27.0d0) * b)
end function
public static double code(double x, double y, double z, double t, double a, double b) {
return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b);
}
def code(x, y, z, t, a, b): return ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b)
function code(x, y, z, t, a, b) return Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(Float64(a * 27.0) * b)) end
function tmp = code(x, y, z, t, a, b) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + ((a * 27.0) * b); end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + \left(a \cdot 27\right) \cdot b
\end{array}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (* y 9.0) z)))
(if (<= t_1 2e+101)
(+ (- (* x 2.0) (* t_1 t)) (* (* a 27.0) b))
(* y (- (+ (* 2.0 (/ x y)) (* 27.0 (/ (* a b) y))) (* 9.0 (* z t)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * 9.0) * z;
double tmp;
if (t_1 <= 2e+101) {
tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b);
} else {
tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * t)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (y * 9.0d0) * z
if (t_1 <= 2d+101) then
tmp = ((x * 2.0d0) - (t_1 * t)) + ((a * 27.0d0) * b)
else
tmp = y * (((2.0d0 * (x / y)) + (27.0d0 * ((a * b) / y))) - (9.0d0 * (z * t)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * 9.0) * z;
double tmp;
if (t_1 <= 2e+101) {
tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b);
} else {
tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * t)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (y * 9.0) * z tmp = 0 if t_1 <= 2e+101: tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b) else: tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * t))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * 9.0) * z) tmp = 0.0 if (t_1 <= 2e+101) tmp = Float64(Float64(Float64(x * 2.0) - Float64(t_1 * t)) + Float64(Float64(a * 27.0) * b)); else tmp = Float64(y * Float64(Float64(Float64(2.0 * Float64(x / y)) + Float64(27.0 * Float64(Float64(a * b) / y))) - Float64(9.0 * Float64(z * t)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (y * 9.0) * z;
tmp = 0.0;
if (t_1 <= 2e+101)
tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b);
else
tmp = y * (((2.0 * (x / y)) + (27.0 * ((a * b) / y))) - (9.0 * (z * t)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+101], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t$95$1 * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(N[(2.0 * N[(x / y), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(a * b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(z * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(y \cdot 9\right) \cdot z\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+101}:\\
\;\;\;\;\left(x \cdot 2 - t\_1 \cdot t\right) + \left(a \cdot 27\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(2 \cdot \frac{x}{y} + 27 \cdot \frac{a \cdot b}{y}\right) - 9 \cdot \left(z \cdot t\right)\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 2e101Initial program 97.6%
if 2e101 < (*.f64 (*.f64 y #s(literal 9 binary64)) z) Initial program 81.2%
sub-neg81.2%
sub-neg81.2%
associate-*l*95.1%
associate-*l*95.0%
Simplified95.0%
Taylor expanded in y around inf 99.8%
Final simplification97.9%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* 27.0 b))) (t_2 (* -9.0 (* t (* y z)))))
(if (<= z -4.2e-93)
(* -9.0 (* z (* y t)))
(if (<= z -5.8e-130)
t_1
(if (<= z -7.8e-153)
t_2
(if (<= z -7.5e-172)
(* 27.0 (* a b))
(if (<= z 1e-230)
(* x 2.0)
(if (<= z 4.4e-197)
t_1
(if (<= z 8.5e-127)
(* x 2.0)
(if (<= z 6.5e-112) t_1 t_2))))))))))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 t_2 = -9.0 * (t * (y * z));
double tmp;
if (z <= -4.2e-93) {
tmp = -9.0 * (z * (y * t));
} else if (z <= -5.8e-130) {
tmp = t_1;
} else if (z <= -7.8e-153) {
tmp = t_2;
} else if (z <= -7.5e-172) {
tmp = 27.0 * (a * b);
} else if (z <= 1e-230) {
tmp = x * 2.0;
} else if (z <= 4.4e-197) {
tmp = t_1;
} else if (z <= 8.5e-127) {
tmp = x * 2.0;
} else if (z <= 6.5e-112) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * (27.0d0 * b)
t_2 = (-9.0d0) * (t * (y * z))
if (z <= (-4.2d-93)) then
tmp = (-9.0d0) * (z * (y * t))
else if (z <= (-5.8d-130)) then
tmp = t_1
else if (z <= (-7.8d-153)) then
tmp = t_2
else if (z <= (-7.5d-172)) then
tmp = 27.0d0 * (a * b)
else if (z <= 1d-230) then
tmp = x * 2.0d0
else if (z <= 4.4d-197) then
tmp = t_1
else if (z <= 8.5d-127) then
tmp = x * 2.0d0
else if (z <= 6.5d-112) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (27.0 * b);
double t_2 = -9.0 * (t * (y * z));
double tmp;
if (z <= -4.2e-93) {
tmp = -9.0 * (z * (y * t));
} else if (z <= -5.8e-130) {
tmp = t_1;
} else if (z <= -7.8e-153) {
tmp = t_2;
} else if (z <= -7.5e-172) {
tmp = 27.0 * (a * b);
} else if (z <= 1e-230) {
tmp = x * 2.0;
} else if (z <= 4.4e-197) {
tmp = t_1;
} else if (z <= 8.5e-127) {
tmp = x * 2.0;
} else if (z <= 6.5e-112) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = a * (27.0 * b) t_2 = -9.0 * (t * (y * z)) tmp = 0 if z <= -4.2e-93: tmp = -9.0 * (z * (y * t)) elif z <= -5.8e-130: tmp = t_1 elif z <= -7.8e-153: tmp = t_2 elif z <= -7.5e-172: tmp = 27.0 * (a * b) elif z <= 1e-230: tmp = x * 2.0 elif z <= 4.4e-197: tmp = t_1 elif z <= 8.5e-127: tmp = x * 2.0 elif z <= 6.5e-112: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(27.0 * b)) t_2 = Float64(-9.0 * Float64(t * Float64(y * z))) tmp = 0.0 if (z <= -4.2e-93) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (z <= -5.8e-130) tmp = t_1; elseif (z <= -7.8e-153) tmp = t_2; elseif (z <= -7.5e-172) tmp = Float64(27.0 * Float64(a * b)); elseif (z <= 1e-230) tmp = Float64(x * 2.0); elseif (z <= 4.4e-197) tmp = t_1; elseif (z <= 8.5e-127) tmp = Float64(x * 2.0); elseif (z <= 6.5e-112) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = a * (27.0 * b);
t_2 = -9.0 * (t * (y * z));
tmp = 0.0;
if (z <= -4.2e-93)
tmp = -9.0 * (z * (y * t));
elseif (z <= -5.8e-130)
tmp = t_1;
elseif (z <= -7.8e-153)
tmp = t_2;
elseif (z <= -7.5e-172)
tmp = 27.0 * (a * b);
elseif (z <= 1e-230)
tmp = x * 2.0;
elseif (z <= 4.4e-197)
tmp = t_1;
elseif (z <= 8.5e-127)
tmp = x * 2.0;
elseif (z <= 6.5e-112)
tmp = t_1;
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.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.2e-93], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -5.8e-130], t$95$1, If[LessEqual[z, -7.8e-153], t$95$2, If[LessEqual[z, -7.5e-172], N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1e-230], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 4.4e-197], t$95$1, If[LessEqual[z, 8.5e-127], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 6.5e-112], t$95$1, t$95$2]]]]]]]]]]
\begin{array}{l}
[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)\\
t_2 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;z \leq -4.2 \cdot 10^{-93}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq -5.8 \cdot 10^{-130}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.8 \cdot 10^{-153}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -7.5 \cdot 10^{-172}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{elif}\;z \leq 10^{-230}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 4.4 \cdot 10^{-197}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-127}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 6.5 \cdot 10^{-112}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -4.2000000000000002e-93Initial program 90.9%
sub-neg90.9%
sub-neg90.9%
associate-*l*91.8%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in t around inf 85.2%
Taylor expanded in t around inf 52.8%
*-commutative52.8%
*-commutative52.8%
associate-*l*55.1%
*-commutative55.1%
Simplified55.1%
if -4.2000000000000002e-93 < z < -5.8e-130 or 1.00000000000000005e-230 < z < 4.4000000000000001e-197 or 8.5e-127 < z < 6.49999999999999956e-112Initial program 99.9%
sub-neg99.9%
sub-neg99.9%
associate-*l*99.9%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in a around inf 77.7%
associate-*r*77.8%
*-commutative77.8%
associate-*r*77.7%
Simplified77.7%
if -5.8e-130 < z < -7.8000000000000004e-153 or 6.49999999999999956e-112 < z Initial program 94.6%
sub-neg94.6%
sub-neg94.6%
associate-*l*93.6%
associate-*l*93.6%
Simplified93.6%
Taylor expanded in y around inf 50.6%
if -7.8000000000000004e-153 < z < -7.4999999999999999e-172Initial program 99.6%
sub-neg99.6%
sub-neg99.6%
associate-*l*99.6%
associate-*l*99.6%
Simplified99.6%
Taylor expanded in a around inf 73.0%
if -7.4999999999999999e-172 < z < 1.00000000000000005e-230 or 4.4000000000000001e-197 < z < 8.5e-127Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around inf 60.2%
Final simplification56.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* 27.0 b))))
(if (<= z -4.3e-94)
(* z (* y (* t -9.0)))
(if (<= z -1.9e-127)
t_1
(if (<= z -7.2e-172)
(* (* t -9.0) (* y z))
(if (<= z 1.85e-229)
(* x 2.0)
(if (<= z 3.7e-194)
t_1
(if (<= z 1.4e-126)
(* x 2.0)
(if (<= z 6.8e-112) t_1 (* t (* y (* z -9.0))))))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (27.0 * b);
double tmp;
if (z <= -4.3e-94) {
tmp = z * (y * (t * -9.0));
} else if (z <= -1.9e-127) {
tmp = t_1;
} else if (z <= -7.2e-172) {
tmp = (t * -9.0) * (y * z);
} else if (z <= 1.85e-229) {
tmp = x * 2.0;
} else if (z <= 3.7e-194) {
tmp = t_1;
} else if (z <= 1.4e-126) {
tmp = x * 2.0;
} else if (z <= 6.8e-112) {
tmp = t_1;
} 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.
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 <= (-4.3d-94)) then
tmp = z * (y * (t * (-9.0d0)))
else if (z <= (-1.9d-127)) then
tmp = t_1
else if (z <= (-7.2d-172)) then
tmp = (t * (-9.0d0)) * (y * z)
else if (z <= 1.85d-229) then
tmp = x * 2.0d0
else if (z <= 3.7d-194) then
tmp = t_1
else if (z <= 1.4d-126) then
tmp = x * 2.0d0
else if (z <= 6.8d-112) then
tmp = t_1
else
tmp = t * (y * (z * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (27.0 * b);
double tmp;
if (z <= -4.3e-94) {
tmp = z * (y * (t * -9.0));
} else if (z <= -1.9e-127) {
tmp = t_1;
} else if (z <= -7.2e-172) {
tmp = (t * -9.0) * (y * z);
} else if (z <= 1.85e-229) {
tmp = x * 2.0;
} else if (z <= 3.7e-194) {
tmp = t_1;
} else if (z <= 1.4e-126) {
tmp = x * 2.0;
} else if (z <= 6.8e-112) {
tmp = t_1;
} else {
tmp = t * (y * (z * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = a * (27.0 * b) tmp = 0 if z <= -4.3e-94: tmp = z * (y * (t * -9.0)) elif z <= -1.9e-127: tmp = t_1 elif z <= -7.2e-172: tmp = (t * -9.0) * (y * z) elif z <= 1.85e-229: tmp = x * 2.0 elif z <= 3.7e-194: tmp = t_1 elif z <= 1.4e-126: tmp = x * 2.0 elif z <= 6.8e-112: tmp = t_1 else: tmp = t * (y * (z * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(27.0 * b)) tmp = 0.0 if (z <= -4.3e-94) tmp = Float64(z * Float64(y * Float64(t * -9.0))); elseif (z <= -1.9e-127) tmp = t_1; elseif (z <= -7.2e-172) tmp = Float64(Float64(t * -9.0) * Float64(y * z)); elseif (z <= 1.85e-229) tmp = Float64(x * 2.0); elseif (z <= 3.7e-194) tmp = t_1; elseif (z <= 1.4e-126) tmp = Float64(x * 2.0); elseif (z <= 6.8e-112) tmp = t_1; 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])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = a * (27.0 * b);
tmp = 0.0;
if (z <= -4.3e-94)
tmp = z * (y * (t * -9.0));
elseif (z <= -1.9e-127)
tmp = t_1;
elseif (z <= -7.2e-172)
tmp = (t * -9.0) * (y * z);
elseif (z <= 1.85e-229)
tmp = x * 2.0;
elseif (z <= 3.7e-194)
tmp = t_1;
elseif (z <= 1.4e-126)
tmp = x * 2.0;
elseif (z <= 6.8e-112)
tmp = t_1;
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.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.3e-94], N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -1.9e-127], t$95$1, If[LessEqual[z, -7.2e-172], N[(N[(t * -9.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.85e-229], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 3.7e-194], t$95$1, If[LessEqual[z, 1.4e-126], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 6.8e-112], t$95$1, 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])\\
\\
\begin{array}{l}
t_1 := a \cdot \left(27 \cdot b\right)\\
\mathbf{if}\;z \leq -4.3 \cdot 10^{-94}:\\
\;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq -1.9 \cdot 10^{-127}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-172}:\\
\;\;\;\;\left(t \cdot -9\right) \cdot \left(y \cdot z\right)\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-229}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 3.7 \cdot 10^{-194}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.4 \cdot 10^{-126}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 6.8 \cdot 10^{-112}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -4.2999999999999998e-94Initial program 90.9%
Taylor expanded in y around 0 90.8%
Taylor expanded in y around inf 52.8%
associate-*r*52.9%
associate-*r*55.2%
associate-*r*55.2%
*-commutative55.2%
associate-*r*55.2%
*-commutative55.2%
*-commutative55.2%
Simplified55.2%
if -4.2999999999999998e-94 < z < -1.90000000000000001e-127 or 1.8499999999999999e-229 < z < 3.70000000000000008e-194 or 1.39999999999999996e-126 < z < 6.7999999999999996e-112Initial program 99.9%
sub-neg99.9%
sub-neg99.9%
associate-*l*99.9%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in a around inf 73.5%
associate-*r*73.6%
*-commutative73.6%
associate-*r*73.5%
Simplified73.5%
if -1.90000000000000001e-127 < z < -7.20000000000000029e-172Initial program 99.6%
Taylor expanded in y around 0 99.3%
Taylor expanded in y around inf 50.8%
associate-*r*51.1%
*-commutative51.1%
*-commutative51.1%
Simplified51.1%
if -7.20000000000000029e-172 < z < 1.8499999999999999e-229 or 3.70000000000000008e-194 < z < 1.39999999999999996e-126Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around inf 59.5%
if 6.7999999999999996e-112 < z Initial program 94.1%
sub-neg94.1%
sub-neg94.1%
associate-*l*93.0%
associate-*l*93.0%
Simplified93.0%
Taylor expanded in y around inf 83.9%
Taylor expanded in y around inf 48.3%
*-commutative48.3%
associate-*r*48.3%
associate-*l*48.4%
*-commutative48.4%
Simplified48.4%
Final simplification55.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* 27.0 b))) (t_2 (* t (* y (* z -9.0)))))
(if (<= z -3e-94)
(* z (* y (* t -9.0)))
(if (<= z -8e-128)
t_1
(if (<= z -7.2e-172)
t_2
(if (<= z 8.2e-230)
(* x 2.0)
(if (<= z 1.45e-196)
t_1
(if (<= z 1.5e-126) (* x 2.0) (if (<= z 4.2e-113) t_1 t_2)))))))))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 t_2 = t * (y * (z * -9.0));
double tmp;
if (z <= -3e-94) {
tmp = z * (y * (t * -9.0));
} else if (z <= -8e-128) {
tmp = t_1;
} else if (z <= -7.2e-172) {
tmp = t_2;
} else if (z <= 8.2e-230) {
tmp = x * 2.0;
} else if (z <= 1.45e-196) {
tmp = t_1;
} else if (z <= 1.5e-126) {
tmp = x * 2.0;
} else if (z <= 4.2e-113) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * (27.0d0 * b)
t_2 = t * (y * (z * (-9.0d0)))
if (z <= (-3d-94)) then
tmp = z * (y * (t * (-9.0d0)))
else if (z <= (-8d-128)) then
tmp = t_1
else if (z <= (-7.2d-172)) then
tmp = t_2
else if (z <= 8.2d-230) then
tmp = x * 2.0d0
else if (z <= 1.45d-196) then
tmp = t_1
else if (z <= 1.5d-126) then
tmp = x * 2.0d0
else if (z <= 4.2d-113) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (27.0 * b);
double t_2 = t * (y * (z * -9.0));
double tmp;
if (z <= -3e-94) {
tmp = z * (y * (t * -9.0));
} else if (z <= -8e-128) {
tmp = t_1;
} else if (z <= -7.2e-172) {
tmp = t_2;
} else if (z <= 8.2e-230) {
tmp = x * 2.0;
} else if (z <= 1.45e-196) {
tmp = t_1;
} else if (z <= 1.5e-126) {
tmp = x * 2.0;
} else if (z <= 4.2e-113) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = a * (27.0 * b) t_2 = t * (y * (z * -9.0)) tmp = 0 if z <= -3e-94: tmp = z * (y * (t * -9.0)) elif z <= -8e-128: tmp = t_1 elif z <= -7.2e-172: tmp = t_2 elif z <= 8.2e-230: tmp = x * 2.0 elif z <= 1.45e-196: tmp = t_1 elif z <= 1.5e-126: tmp = x * 2.0 elif z <= 4.2e-113: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(27.0 * b)) t_2 = Float64(t * Float64(y * Float64(z * -9.0))) tmp = 0.0 if (z <= -3e-94) tmp = Float64(z * Float64(y * Float64(t * -9.0))); elseif (z <= -8e-128) tmp = t_1; elseif (z <= -7.2e-172) tmp = t_2; elseif (z <= 8.2e-230) tmp = Float64(x * 2.0); elseif (z <= 1.45e-196) tmp = t_1; elseif (z <= 1.5e-126) tmp = Float64(x * 2.0); elseif (z <= 4.2e-113) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = a * (27.0 * b);
t_2 = t * (y * (z * -9.0));
tmp = 0.0;
if (z <= -3e-94)
tmp = z * (y * (t * -9.0));
elseif (z <= -8e-128)
tmp = t_1;
elseif (z <= -7.2e-172)
tmp = t_2;
elseif (z <= 8.2e-230)
tmp = x * 2.0;
elseif (z <= 1.45e-196)
tmp = t_1;
elseif (z <= 1.5e-126)
tmp = x * 2.0;
elseif (z <= 4.2e-113)
tmp = t_1;
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.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e-94], N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -8e-128], t$95$1, If[LessEqual[z, -7.2e-172], t$95$2, If[LessEqual[z, 8.2e-230], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 1.45e-196], t$95$1, If[LessEqual[z, 1.5e-126], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 4.2e-113], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
[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)\\
t_2 := t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\mathbf{if}\;z \leq -3 \cdot 10^{-94}:\\
\;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\
\mathbf{elif}\;z \leq -8 \cdot 10^{-128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-172}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{-230}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 1.45 \cdot 10^{-196}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.5 \cdot 10^{-126}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-113}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -3.0000000000000001e-94Initial program 90.9%
Taylor expanded in y around 0 90.8%
Taylor expanded in y around inf 52.8%
associate-*r*52.9%
associate-*r*55.2%
associate-*r*55.2%
*-commutative55.2%
associate-*r*55.2%
*-commutative55.2%
*-commutative55.2%
Simplified55.2%
if -3.0000000000000001e-94 < z < -8.00000000000000043e-128 or 8.2000000000000003e-230 < z < 1.44999999999999994e-196 or 1.5000000000000001e-126 < z < 4.2e-113Initial program 99.9%
sub-neg99.9%
sub-neg99.9%
associate-*l*99.9%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in a around inf 77.7%
associate-*r*77.8%
*-commutative77.8%
associate-*r*77.7%
Simplified77.7%
if -8.00000000000000043e-128 < z < -7.20000000000000029e-172 or 4.2e-113 < z Initial program 94.8%
sub-neg94.8%
sub-neg94.8%
associate-*l*93.9%
associate-*l*93.9%
Simplified93.9%
Taylor expanded in y around inf 84.0%
Taylor expanded in y around inf 48.6%
*-commutative48.6%
associate-*r*48.6%
associate-*l*48.7%
*-commutative48.7%
Simplified48.7%
if -7.20000000000000029e-172 < z < 8.2000000000000003e-230 or 1.44999999999999994e-196 < z < 1.5000000000000001e-126Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around inf 60.2%
Final simplification55.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* 27.0 b))) (t_2 (* t (* y (* z -9.0)))))
(if (<= z -8e-94)
(* -9.0 (* z (* y t)))
(if (<= z -4.2e-130)
t_1
(if (<= z -7.2e-172)
t_2
(if (<= z 2.95e-232)
(* x 2.0)
(if (<= z 2.25e-197)
t_1
(if (<= z 1.2e-126)
(* x 2.0)
(if (<= z 1.85e-112) t_1 t_2)))))))))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 t_2 = t * (y * (z * -9.0));
double tmp;
if (z <= -8e-94) {
tmp = -9.0 * (z * (y * t));
} else if (z <= -4.2e-130) {
tmp = t_1;
} else if (z <= -7.2e-172) {
tmp = t_2;
} else if (z <= 2.95e-232) {
tmp = x * 2.0;
} else if (z <= 2.25e-197) {
tmp = t_1;
} else if (z <= 1.2e-126) {
tmp = x * 2.0;
} else if (z <= 1.85e-112) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * (27.0d0 * b)
t_2 = t * (y * (z * (-9.0d0)))
if (z <= (-8d-94)) then
tmp = (-9.0d0) * (z * (y * t))
else if (z <= (-4.2d-130)) then
tmp = t_1
else if (z <= (-7.2d-172)) then
tmp = t_2
else if (z <= 2.95d-232) then
tmp = x * 2.0d0
else if (z <= 2.25d-197) then
tmp = t_1
else if (z <= 1.2d-126) then
tmp = x * 2.0d0
else if (z <= 1.85d-112) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (27.0 * b);
double t_2 = t * (y * (z * -9.0));
double tmp;
if (z <= -8e-94) {
tmp = -9.0 * (z * (y * t));
} else if (z <= -4.2e-130) {
tmp = t_1;
} else if (z <= -7.2e-172) {
tmp = t_2;
} else if (z <= 2.95e-232) {
tmp = x * 2.0;
} else if (z <= 2.25e-197) {
tmp = t_1;
} else if (z <= 1.2e-126) {
tmp = x * 2.0;
} else if (z <= 1.85e-112) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = a * (27.0 * b) t_2 = t * (y * (z * -9.0)) tmp = 0 if z <= -8e-94: tmp = -9.0 * (z * (y * t)) elif z <= -4.2e-130: tmp = t_1 elif z <= -7.2e-172: tmp = t_2 elif z <= 2.95e-232: tmp = x * 2.0 elif z <= 2.25e-197: tmp = t_1 elif z <= 1.2e-126: tmp = x * 2.0 elif z <= 1.85e-112: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(27.0 * b)) t_2 = Float64(t * Float64(y * Float64(z * -9.0))) tmp = 0.0 if (z <= -8e-94) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (z <= -4.2e-130) tmp = t_1; elseif (z <= -7.2e-172) tmp = t_2; elseif (z <= 2.95e-232) tmp = Float64(x * 2.0); elseif (z <= 2.25e-197) tmp = t_1; elseif (z <= 1.2e-126) tmp = Float64(x * 2.0); elseif (z <= 1.85e-112) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = a * (27.0 * b);
t_2 = t * (y * (z * -9.0));
tmp = 0.0;
if (z <= -8e-94)
tmp = -9.0 * (z * (y * t));
elseif (z <= -4.2e-130)
tmp = t_1;
elseif (z <= -7.2e-172)
tmp = t_2;
elseif (z <= 2.95e-232)
tmp = x * 2.0;
elseif (z <= 2.25e-197)
tmp = t_1;
elseif (z <= 1.2e-126)
tmp = x * 2.0;
elseif (z <= 1.85e-112)
tmp = t_1;
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.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t * N[(y * N[(z * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -8e-94], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4.2e-130], t$95$1, If[LessEqual[z, -7.2e-172], t$95$2, If[LessEqual[z, 2.95e-232], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 2.25e-197], t$95$1, If[LessEqual[z, 1.2e-126], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 1.85e-112], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
[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)\\
t_2 := t \cdot \left(y \cdot \left(z \cdot -9\right)\right)\\
\mathbf{if}\;z \leq -8 \cdot 10^{-94}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq -4.2 \cdot 10^{-130}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7.2 \cdot 10^{-172}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 2.95 \cdot 10^{-232}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 2.25 \cdot 10^{-197}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 1.2 \cdot 10^{-126}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 1.85 \cdot 10^{-112}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -7.9999999999999996e-94Initial program 90.9%
sub-neg90.9%
sub-neg90.9%
associate-*l*91.8%
associate-*l*92.9%
Simplified92.9%
Taylor expanded in t around inf 85.2%
Taylor expanded in t around inf 52.8%
*-commutative52.8%
*-commutative52.8%
associate-*l*55.1%
*-commutative55.1%
Simplified55.1%
if -7.9999999999999996e-94 < z < -4.20000000000000004e-130 or 2.95000000000000008e-232 < z < 2.25e-197 or 1.20000000000000003e-126 < z < 1.8499999999999999e-112Initial program 99.9%
sub-neg99.9%
sub-neg99.9%
associate-*l*99.9%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in a around inf 77.7%
associate-*r*77.8%
*-commutative77.8%
associate-*r*77.7%
Simplified77.7%
if -4.20000000000000004e-130 < z < -7.20000000000000029e-172 or 1.8499999999999999e-112 < z Initial program 94.8%
sub-neg94.8%
sub-neg94.8%
associate-*l*93.9%
associate-*l*93.9%
Simplified93.9%
Taylor expanded in y around inf 84.0%
Taylor expanded in y around inf 48.6%
*-commutative48.6%
associate-*r*48.6%
associate-*l*48.7%
*-commutative48.7%
Simplified48.7%
if -7.20000000000000029e-172 < z < 2.95000000000000008e-232 or 2.25e-197 < z < 1.20000000000000003e-126Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around inf 60.2%
Final simplification55.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* a (* 27.0 b))) (t_2 (* -9.0 (* t (* y z)))))
(if (<= z -5.4e-93)
t_2
(if (<= z -1.85e-128)
t_1
(if (<= z -7e-172)
t_2
(if (<= z 1.7e-232)
(* x 2.0)
(if (<= z 8.8e-193)
t_1
(if (<= z 2.4e-126)
(* x 2.0)
(if (<= z 2.55e-113) t_1 t_2)))))))))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 t_2 = -9.0 * (t * (y * z));
double tmp;
if (z <= -5.4e-93) {
tmp = t_2;
} else if (z <= -1.85e-128) {
tmp = t_1;
} else if (z <= -7e-172) {
tmp = t_2;
} else if (z <= 1.7e-232) {
tmp = x * 2.0;
} else if (z <= 8.8e-193) {
tmp = t_1;
} else if (z <= 2.4e-126) {
tmp = x * 2.0;
} else if (z <= 2.55e-113) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: t_2
real(8) :: tmp
t_1 = a * (27.0d0 * b)
t_2 = (-9.0d0) * (t * (y * z))
if (z <= (-5.4d-93)) then
tmp = t_2
else if (z <= (-1.85d-128)) then
tmp = t_1
else if (z <= (-7d-172)) then
tmp = t_2
else if (z <= 1.7d-232) then
tmp = x * 2.0d0
else if (z <= 8.8d-193) then
tmp = t_1
else if (z <= 2.4d-126) then
tmp = x * 2.0d0
else if (z <= 2.55d-113) then
tmp = t_1
else
tmp = t_2
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = a * (27.0 * b);
double t_2 = -9.0 * (t * (y * z));
double tmp;
if (z <= -5.4e-93) {
tmp = t_2;
} else if (z <= -1.85e-128) {
tmp = t_1;
} else if (z <= -7e-172) {
tmp = t_2;
} else if (z <= 1.7e-232) {
tmp = x * 2.0;
} else if (z <= 8.8e-193) {
tmp = t_1;
} else if (z <= 2.4e-126) {
tmp = x * 2.0;
} else if (z <= 2.55e-113) {
tmp = t_1;
} else {
tmp = t_2;
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = a * (27.0 * b) t_2 = -9.0 * (t * (y * z)) tmp = 0 if z <= -5.4e-93: tmp = t_2 elif z <= -1.85e-128: tmp = t_1 elif z <= -7e-172: tmp = t_2 elif z <= 1.7e-232: tmp = x * 2.0 elif z <= 8.8e-193: tmp = t_1 elif z <= 2.4e-126: tmp = x * 2.0 elif z <= 2.55e-113: tmp = t_1 else: tmp = t_2 return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(a * Float64(27.0 * b)) t_2 = Float64(-9.0 * Float64(t * Float64(y * z))) tmp = 0.0 if (z <= -5.4e-93) tmp = t_2; elseif (z <= -1.85e-128) tmp = t_1; elseif (z <= -7e-172) tmp = t_2; elseif (z <= 1.7e-232) tmp = Float64(x * 2.0); elseif (z <= 8.8e-193) tmp = t_1; elseif (z <= 2.4e-126) tmp = Float64(x * 2.0); elseif (z <= 2.55e-113) tmp = t_1; else tmp = t_2; end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = a * (27.0 * b);
t_2 = -9.0 * (t * (y * z));
tmp = 0.0;
if (z <= -5.4e-93)
tmp = t_2;
elseif (z <= -1.85e-128)
tmp = t_1;
elseif (z <= -7e-172)
tmp = t_2;
elseif (z <= 1.7e-232)
tmp = x * 2.0;
elseif (z <= 8.8e-193)
tmp = t_1;
elseif (z <= 2.4e-126)
tmp = x * 2.0;
elseif (z <= 2.55e-113)
tmp = t_1;
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.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(-9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -5.4e-93], t$95$2, If[LessEqual[z, -1.85e-128], t$95$1, If[LessEqual[z, -7e-172], t$95$2, If[LessEqual[z, 1.7e-232], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 8.8e-193], t$95$1, If[LessEqual[z, 2.4e-126], N[(x * 2.0), $MachinePrecision], If[LessEqual[z, 2.55e-113], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}
[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)\\
t_2 := -9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;z \leq -5.4 \cdot 10^{-93}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq -1.85 \cdot 10^{-128}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq -7 \cdot 10^{-172}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-232}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{-193}:\\
\;\;\;\;t\_1\\
\mathbf{elif}\;z \leq 2.4 \cdot 10^{-126}:\\
\;\;\;\;x \cdot 2\\
\mathbf{elif}\;z \leq 2.55 \cdot 10^{-113}:\\
\;\;\;\;t\_1\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
if z < -5.4000000000000002e-93 or -1.85e-128 < z < -7.00000000000000057e-172 or 2.54999999999999989e-113 < z Initial program 93.0%
sub-neg93.0%
sub-neg93.0%
associate-*l*92.9%
associate-*l*93.4%
Simplified93.4%
Taylor expanded in y around inf 50.6%
if -5.4000000000000002e-93 < z < -1.85e-128 or 1.7000000000000001e-232 < z < 8.79999999999999906e-193 or 2.40000000000000007e-126 < z < 2.54999999999999989e-113Initial program 99.9%
sub-neg99.9%
sub-neg99.9%
associate-*l*99.9%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in a around inf 73.5%
associate-*r*73.6%
*-commutative73.6%
associate-*r*73.5%
Simplified73.5%
if -7.00000000000000057e-172 < z < 1.7000000000000001e-232 or 8.79999999999999906e-193 < z < 2.40000000000000007e-126Initial program 99.8%
sub-neg99.8%
sub-neg99.8%
associate-*l*99.8%
associate-*l*99.8%
Simplified99.8%
Taylor expanded in x around inf 59.5%
Final simplification54.2%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= b -2.9e+32)
(* a (* 27.0 b))
(if (<= b 2e+115)
(+ (* (* t -9.0) (* y z)) (* x 2.0))
(if (or (<= b 3e+136) (not (<= b 2.8e+188)))
(+ (* 27.0 (* a b)) (* x 2.0))
(- (* x 2.0) (* 9.0 (* z (* y t))))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.9e+32) {
tmp = a * (27.0 * b);
} else if (b <= 2e+115) {
tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
} else if ((b <= 3e+136) || !(b <= 2.8e+188)) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (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.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2.9d+32)) then
tmp = a * (27.0d0 * b)
else if (b <= 2d+115) then
tmp = ((t * (-9.0d0)) * (y * z)) + (x * 2.0d0)
else if ((b <= 3d+136) .or. (.not. (b <= 2.8d+188))) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = (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;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.9e+32) {
tmp = a * (27.0 * b);
} else if (b <= 2e+115) {
tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
} else if ((b <= 3e+136) || !(b <= 2.8e+188)) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = (x * 2.0) - (9.0 * (z * (y * t)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if b <= -2.9e+32: tmp = a * (27.0 * b) elif b <= 2e+115: tmp = ((t * -9.0) * (y * z)) + (x * 2.0) elif (b <= 3e+136) or not (b <= 2.8e+188): tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = (x * 2.0) - (9.0 * (z * (y * t))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.9e+32) tmp = Float64(a * Float64(27.0 * b)); elseif (b <= 2e+115) tmp = Float64(Float64(Float64(t * -9.0) * Float64(y * z)) + Float64(x * 2.0)); elseif ((b <= 3e+136) || !(b <= 2.8e+188)) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); else tmp = 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])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (b <= -2.9e+32)
tmp = a * (27.0 * b);
elseif (b <= 2e+115)
tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
elseif ((b <= 3e+136) || ~((b <= 2.8e+188)))
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = (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. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.9e+32], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 2e+115], N[(N[(N[(t * -9.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 3e+136], N[Not[LessEqual[b, 2.8e+188]], $MachinePrecision]], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.9 \cdot 10^{+32}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;b \leq 2 \cdot 10^{+115}:\\
\;\;\;\;\left(t \cdot -9\right) \cdot \left(y \cdot z\right) + x \cdot 2\\
\mathbf{elif}\;b \leq 3 \cdot 10^{+136} \lor \neg \left(b \leq 2.8 \cdot 10^{+188}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2 - 9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\end{array}
\end{array}
if b < -2.90000000000000003e32Initial program 98.3%
sub-neg98.3%
sub-neg98.3%
associate-*l*92.0%
associate-*l*91.9%
Simplified91.9%
Taylor expanded in a around inf 53.0%
associate-*r*53.0%
*-commutative53.0%
associate-*r*53.0%
Simplified53.0%
if -2.90000000000000003e32 < b < 2e115Initial program 94.7%
sub-neg94.7%
sub-neg94.7%
associate-*l*96.4%
associate-*l*96.9%
Simplified96.9%
Taylor expanded in a around 0 79.3%
cancel-sign-sub-inv79.3%
*-commutative79.3%
associate-*r*79.4%
metadata-eval79.4%
Applied egg-rr79.4%
if 2e115 < b < 2.99999999999999979e136 or 2.7999999999999998e188 < b Initial program 90.3%
sub-neg90.3%
sub-neg90.3%
associate-*l*90.4%
associate-*l*90.3%
Simplified90.3%
Taylor expanded in y around 0 93.0%
if 2.99999999999999979e136 < b < 2.7999999999999998e188Initial program 91.2%
sub-neg91.2%
sub-neg91.2%
associate-*l*99.4%
associate-*l*99.4%
Simplified99.4%
Taylor expanded in a around 0 73.8%
pow173.8%
*-commutative73.8%
Applied egg-rr73.8%
unpow173.8%
*-commutative73.8%
associate-*r*73.5%
*-commutative73.5%
Simplified73.5%
Final simplification74.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(if (<= b -2.95e+32)
(* a (* 27.0 b))
(if (<= b 4.2e+114)
(+ (* (* t -9.0) (* y z)) (* x 2.0))
(if (or (<= b 2.4e+136) (not (<= b 7.5e+161)))
(+ (* 27.0 (* a b)) (* x 2.0))
(* y (* (* z t) -9.0))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.95e+32) {
tmp = a * (27.0 * b);
} else if (b <= 4.2e+114) {
tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
} else if ((b <= 2.4e+136) || !(b <= 7.5e+161)) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = y * ((z * t) * -9.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (b <= (-2.95d+32)) then
tmp = a * (27.0d0 * b)
else if (b <= 4.2d+114) then
tmp = ((t * (-9.0d0)) * (y * z)) + (x * 2.0d0)
else if ((b <= 2.4d+136) .or. (.not. (b <= 7.5d+161))) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = y * ((z * t) * (-9.0d0))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (b <= -2.95e+32) {
tmp = a * (27.0 * b);
} else if (b <= 4.2e+114) {
tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
} else if ((b <= 2.4e+136) || !(b <= 7.5e+161)) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = y * ((z * t) * -9.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if b <= -2.95e+32: tmp = a * (27.0 * b) elif b <= 4.2e+114: tmp = ((t * -9.0) * (y * z)) + (x * 2.0) elif (b <= 2.4e+136) or not (b <= 7.5e+161): tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = y * ((z * t) * -9.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (b <= -2.95e+32) tmp = Float64(a * Float64(27.0 * b)); elseif (b <= 4.2e+114) tmp = Float64(Float64(Float64(t * -9.0) * Float64(y * z)) + Float64(x * 2.0)); elseif ((b <= 2.4e+136) || !(b <= 7.5e+161)) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); else tmp = Float64(y * Float64(Float64(z * t) * -9.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (b <= -2.95e+32)
tmp = a * (27.0 * b);
elseif (b <= 4.2e+114)
tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
elseif ((b <= 2.4e+136) || ~((b <= 7.5e+161)))
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = y * ((z * t) * -9.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[b, -2.95e+32], N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 4.2e+114], N[(N[(N[(t * -9.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[b, 2.4e+136], N[Not[LessEqual[b, 7.5e+161]], $MachinePrecision]], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(z * t), $MachinePrecision] * -9.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.95 \cdot 10^{+32}:\\
\;\;\;\;a \cdot \left(27 \cdot b\right)\\
\mathbf{elif}\;b \leq 4.2 \cdot 10^{+114}:\\
\;\;\;\;\left(t \cdot -9\right) \cdot \left(y \cdot z\right) + x \cdot 2\\
\mathbf{elif}\;b \leq 2.4 \cdot 10^{+136} \lor \neg \left(b \leq 7.5 \cdot 10^{+161}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;y \cdot \left(\left(z \cdot t\right) \cdot -9\right)\\
\end{array}
\end{array}
if b < -2.94999999999999983e32Initial program 98.3%
sub-neg98.3%
sub-neg98.3%
associate-*l*92.0%
associate-*l*91.9%
Simplified91.9%
Taylor expanded in a around inf 53.0%
associate-*r*53.0%
*-commutative53.0%
associate-*r*53.0%
Simplified53.0%
if -2.94999999999999983e32 < b < 4.2000000000000001e114Initial program 94.7%
sub-neg94.7%
sub-neg94.7%
associate-*l*96.4%
associate-*l*96.9%
Simplified96.9%
Taylor expanded in a around 0 79.3%
cancel-sign-sub-inv79.3%
*-commutative79.3%
associate-*r*79.4%
metadata-eval79.4%
Applied egg-rr79.4%
if 4.2000000000000001e114 < b < 2.4e136 or 7.4999999999999995e161 < b Initial program 92.1%
sub-neg92.1%
sub-neg92.1%
associate-*l*92.2%
associate-*l*92.1%
Simplified92.1%
Taylor expanded in y around 0 90.5%
if 2.4e136 < b < 7.4999999999999995e161Initial program 84.1%
sub-neg84.1%
sub-neg84.1%
associate-*l*99.2%
associate-*l*99.2%
Simplified99.2%
Taylor expanded in a around 0 84.4%
Taylor expanded in y around inf 100.0%
Taylor expanded in x around 0 100.0%
Final simplification74.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* 27.0 (* a b))) (t_2 (- t_1 (* 9.0 (* t (* y z))))))
(if (<= b -3.1e-55)
t_2
(if (<= b 9e+50)
(+ (* (* t -9.0) (* y z)) (* x 2.0))
(if (<= b 9.5e+212) t_2 (+ t_1 (* x 2.0)))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double t_2 = t_1 - (9.0 * (t * (y * z)));
double tmp;
if (b <= -3.1e-55) {
tmp = t_2;
} else if (b <= 9e+50) {
tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
} else if (b <= 9.5e+212) {
tmp = t_2;
} 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.
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 = 27.0d0 * (a * b)
t_2 = t_1 - (9.0d0 * (t * (y * z)))
if (b <= (-3.1d-55)) then
tmp = t_2
else if (b <= 9d+50) then
tmp = ((t * (-9.0d0)) * (y * z)) + (x * 2.0d0)
else if (b <= 9.5d+212) then
tmp = t_2
else
tmp = t_1 + (x * 2.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = 27.0 * (a * b);
double t_2 = t_1 - (9.0 * (t * (y * z)));
double tmp;
if (b <= -3.1e-55) {
tmp = t_2;
} else if (b <= 9e+50) {
tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
} else if (b <= 9.5e+212) {
tmp = t_2;
} else {
tmp = t_1 + (x * 2.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = 27.0 * (a * b) t_2 = t_1 - (9.0 * (t * (y * z))) tmp = 0 if b <= -3.1e-55: tmp = t_2 elif b <= 9e+50: tmp = ((t * -9.0) * (y * z)) + (x * 2.0) elif b <= 9.5e+212: tmp = t_2 else: tmp = t_1 + (x * 2.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(27.0 * Float64(a * b)) t_2 = Float64(t_1 - Float64(9.0 * Float64(t * Float64(y * z)))) tmp = 0.0 if (b <= -3.1e-55) tmp = t_2; elseif (b <= 9e+50) tmp = Float64(Float64(Float64(t * -9.0) * Float64(y * z)) + Float64(x * 2.0)); elseif (b <= 9.5e+212) tmp = t_2; 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])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = 27.0 * (a * b);
t_2 = t_1 - (9.0 * (t * (y * z)));
tmp = 0.0;
if (b <= -3.1e-55)
tmp = t_2;
elseif (b <= 9e+50)
tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
elseif (b <= 9.5e+212)
tmp = t_2;
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.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 - N[(9.0 * N[(t * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -3.1e-55], t$95$2, If[LessEqual[b, 9e+50], N[(N[(N[(t * -9.0), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 9.5e+212], t$95$2, 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])\\
\\
\begin{array}{l}
t_1 := 27 \cdot \left(a \cdot b\right)\\
t_2 := t\_1 - 9 \cdot \left(t \cdot \left(y \cdot z\right)\right)\\
\mathbf{if}\;b \leq -3.1 \cdot 10^{-55}:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;b \leq 9 \cdot 10^{+50}:\\
\;\;\;\;\left(t \cdot -9\right) \cdot \left(y \cdot z\right) + x \cdot 2\\
\mathbf{elif}\;b \leq 9.5 \cdot 10^{+212}:\\
\;\;\;\;t\_2\\
\mathbf{else}:\\
\;\;\;\;t\_1 + x \cdot 2\\
\end{array}
\end{array}
if b < -3.09999999999999997e-55 or 9.00000000000000027e50 < b < 9.4999999999999993e212Initial program 96.3%
sub-neg96.3%
sub-neg96.3%
associate-*l*93.0%
associate-*l*93.9%
Simplified93.9%
Taylor expanded in x around 0 78.6%
if -3.09999999999999997e-55 < b < 9.00000000000000027e50Initial program 94.0%
sub-neg94.0%
sub-neg94.0%
associate-*l*96.9%
associate-*l*96.9%
Simplified96.9%
Taylor expanded in a around 0 79.5%
cancel-sign-sub-inv79.5%
*-commutative79.5%
associate-*r*79.6%
metadata-eval79.6%
Applied egg-rr79.6%
if 9.4999999999999993e212 < b Initial program 93.3%
sub-neg93.3%
sub-neg93.3%
associate-*l*93.3%
associate-*l*93.1%
Simplified93.1%
Taylor expanded in y around 0 100.0%
Final simplification80.3%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= t 8.2e+27) (+ (+ (* x 2.0) (* z (* y (* t -9.0)))) (* a (* 27.0 b))) (* t (- (+ (* 2.0 (/ x t)) (* 27.0 (/ (* a b) t))) (* 9.0 (* y z))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 8.2e+27) {
tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
} else {
tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (y * z)));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= 8.2d+27) then
tmp = ((x * 2.0d0) + (z * (y * (t * (-9.0d0))))) + (a * (27.0d0 * b))
else
tmp = t * (((2.0d0 * (x / t)) + (27.0d0 * ((a * b) / t))) - (9.0d0 * (y * z)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 8.2e+27) {
tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
} else {
tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (y * z)));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= 8.2e+27: tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b)) else: tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (y * z))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 8.2e+27) tmp = Float64(Float64(Float64(x * 2.0) + Float64(z * Float64(y * Float64(t * -9.0)))) + Float64(a * Float64(27.0 * b))); else tmp = Float64(t * Float64(Float64(Float64(2.0 * Float64(x / t)) + Float64(27.0 * Float64(Float64(a * b) / t))) - Float64(9.0 * Float64(y * z)))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (t <= 8.2e+27)
tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
else
tmp = t * (((2.0 * (x / t)) + (27.0 * ((a * b) / t))) - (9.0 * (y * z)));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 8.2e+27], N[(N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t * N[(N[(N[(2.0 * N[(x / t), $MachinePrecision]), $MachinePrecision] + N[(27.0 * N[(N[(a * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 8.2 \cdot 10^{+27}:\\
\;\;\;\;\left(x \cdot 2 + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(\left(2 \cdot \frac{x}{t} + 27 \cdot \frac{a \cdot b}{t}\right) - 9 \cdot \left(y \cdot z\right)\right)\\
\end{array}
\end{array}
if t < 8.2000000000000005e27Initial program 94.2%
sub-neg94.2%
sub-neg94.2%
associate-*l*97.4%
associate-*l*97.9%
Simplified97.9%
sub-neg97.9%
*-commutative97.9%
distribute-rgt-neg-in97.9%
*-commutative97.9%
distribute-lft-neg-in97.9%
metadata-eval97.9%
associate-*l*98.3%
associate-*r*98.3%
associate-*l*96.0%
Applied egg-rr96.0%
if 8.2000000000000005e27 < t Initial program 97.9%
sub-neg97.9%
sub-neg97.9%
associate-*l*86.4%
associate-*l*86.4%
Simplified86.4%
Taylor expanded in t around inf 99.7%
Final simplification96.8%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (* (* y 9.0) z)))
(if (<= t_1 2e+101)
(+ (- (* x 2.0) (* t_1 t)) (* (* a 27.0) b))
(+ (+ (* x 2.0) (* z (* y (* t -9.0)))) (* a (* 27.0 b))))))assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * 9.0) * z;
double tmp;
if (t_1 <= 2e+101) {
tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b);
} else {
tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: t_1
real(8) :: tmp
t_1 = (y * 9.0d0) * z
if (t_1 <= 2d+101) then
tmp = ((x * 2.0d0) - (t_1 * t)) + ((a * 27.0d0) * b)
else
tmp = ((x * 2.0d0) + (z * (y * (t * (-9.0d0))))) + (a * (27.0d0 * b))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double t_1 = (y * 9.0) * z;
double tmp;
if (t_1 <= 2e+101) {
tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b);
} else {
tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): t_1 = (y * 9.0) * z tmp = 0 if t_1 <= 2e+101: tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b) else: tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) t_1 = Float64(Float64(y * 9.0) * z) tmp = 0.0 if (t_1 <= 2e+101) tmp = Float64(Float64(Float64(x * 2.0) - Float64(t_1 * t)) + Float64(Float64(a * 27.0) * b)); else tmp = Float64(Float64(Float64(x * 2.0) + Float64(z * Float64(y * Float64(t * -9.0)))) + Float64(a * Float64(27.0 * b))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
t_1 = (y * 9.0) * z;
tmp = 0.0;
if (t_1 <= 2e+101)
tmp = ((x * 2.0) - (t_1 * t)) + ((a * 27.0) * b);
else
tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[t$95$1, 2e+101], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(t$95$1 * t), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
t_1 := \left(y \cdot 9\right) \cdot z\\
\mathbf{if}\;t\_1 \leq 2 \cdot 10^{+101}:\\
\;\;\;\;\left(x \cdot 2 - t\_1 \cdot t\right) + \left(a \cdot 27\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\right) + a \cdot \left(27 \cdot b\right)\\
\end{array}
\end{array}
if (*.f64 (*.f64 y #s(literal 9 binary64)) z) < 2e101Initial program 97.6%
if 2e101 < (*.f64 (*.f64 y #s(literal 9 binary64)) z) Initial program 81.2%
sub-neg81.2%
sub-neg81.2%
associate-*l*95.1%
associate-*l*95.0%
Simplified95.0%
sub-neg95.0%
*-commutative95.0%
distribute-rgt-neg-in95.0%
*-commutative95.0%
distribute-lft-neg-in95.0%
metadata-eval95.0%
associate-*l*97.2%
associate-*r*97.1%
associate-*l*97.3%
Applied egg-rr97.3%
Final simplification97.5%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z -3.5e-127) (+ (+ (* x 2.0) (* z (* y (* t -9.0)))) (* a (* 27.0 b))) (+ (* (* a 27.0) b) (- (* x 2.0) (* t (* 9.0 (* y z)))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.5e-127) {
tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
} else {
tmp = ((a * 27.0) * b) + ((x * 2.0) - (t * (9.0 * (y * z))));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-3.5d-127)) then
tmp = ((x * 2.0d0) + (z * (y * (t * (-9.0d0))))) + (a * (27.0d0 * b))
else
tmp = ((a * 27.0d0) * b) + ((x * 2.0d0) - (t * (9.0d0 * (y * z))))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -3.5e-127) {
tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
} else {
tmp = ((a * 27.0) * b) + ((x * 2.0) - (t * (9.0 * (y * z))));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -3.5e-127: tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b)) else: tmp = ((a * 27.0) * b) + ((x * 2.0) - (t * (9.0 * (y * z)))) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -3.5e-127) tmp = Float64(Float64(Float64(x * 2.0) + Float64(z * Float64(y * Float64(t * -9.0)))) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(Float64(a * 27.0) * b) + Float64(Float64(x * 2.0) - Float64(t * Float64(9.0 * Float64(y * z))))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -3.5e-127)
tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
else
tmp = ((a * 27.0) * b) + ((x * 2.0) - (t * (9.0 * (y * z))));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -3.5e-127], N[(N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision] + N[(N[(x * 2.0), $MachinePrecision] - N[(t * N[(9.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.5 \cdot 10^{-127}:\\
\;\;\;\;\left(x \cdot 2 + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot 27\right) \cdot b + \left(x \cdot 2 - t \cdot \left(9 \cdot \left(y \cdot z\right)\right)\right)\\
\end{array}
\end{array}
if z < -3.49999999999999989e-127Initial program 91.3%
sub-neg91.3%
sub-neg91.3%
associate-*l*92.3%
associate-*l*93.3%
Simplified93.3%
sub-neg93.3%
*-commutative93.3%
distribute-rgt-neg-in93.3%
*-commutative93.3%
distribute-lft-neg-in93.3%
metadata-eval93.3%
associate-*l*94.3%
associate-*r*94.2%
associate-*l*95.4%
Applied egg-rr95.4%
if -3.49999999999999989e-127 < z Initial program 97.0%
Taylor expanded in y around 0 97.0%
Final simplification96.4%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= t 3.25e+153) (+ (+ (* x 2.0) (* z (* y (* t -9.0)))) (* a (* 27.0 b))) (+ (* (* t -9.0) (* y z)) (* x 2.0))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 3.25e+153) {
tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
} else {
tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (t <= 3.25d+153) then
tmp = ((x * 2.0d0) + (z * (y * (t * (-9.0d0))))) + (a * (27.0d0 * b))
else
tmp = ((t * (-9.0d0)) * (y * z)) + (x * 2.0d0)
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (t <= 3.25e+153) {
tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
} else {
tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if t <= 3.25e+153: tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b)) else: tmp = ((t * -9.0) * (y * z)) + (x * 2.0) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (t <= 3.25e+153) tmp = Float64(Float64(Float64(x * 2.0) + Float64(z * Float64(y * Float64(t * -9.0)))) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(Float64(t * -9.0) * Float64(y * z)) + Float64(x * 2.0)); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (t <= 3.25e+153)
tmp = ((x * 2.0) + (z * (y * (t * -9.0)))) + (a * (27.0 * b));
else
tmp = ((t * -9.0) * (y * z)) + (x * 2.0);
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, 3.25e+153], N[(N[(N[(x * 2.0), $MachinePrecision] + N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t * -9.0), $MachinePrecision] * N[(y * z), $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])\\
\\
\begin{array}{l}
\mathbf{if}\;t \leq 3.25 \cdot 10^{+153}:\\
\;\;\;\;\left(x \cdot 2 + z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(t \cdot -9\right) \cdot \left(y \cdot z\right) + x \cdot 2\\
\end{array}
\end{array}
if t < 3.24999999999999986e153Initial program 94.9%
sub-neg94.9%
sub-neg94.9%
associate-*l*96.9%
associate-*l*97.3%
Simplified97.3%
sub-neg97.3%
*-commutative97.3%
distribute-rgt-neg-in97.3%
*-commutative97.3%
distribute-lft-neg-in97.3%
metadata-eval97.3%
associate-*l*97.7%
associate-*r*97.7%
associate-*l*96.0%
Applied egg-rr96.0%
if 3.24999999999999986e153 < t Initial program 96.2%
sub-neg96.2%
sub-neg96.2%
associate-*l*78.6%
associate-*l*78.6%
Simplified78.6%
Taylor expanded in a around 0 82.0%
cancel-sign-sub-inv82.0%
*-commutative82.0%
associate-*r*82.2%
metadata-eval82.2%
Applied egg-rr82.2%
Final simplification94.6%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (<= z -4.4e+28) (* -9.0 (* z (* y t))) (if (<= z 4.2e-65) (+ (* 27.0 (* a b)) (* x 2.0)) (* z (* y (* t -9.0))))))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.4e+28) {
tmp = -9.0 * (z * (y * t));
} else if (z <= 4.2e-65) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = z * (y * (t * -9.0));
}
return tmp;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (z <= (-4.4d+28)) then
tmp = (-9.0d0) * (z * (y * t))
else if (z <= 4.2d-65) then
tmp = (27.0d0 * (a * b)) + (x * 2.0d0)
else
tmp = z * (y * (t * (-9.0d0)))
end if
code = tmp
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (z <= -4.4e+28) {
tmp = -9.0 * (z * (y * t));
} else if (z <= 4.2e-65) {
tmp = (27.0 * (a * b)) + (x * 2.0);
} else {
tmp = z * (y * (t * -9.0));
}
return tmp;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): tmp = 0 if z <= -4.4e+28: tmp = -9.0 * (z * (y * t)) elif z <= 4.2e-65: tmp = (27.0 * (a * b)) + (x * 2.0) else: tmp = z * (y * (t * -9.0)) return tmp
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) tmp = 0.0 if (z <= -4.4e+28) tmp = Float64(-9.0 * Float64(z * Float64(y * t))); elseif (z <= 4.2e-65) tmp = Float64(Float64(27.0 * Float64(a * b)) + Float64(x * 2.0)); else tmp = Float64(z * Float64(y * Float64(t * -9.0))); end return tmp end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if (z <= -4.4e+28)
tmp = -9.0 * (z * (y * t));
elseif (z <= 4.2e-65)
tmp = (27.0 * (a * b)) + (x * 2.0);
else
tmp = z * (y * (t * -9.0));
end
tmp_2 = tmp;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := If[LessEqual[z, -4.4e+28], N[(-9.0 * N[(z * N[(y * t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 4.2e-65], N[(N[(27.0 * N[(a * b), $MachinePrecision]), $MachinePrecision] + N[(x * 2.0), $MachinePrecision]), $MachinePrecision], N[(z * N[(y * N[(t * -9.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.4 \cdot 10^{+28}:\\
\;\;\;\;-9 \cdot \left(z \cdot \left(y \cdot t\right)\right)\\
\mathbf{elif}\;z \leq 4.2 \cdot 10^{-65}:\\
\;\;\;\;27 \cdot \left(a \cdot b\right) + x \cdot 2\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(y \cdot \left(t \cdot -9\right)\right)\\
\end{array}
\end{array}
if z < -4.39999999999999973e28Initial program 89.0%
sub-neg89.0%
sub-neg89.0%
associate-*l*90.3%
associate-*l*91.9%
Simplified91.9%
Taylor expanded in t around inf 84.2%
Taylor expanded in t around inf 64.6%
*-commutative64.6%
*-commutative64.6%
associate-*l*67.8%
*-commutative67.8%
Simplified67.8%
if -4.39999999999999973e28 < z < 4.20000000000000006e-65Initial program 98.9%
sub-neg98.9%
sub-neg98.9%
associate-*l*99.0%
associate-*l*98.9%
Simplified98.9%
Taylor expanded in y around 0 83.4%
if 4.20000000000000006e-65 < z Initial program 93.6%
Taylor expanded in y around 0 93.6%
Taylor expanded in y around inf 50.6%
associate-*r*50.6%
associate-*r*54.2%
associate-*r*54.2%
*-commutative54.2%
associate-*r*54.2%
*-commutative54.2%
*-commutative54.2%
Simplified54.2%
Final simplification71.1%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (if (or (<= a -7.2e+97) (not (<= a 2.9e-75))) (* 27.0 (* a b)) (* x 2.0)))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -7.2e+97) || !(a <= 2.9e-75)) {
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.
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 <= (-7.2d+97)) .or. (.not. (a <= 2.9d-75))) 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;
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if ((a <= -7.2e+97) || !(a <= 2.9e-75)) {
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]) def code(x, y, z, t, a, b): tmp = 0 if (a <= -7.2e+97) or not (a <= 2.9e-75): 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]) function code(x, y, z, t, a, b) tmp = 0.0 if ((a <= -7.2e+97) || !(a <= 2.9e-75)) 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])){:}
function tmp_2 = code(x, y, z, t, a, b)
tmp = 0.0;
if ((a <= -7.2e+97) || ~((a <= 2.9e-75)))
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. code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[a, -7.2e+97], N[Not[LessEqual[a, 2.9e-75]], $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])\\
\\
\begin{array}{l}
\mathbf{if}\;a \leq -7.2 \cdot 10^{+97} \lor \neg \left(a \leq 2.9 \cdot 10^{-75}\right):\\
\;\;\;\;27 \cdot \left(a \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot 2\\
\end{array}
\end{array}
if a < -7.19999999999999932e97 or 2.9000000000000002e-75 < a Initial program 94.1%
sub-neg94.1%
sub-neg94.1%
associate-*l*94.1%
associate-*l*94.9%
Simplified94.9%
Taylor expanded in a around inf 53.6%
if -7.19999999999999932e97 < a < 2.9000000000000002e-75Initial program 95.8%
sub-neg95.8%
sub-neg95.8%
associate-*l*95.7%
associate-*l*95.7%
Simplified95.7%
Taylor expanded in x around inf 40.8%
Final simplification46.7%
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. (FPCore (x y z t a b) :precision binary64 (* x 2.0))
assert(x < y && y < z && z < t && t < a && a < b);
double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function.
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
code = x * 2.0d0
end function
assert x < y && y < z && z < t && t < a && a < b;
public static double code(double x, double y, double z, double t, double a, double b) {
return x * 2.0;
}
[x, y, z, t, a, b] = sort([x, y, z, t, a, b]) def code(x, y, z, t, a, b): return x * 2.0
x, y, z, t, a, b = sort([x, y, z, t, a, b]) function code(x, y, z, t, a, b) return Float64(x * 2.0) end
x, y, z, t, a, b = num2cell(sort([x, y, z, t, a, b])){:}
function tmp = code(x, y, z, t, a, b)
tmp = x * 2.0;
end
NOTE: x, y, z, t, a, and b should be sorted in increasing order before calling this function. code[x_, y_, z_, t_, a_, b_] := N[(x * 2.0), $MachinePrecision]
\begin{array}{l}
[x, y, z, t, a, b] = \mathsf{sort}([x, y, z, t, a, b])\\
\\
x \cdot 2
\end{array}
Initial program 95.0%
sub-neg95.0%
sub-neg95.0%
associate-*l*95.0%
associate-*l*95.3%
Simplified95.3%
Taylor expanded in x around inf 32.3%
Final simplification32.3%
(FPCore (x y z t a b) :precision binary64 (if (< y 7.590524218811189e-161) (+ (- (* x 2.0) (* (* (* y 9.0) z) t)) (* a (* 27.0 b))) (+ (- (* x 2.0) (* 9.0 (* y (* t z)))) (* (* a 27.0) b))))
double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y < 7.590524218811189e-161) {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
}
return tmp;
}
real(8) function code(x, y, z, t, a, b)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8), intent (in) :: t
real(8), intent (in) :: a
real(8), intent (in) :: b
real(8) :: tmp
if (y < 7.590524218811189d-161) then
tmp = ((x * 2.0d0) - (((y * 9.0d0) * z) * t)) + (a * (27.0d0 * b))
else
tmp = ((x * 2.0d0) - (9.0d0 * (y * (t * z)))) + ((a * 27.0d0) * b)
end if
code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
double tmp;
if (y < 7.590524218811189e-161) {
tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b));
} else {
tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b);
}
return tmp;
}
def code(x, y, z, t, a, b): tmp = 0 if y < 7.590524218811189e-161: tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b)) else: tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b) return tmp
function code(x, y, z, t, a, b) tmp = 0.0 if (y < 7.590524218811189e-161) tmp = Float64(Float64(Float64(x * 2.0) - Float64(Float64(Float64(y * 9.0) * z) * t)) + Float64(a * Float64(27.0 * b))); else tmp = Float64(Float64(Float64(x * 2.0) - Float64(9.0 * Float64(y * Float64(t * z)))) + Float64(Float64(a * 27.0) * b)); end return tmp end
function tmp_2 = code(x, y, z, t, a, b) tmp = 0.0; if (y < 7.590524218811189e-161) tmp = ((x * 2.0) - (((y * 9.0) * z) * t)) + (a * (27.0 * b)); else tmp = ((x * 2.0) - (9.0 * (y * (t * z)))) + ((a * 27.0) * b); end tmp_2 = tmp; end
code[x_, y_, z_, t_, a_, b_] := If[Less[y, 7.590524218811189e-161], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(N[(N[(y * 9.0), $MachinePrecision] * z), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision] + N[(a * N[(27.0 * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x * 2.0), $MachinePrecision] - N[(9.0 * N[(y * N[(t * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(a * 27.0), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y < 7.590524218811189 \cdot 10^{-161}:\\
\;\;\;\;\left(x \cdot 2 - \left(\left(y \cdot 9\right) \cdot z\right) \cdot t\right) + a \cdot \left(27 \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;\left(x \cdot 2 - 9 \cdot \left(y \cdot \left(t \cdot z\right)\right)\right) + \left(a \cdot 27\right) \cdot b\\
\end{array}
\end{array}
herbie shell --seed 2024092
(FPCore (x y z t a b)
:name "Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, A"
:precision binary64
:alt
(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)))