acer

32303 Reputation

29 Badges

19 years, 310 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

Trying to be tricky. unprotect(LinearAlgebra:-Multiply); Z:=copy(LinearAlgebra:-Multiply): LinearAlgebra:-Multiply:=proc() if args[1]=`#mo("∇")` or args[1]=`#mo("∇")` then args[1](args[2]); else Z(args); end if; end proc: `#mo("∇")`:=proc(V::Vector) map(sin,V); end proc: `#mo("∇")`:=`#mo("∇")`: Now insert the Del symbol from the palette, and toggle it as Atomic Identifier, and it can be used without the brackets. That is to say, I was able to do 2D things like, V V V I didn't check to see whether I'd broken LinearAlgebra:-Multiply. I could still do, V V There may be some simple way to customize it, which someone else can suggest. It might also be possible to use instead a module for the redefined multiplication, but I didn't try. acer
A quick peek at the code Library code of the depends() routine shows a bit of the logic. That is, by issuing, showstat(depends); It looks as if `depends` returns false if `has` returns false (modulo some indexed name funny business). The converse is the interesting question, I suppose. The routine `depends/internal` does further analysis, and you can see how it handles some special structures with another showstat() call on it. Having peeked, a little imagination can conjure up some cases that are missing. For example,
> a := SDMPolynom(t^3+5*t^2+11*t+15,t);
                                   3      2
                  a := SDMPolynom(t  + 5 t  + 11 t + 15, [t])
 
> has(a,t);
                                     true
 
> depends(a,t); # whoops
Error, (in depends/internal) invalid input: depends/internal uses a 2nd
argument, x, which is missing
I don't know whether you consider the `x` in a data structure like SDMPolynom -- which represents a polynomial -- to be a dummy variable or not. acer
A quick peek at the code Library code of the depends() routine shows a bit of the logic. That is, by issuing, showstat(depends); It looks as if `depends` returns false if `has` returns false (modulo some indexed name funny business). The converse is the interesting question, I suppose. The routine `depends/internal` does further analysis, and you can see how it handles some special structures with another showstat() call on it. Having peeked, a little imagination can conjure up some cases that are missing. For example,
> a := SDMPolynom(t^3+5*t^2+11*t+15,t);
                                   3      2
                  a := SDMPolynom(t  + 5 t  + 11 t + 15, [t])
 
> has(a,t);
                                     true
 
> depends(a,t); # whoops
Error, (in depends/internal) invalid input: depends/internal uses a 2nd
argument, x, which is missing
I don't know whether you consider the `x` in a data structure like SDMPolynom -- which represents a polynomial -- to be a dummy variable or not. acer
He was asking whether depends() and has() are equivalent, aside from cases using "dummy" variables like for Int and Sum, etc. acer
He was asking whether depends() and has() are equivalent, aside from cases using "dummy" variables like for Int and Sum, etc. acer
Well, yes. Exactly. For 2D input, the space between the function name and the brackets is parsed as a multiplication, while in 1D input it's parsed as a function call. Having different parsers behave in different ways on things like this is not good. acer
Well, yes. Exactly. For 2D input, the space between the function name and the brackets is parsed as a multiplication, while in 1D input it's parsed as a function call. Having different parsers behave in different ways on things like this is not good. acer
Another trap: If a space is inserted between the `int` and the open-bracket then the parsed meaning is different in 1D and 2D input. acer
Another trap: If a space is inserted between the `int` and the open-bracket then the parsed meaning is different in 1D and 2D input. acer
Yes, and there are connections between the authors. Aside from papers on calculating Pi, etc, there also seems to have been some contention in the past, though I know nothing about the truth of it all. acer
You have described close to the usual way in which LaTeX output, and Maple's latex() command, are supposed to work. But, instead of having to copy the .sty files all over, it should be possible to just append the TEXINPUTS environment variable with /etc (or \ETC I guess, if you use Windows). That environment variable is used by latex and tex as a search path. acer
I hardly ever use any CAS other than Maple. I sometimes use Matlab. But even then, it is mostly for Simulink. I usually do that from Maple's own evalM() command. On occasion, I will benchmark parts of the two systems. I only very rarely use Mathematica. I do not like Mathematica's model for numerical computations. acer
Thanks, but I was hoping that finer, low-level detail would be instructional for us all. For example given a Maple set S, whose elements are ordered by memory address, adding a new element could be fast since no comparison with the current order is necessary. (That seems to me to be what you were driving at.) But I also wonder about the mechanics of accessing elements. What precisely happens when one issues, `for i in S do...end do`? Does memory address ordering help there, or hinder, and why? acer
It's just a guess, but I suspect that some internal routine with option `remember,system` may be caching some of the the partial sum computations. But then, if a garbage collection takes place and its remember table is cleared, then the full computation might take a different path. Just a wild guess, though. The bug doesn't seem intermittent, no? Are both 0 and -infinity wrong results, even if they alternate? acer
Relying on creation order to be the same as memory address order would of course be misguided. Once memory management kicks in, and garbage is collected and memory freed, new objects might have addresses all over the place. I wanted to give the original poster (a Maple newcomer) a simple explanation for the behaviour being seen by the students. I believe those examples might illustrate what was going on. Perhaps you might expound a bit, Bryan, on why Maple behaves this way. Ie, for performance in accessing objects, or for memory by holding unique representations of some objects no matter how often they are input or arise, etc. We generally know some of the drawbacks of session dependent ordering of results, but it'd be refreshing to hear some of the benefits. acer
First 560 561 562 563 564 565 566 Last Page 562 of 591