| 601 | } |
| 602 | |
| 603 | static void naWriteShort(number a, const coeffs cf) |
| 604 | { |
| 605 | naTest(a); |
| 606 | if (a == NULL) |
| 607 | StringAppendS("0"); |
| 608 | else |
| 609 | { |
| 610 | poly aAsPoly = (poly)a; |
| 611 | /* basically, just write aAsPoly using p_Write, |
| 612 | but use brackets around the output, if a is not |
| 613 | a constant living in naCoeffs = cf->extRing->cf */ |
| 614 | BOOLEAN useBrackets = !(p_IsConstant(aAsPoly, naRing)); |
| 615 | if (useBrackets) StringAppendS("("); |
| 616 | p_String0Short(aAsPoly, naRing, naRing); |
| 617 | if (useBrackets) StringAppendS(")"); |
| 618 | } |
| 619 | } |
| 620 | |
| 621 | static const char * naRead(const char *s, number *a, const coeffs cf) |
| 622 | { |
nothing calls this directly
no test coverage detected