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

Function abs

IntegerProgramming/BigInt.cc:363–371  ·  view source on GitHub ↗

liefert den Absolutbetrag

Source from the content-addressed store, hash-verified

361
362// liefert den Absolutbetrag
363BigInt abs(const BigInt& a)
364{
365 BigInt erg;
366 if (mpz_sgn(a.value)<0)
367 mpz_neg(erg.value,a.value);
368 else
369 mpz_set(erg.value,a.value);
370 return erg;
371}
372
373#endif // BIG_INT_CC

Callers 2

REDI_KBFunction · 0.70
REDI_ILFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected