MCPcopy Create free account
hub / github.com/Singular/Singular / naWriteShort

Function naWriteShort

libpolys/polys/ext_fields/algext.cc:603–619  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

601}
602
603static 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
621static const char * naRead(const char *s, number *a, const coeffs cf)
622{

Callers

nothing calls this directly

Calls 3

StringAppendSFunction · 0.85
p_IsConstantFunction · 0.85
p_String0ShortFunction · 0.85

Tested by

no test coverage detected