Returns a new number which is the absolute value of the coefficient of the given polynomial. * * The method assumes that the coefficient has imaginary part zero. */
| 723 | * |
| 724 | * The method assumes that the coefficient has imaginary part zero. */ |
| 725 | number absValue(poly p) |
| 726 | { |
| 727 | if (p == NULL) return nInit(0); |
| 728 | number result = nCopy(pGetCoeff(p)); |
| 729 | if (!nGreaterZero(result)) result = nInpNeg(result); |
| 730 | return result; |
| 731 | } |
| 732 | |
| 733 | bool subMatrix(const matrix aMat, const int rowIndex1, const int rowIndex2, |
| 734 | const int colIndex1, const int colIndex2, matrix &subMat) |