acer

32395 Reputation

29 Badges

19 years, 344 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@Lulu That example produces that error for me in Maple 2015.1 using 64bit Maple for Windows 7, with Digits set to 19 or higher (as far as can tell), but succeeds for Digits set to 18 down to 10 (all in fresh sessions).

I will submit a bug report.

@Lulu Digits is an enviroment variable that fsolve adjusts internally so as to increase the working precision in order to attain the desired accuracy.

Since it's an environment variable the changes made to Digits inside fsolve are not apparent when fsolve is left and control returns to the higher level.

Sometimes a badly conditioned example can foil fsolve's methodology. For example, `fsolve/polyill` can try repeated Digits-doubling in order to overcome numerical difficulties. But when that does not succeed then the maximal Digits value gets hit. It's also possible that some individual subcomputation which tries to determine by how much to increase Digits goes wrong and generates an invalid value (too high). These bugs are rare, but they can happen.

Having an example is useful, for debugging and for checking whether the problem persists in later versions.

@MDD Do you need to create them all up front, before you work on them? Do you care about memory allocation, or just about raw speed?

Do you really need them to be lists? Or would Vectors work?

If Vectors are ok, then would it be ok if you could create then in clumps (but not all at once), and then access them by indexing both by row and along a column?

The question about getting the most efficient way can depend on how you intend on using them.

Are you trying to say that you want to reflect the plot across the y-axis? eg,

P := plot( A, x0=-3..5 ):

plots:-display( P, plottools:-reflect(P, [[0,0],[0,1]]) );

acer

@Harry Garst 

Your second example of plot(0^(x^2), x=-3..3) may appear wholly flat because the point x=0 is not necessarily used as a data point by `plot`, and because your formula might run under evalhf mode.

But the following is somewhat related to my answer above, where the data points for x are explicitly specified. I used Maple 2015.1 below, but a similar effect was had in my Maple 18.02, both 64bit for Linux.

restart;

plot([seq([x,0^(x^2)],x=-3..3,1/1000)], style=line, thickness=3, color=red);

plot([seq([x,0^(x^2)],x=-3..3,0.001)], style=line, thickness=3, color=red);

kernelopts(version);

`Maple 2015.1, X86 64 LINUX, Jun 2 2015, Build ID 1048735`

 


Download zeropow.mw

@Markiyan Hirnyk No, you are wrong. That was a problem with premature evaluation. This is different, being a distinction between behavior with exact exponent 0 and floating-point exponent 0.0.

@Markiyan Hirnyk This is one of several times that you have failed by mistakenly pasting in 1D Maple Notation plaintext code in as 2D Input. That will not work in general. It is very bizarre that you keep making this mistake.

It doesn't matter that you try to convert to 1D input, after pasting in as 2D Input. It's the initial pasting in as 2D Input that is invalid.

Paste it in as 1D Maple Notation code, into an input prompt that is in 1D Maple Notation mode. That works.

@moeinvh What does the command

libname;

return in your fresh Maple session?

If it doesn't contain that new folder location then your initialization file is not being run. (Is it perhaps saved as maple.ini.txt by accident? Or saved as rich-text by accident? What editor did you use?)

It seemed to open Ok for me using 64bit Maple 2015.1 on Linux.

Attached is a zipped copy, with the sections expanded.

Tema_a1.zip

acer

@Carl Love I had pasted in in from Maple, where it was correct. But then I mispasted when I changed instances of < and > to &lt; and &gt; inside the <pre> tags in html edit mode. I corrected it, thanks.

I prefer it with the wrapped procedure around `assuming` so that square brackets around expression on the left of the &as are not always needed, like in the following example of a function call.

restart;

`&as`:=proc(a::uneval) eval(`assuming`([a],[args[2..-1]])); end:

is(a^2 >= 0);

                             false

is(a^2 >= 0) &as (a::real);

                              true

@JVLB Sorry, I had forgotten what I was doing before. Yes, that's related to why I put in the comment, "Now, how shall we handle the derivative of this returned proc?". I'd have to think about it more, to try and get the repeated partials handled better in this way.

@JVLB That d is the list by which the original call to D was indexed. By this I mean that if I call D[3,2,2](A) then `D/A` gets passed the list [3,2,2] as its argument.

That subs(__d=d[],'D[__d](A)') business was just a way for me to make the procedure `D/A` returned the original call, as if unevaluated. There may be another simpler way to achieve that, but it's the first thing that came to mind. So if there is a situation with some list d that one doesn't know how to handle in `D/A` then the original input can just be returned.

For example, using the above code, these inputs just return as if unevaluated (or as if `D/A` and A had not been defined),

D[3,2,2](A);

D[3,2,2](A)(s,t,2);

Well, it not exactly the same. If `D/A` and A were not assigned then Maple may change the indexing [3,2,2] into [2,2,3]. I suppose this old post may be related.

@tomleslie Are floating-point implementations of the Heun function available in stock Matlab 2015b? Or does one have to resort to 3rd party code (such as by John Matthews)?

You appear to have omitted either a space or an explicit multiplication symbol at a few places.

For example, after the "2 u" in your very first line you have an opening round-bracket without any space or explicit multiplication symbol between them. This gets parsed as an instance of function application. Ie, as u(...) an application of the unassigned operator `u`. But you appear to have intended u*(...).

And then this issue continues throughout the document, as you subtitute in for `u`, etc.

acer

First 319 320 321 322 323 324 325 Last Page 321 of 592