Miscellaneous Functions

This file contains two 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)

Return the maximum of the inputs, where the maximum of the empty list is \(-\infty\).

EXAMPLES:

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

Return the minimum of the inputs, where the minimum of the empty list is \(\infty\).

EXAMPLES:

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