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

Function naWriteLong

libpolys/polys/ext_fields/algext.cc:585–601  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

583}
584
585static void naWriteLong(number a, const coeffs cf)
586{
587 naTest(a);
588 if (a == NULL)
589 StringAppendS("0");
590 else
591 {
592 poly aAsPoly = (poly)a;
593 /* basically, just write aAsPoly using p_Write,
594 but use brackets around the output, if a is not
595 a constant living in naCoeffs = cf->extRing->cf */
596 BOOLEAN useBrackets = !(p_IsConstant(aAsPoly, naRing));
597 if (useBrackets) StringAppendS("(");
598 p_String0Long(aAsPoly, naRing, naRing);
599 if (useBrackets) StringAppendS(")");
600 }
601}
602
603static void naWriteShort(number a, const coeffs cf)
604{

Callers

nothing calls this directly

Calls 3

StringAppendSFunction · 0.85
p_IsConstantFunction · 0.85
p_String0LongFunction · 0.85

Tested by

no test coverage detected