Thanks for the answers! Both

plot3d(floor(min_symbolic(x, y)),(x,1,7),(y,1,7))

and

plot3d(lambda a, b: floor(min(a, b)),(x,1,7),(y,1,7))

produce the right plot.

I wonder whether the result of ?min might mention the existence of min_symbolic, and similarly for max. When the first attempt failed, I looked at what ?min said, and didn't get much out of it. Had it mentioned "see also min_symbolic" or something of the kind, that would have been a clue.

Fernando

On 9/25/2024 12:52 PM, Nils Bruin wrote:
On Wednesday 25 September 2024 at 08:34:09 UTC-7 julian...@gmail.com wrote:

    Hi Fernando,

    I believe that problem is that:

    sage: min(x, y)
    x

It may be less than ideal, but given that "min" is a built-in function which by the looks of it just picks the first element from its argument such that other elements are not strictly less than it, it is as documented.

There is min_symbolic for symbolic operation. If you care about performance, there may be a difference between using min_symbolic and using a "lambda" argument to plot. You'd need to try to see which one is faster for your application.
--
You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to sage-support+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sage-support/fa9069b8-b7c7-4ef8-89b6-49e440673e55n%40googlegroups.com <https://urldefense.com/v3/__https://groups.google.com/d/msgid/sage-support/fa9069b8-b7c7-4ef8-89b6-49e440673e55n*40googlegroups.com?utm_medium=email&utm_source=footer__;JQ!!P_zEGVH0kSMiWA!BefAaie66ByebM3xfGhIykFkogDnP59VtSVuweXCOI1rGL7VPlTzJhDBa28OVJI_avHcoN0d1ZtnAyOpTA$>.

--
=============================================================
Fernando Q. Gouveahttp://www.colby.edu/~fqgouvea
Carter Professor of Mathematics
Dept. of Mathematics
Colby College
5836 Mayflower Hill
Waterville, ME 04901

To consider persons and events and situations only in the light of
their effect upon myself is to live on the doorstep of hell.
  -- Thomas Merton

--
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-support/5e963ca6-37dc-4dd9-aa0d-b9329dcaf797%40colby.edu.

Reply via email to