Ticket #13857: trac_13857-review.patch

File trac_13857-review.patch, 1.1 KB (added by kcrisman, 9 years ago)
  • sage/functions/min_max.py

    # HG changeset patch
    # User Karl-Dieter Crisman <kcrisman@gmail.com>
    # Date 1373482541 14400
    # Node ID e5de6e2988c78fe35ff71eea89050feef9760da0
    # Parent  956ef5e5b7ef9448ded4c09719542ecf37f66fca
    Trac 13857 - reviewer patch
    diff --git a/sage/functions/min_max.py b/sage/functions/min_max.py
    a b  
    22Symbolic Minimum and Maximum
    4 This function was introduced due to the fact that max and min were not
    5 able to deal with variables as expected. This function strives to be a better evaluator of
    6 expressions by waiting to evaluate if there are variables.
     4Sage provides a symbolic maximum and minimum due to the fact that the Python
     5builtin max and min are not able to deal with variables as users might expect.
     6These functions wait to evaluate if there are variables.
    8 Here you can see some Differences::
     8Here you can see some differences::
    1010   sage: max(x,x^2)
    1111   x
    1212   sage: max_symbolic(x,x^2)
    1313   max(x, x^2)
     14   sage: f(x) = max_symbolic(x,x^2); f(1/2)
     15   1/2
     17This works as expected for more than two entries::
    1419   sage: max(3,5,x)
    1520   5
    1621   sage: min(3,5,x)