[sage-support] Re: Symbic callable Boolean Functions

2015-12-05 Thread Nils Bruin
On Saturday, December 5, 2015 at 10:49:46 PM UTC-5, Prakash Dey wrote: > > > x,y -> symbolic boolean variables > f ---> symbolic Boolean function > > Does sage: P.=BooleanPolynomialRing(); sage: f=x+y sage: f(1,0) 1 sage: f(1,1) 0 sage: f+x y do the trick for you? -- You received this m

[sage-support] Symbic callable Boolean Functions

2015-12-05 Thread Prakash Dey
The following works perfectly in sage sage: x, y = var('x y') sage: f = function('f') sage: f(x+x+y) f(2*x + y) sage: f(x+x+y) + f(y) f(2*x + y) + f(y) Now I want to know whether symbolic callable Boolean functions can be created in sage which will exhibit the following characteristics: x,y -

Re: [sage-support] Plotting multiple surfaces (multiple-valued functions) ?

2015-12-05 Thread William Stein
On Sat, Dec 5, 2015 at 12:15 PM, Emmanuel Charpentier wrote: > Closely related to this question, I have another : > > plot() seems to have no difficuty in plotting multivalued functions : > def racines(x): > return([-sqrt(x),sqrt(x)]) > plot(racines(x),(x,0,1)) > displays two half-arcs of para

Re: [sage-support] Plotting surfaces with holes ?

2015-12-05 Thread William Stein
On Sat, Dec 5, 2015 at 12:03 PM, Emmanuel Charpentier wrote: > Plot2d() gracefully handles plotting a fnction undefined (in real terms) on > part of the plotting domain. For example : > plot(sqrt(x^2-1),(x,-3/2,3.2)) > displays two half-axes of hyperbole, and waons that some points have been > los

[sage-support] Re: Plotting surfaces with holes ?

2015-12-05 Thread Emmanuel Charpentier
Of course, there is no such thing as plot2d(). Thinko... Please read plot() ... Le samedi 5 décembre 2015 21:03:04 UTC+1, Emmanuel Charpentier a écrit : > > Plot2d() gracefully handles plotting a fnction undefined (in real terms) > on part of the plotting domain. For example : > plot(sqrt(x^2-1),

[sage-support] Plotting multiple surfaces (multiple-valued functions) ?

2015-12-05 Thread Emmanuel Charpentier
Closely related to this question , I have another : plot() seems to have no difficuty in plotting multivalued functions : def racines(x): return([-sqrt(x),sqrt(x)]) plot(racines(x),(x,0,1)) displays two half-arcs of parabola.

[sage-support] Plotting surfaces with holes ?

2015-12-05 Thread Emmanuel Charpentier
Plot2d() gracefully handles plotting a fnction undefined (in real terms) on part of the plotting domain. For example : plot(sqrt(x^2-1),(x,-3/2,3.2)) displays two half-axes of hyperbole, and waons that some points have been lost. plot3d() seems to lack this facility : an undefined point causes t