roman_pearce

Mr. Roman Pearce

1688 Reputation

19 Badges

20 years, 50 days
CECM/SFU
Research Associate
Abbotsford, British Columbia, Canada

I am a research associate at Simon Fraser University and a member of the Computer Algebra Group at the CECM.

MaplePrimes Activity


These are replies submitted by roman_pearce

I don't think I need to. The people there can compute the correct answer using other computer algebra systems - including Magma if they use a different algorithm. There's nothing special about Maple.
It is the wrong answer, and it can be verified in Maple:
G := Groebner[Basis]([y + (1+x^5+x^10), x^34 +1], plex(x,y), characteristic=35098201);
map(sort, G, [x,y], plex);
Look at the coefficient of y^2 in G[1]. Note that Maple sorts the Groebner basis in the opposite order of Magma. Cool program, by the way.
Reproduced on OS X 10.3.9 running Maple 10.01. The result with the global variable _Z13~ is the most general solution. You can use the about command to check that _Z13~ is assumed to be an integer. Anyways, if you get this solution out of solve that is fine. The case to be concerned about is if you set _EnvAllSolutions := true; and you get the first result with 1, -1, etc. That's a bug, although "solving equations" is hardly a process where you can expect a deterministic answer.
How about limiting it to algorithms or techniques ? I would suggest the Euclidean algorithm, Newton's method, Gaussian elimination, the simplex method, the FFT, etc.
How about limiting it to algorithms or techniques ? I would suggest the Euclidean algorithm, Newton's method, Gaussian elimination, the simplex method, the FFT, etc.
(see argument below)
Ok, I see your point. You are correct, this is not a bug.
In the original post h is assigned g and then g is assigned a copy of h.
Most algorithms in Maple are not proprietary, you can find them in textbooks for computer algebra, the Journal of Symbolic computation, and the proceedings of the many conferences held on the subject - ISSAC in particular. The LinearAlgebra package however is a rather large beast. Most of the package commands process arguments before calling the actual routine in the submodule LA_Main. You can see the routine using the following > showstat(LinearAlgebra:-LA_Main:-Eigenvalues); .... If you look down near the bottom, you'll see that it computes the characteristic polynomial and factors it. The CharacteristicPolynomial command uses Berkowitz's algorithm. You can find a reference on the help page ?CharacteristicPolynomial.
But later g is reassigned to a copy of itself. Here is a version of the bug that might be easier to see.
f := table([1=1]);
g := f;
f := copy(g);
g[1] := 2;
f[1];    
Yes, this is a bug. What's interesting is that it is a very old bug, going back to at least Maple V Release 4.
The issue here is with evalf and Re, specifically: > evalf(Re(a)); On Maple 9.5 evalf outputs a floating-point approximation to the real part of a. On Maple 10 it returns a complex number. I'm guessing that Maple 9.5 has some fallback code which calls Re(evalf(a)) instead, and for some reason that was changed.
The sqrt function, like the root function, returns the principal branch when the entry is numeric. ie: for a positive real number it returns the positive root. If you need other roots you can use the RootOf function with an index. For example, RootOf(x^2-4, index=1) gives the principal branch, while RootOf(x^2-4, index=2) gives the other root. This works for higher degree equations as well, the index orders the roots counterclockwise starting from the positive real axis. See ?RootOf,indexed for more information. You need to use the simplify command to convert the RootOfs to numbers.
You have to do interface(verboseproc=2); before you can see internal procedures. Also, kernelopts(opaquemodules=false); will allow you to see inside modules.
It could be anything, so the problem has to be tracked down. Can you post the code for the procedure ? Also, can you give us some indication of what it does ?
First 35 36 37 38 39 Page 37 of 39