Miscellaneous Functions

This file contains some miscellaneous functions used by p-adics.

  • min – a version of min that returns \(\infty\) on empty input.
  • max – a version of max that returns \(-\infty\) on empty input.

AUTHORS:

  • David Roe
sage.rings.padics.misc.max(*L)

Returns the maximum of the inputs, where the maximum of the empty list is -infinity.

EXAMPLES:

sage: from sage.rings.padics.misc import max
sage: max()
-Infinity
sage: max(2,3)
3
sage.rings.padics.misc.min(*L)

Returns the minimum of the inputs, where the minimum of the empty list is infinity.

EXAMPLES:

sage: from sage.rings.padics.misc import min
sage: min()
+Infinity
sage: min(2,3)
2

Previous topic

Precision Error

This Page