sursumCorda

1174 Reputation

13 Badges

2 years, 76 days

MaplePrimes Activity


These are replies submitted by sursumCorda

You have to install it first: 

Python:-PackageTool:-install("matplotlib"):
Python:-ImportModule("matplotlib as mpl");

However, this library is somewhat useless in Maple as 

Python:-ImportModule("matplotlib.pylab as pl"):
Python:-EvalFunction("pl.show");
sys:1: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown

                          Python:-None

Python:-PackageTool:-uninstall("matplotlib");

@nm One may simply use: 

unassign('`tools/genglobal/name_counter`[evaln(_C)]')
# or `tools/genglobal/name_counter`[evaln(_C)] := -1:

@vv Thanks. The strange thing is that, although Maple is capable of computing 1/limit(expr, x = infinity) correctly, Maple fails to compute limit(1/expr, x = infinity) correctly. 

@Axel Vogt It is 1/24. But what I computed above is its reciprocal.

Anyway, I believe that such a feature will become a new (and built-in) functionality in the up-coming version (which may be released early next month). 

@Tokoro Sorry, is there any references? 

@WA573 You may set “'connect' = true” in plots:-pointplot.
Alternatively, 

p1 := plots:-listplot(x_values, cont_real, 'color' = "blue", 'legend' = "Continuous - Real"):
p2 := plots:-listplot(x_values, disc_real, 'color' = "green", 'legend' = "Discrete - Real"):
p3 := plots:-listplot(x_values, cont_imag, 'color' = "red", 'legend' = "Continuous - Imag"):
p4 := plots:-listplot(x_values, disc_imag, 'color' = "orange", 'legend' = "Discrete - Imag"):
plots:-display(<plots:-display(p1, p3) | plots:-display(p2, p4)>);

@Nicole Sharp How about

#https://maxima.sourceforge.io/docs/manual/maxima_378.html#index-strim
StringTools:-Subs(StringTools:-Explode(" /*") =~ "", "/* comment */");
 = 
                           "comment"

@Thomas Richard Thanks. I forgot to change the effective `Digits` at that time. (It seems that the precision (and accuracy) of the input never affect the precision to use inside numerical algorithms?)

Although the help page of `convert/rational` does not mention its internal algorithm, the help page of `identify` (which is mentioned in the help page of `convert/rational` in fact) does mention: 

The test for rational constants is made by looking at the continued fraction expansion of x

In view of this, it is reasonable to infer that internally, rational approximations are obtained among continued fraction convergents, that is, generated by truncating continued fraction expansions. 

However, I think that a more hard task is to recognize an "simplest" algebraic number that approximates a given (probably floating-point) number well. (For instance, 

evalf[10**3](root(2, 6) + root(3, 5)):
identify(%, 'BasisSizeAlg' = 30);

still fails to recover RootOf(_Z^30 - 18*_Z^25 - 10*_Z^24 + 135*_Z^20 - 7380*_Z^19 + 40*_Z^18 - 540*_Z^15 - 135540*_Z^14 - 56160*_Z^13 - 80*_Z^12 + 1215*_Z^10 - 336420*_Z^9 + 538380*_Z^8 - 43920*_Z^7 + 80*_Z^6 - 1458*_Z^5 - 102060*_Z^4 - 98280*_Z^3 - 20520*_Z^2 - 1440*_Z + 697, index = 2).)

@Carl Love Thanks. Strangely, Maple's R&D engineers seem to have overlooked this (probably because the Maple IDE project (not the code edit region component) has already been aborted).

@Carl Love Yes, I can change it myself. But I believe it would be better to automatically set its default value based on different computer screen sizes when installing Maple, so that by default, if I want to send a document including a full-line lprint to others with wider screen computers, I don’t have to add a statement like interface('screenwidth' = 9999): in the startup code or request them (mostly ordinary users) to change their own initial settings. 

@Carl Love Many thanks. Maybe the default screen-width can be changed to a larger number in modern Maple.

@Carl Love Thanks. But in both "the most recent release" and "some legacy version", the interface(screenwidth) is set to the default value 79. Why is the output in the latter still wider than that in the former? 

@acer Thanks for your commentaries. This scheme looks feasible, but I found that it may make the code less intuitive (if I have understood correctly?). Perhaps there will be a better way to achieve this in the future so that the size and complexity of the code can be minimized.

3 4 5 6 7 8 9 Last Page 5 of 22