# 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
|
|
1 | 1 | r""" |
2 | 2 | Symbolic Minimum and Maximum |
3 | 3 | |
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. |
| 4 | Sage provides a symbolic maximum and minimum due to the fact that the Python |
| 5 | builtin max and min are not able to deal with variables as users might expect. |
| 6 | These functions wait to evaluate if there are variables. |
7 | 7 | |
8 | | Here you can see some Differences:: |
| 8 | Here you can see some differences:: |
9 | 9 | |
10 | 10 | sage: max(x,x^2) |
11 | 11 | x |
12 | 12 | sage: max_symbolic(x,x^2) |
13 | 13 | max(x, x^2) |
| 14 | sage: f(x) = max_symbolic(x,x^2); f(1/2) |
| 15 | 1/2 |
| 16 | |
| 17 | This works as expected for more than two entries:: |
| 18 | |
14 | 19 | sage: max(3,5,x) |
15 | 20 | 5 |
16 | 21 | sage: min(3,5,x) |