acer

32490 Reputation

29 Badges

20 years, 7 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@Carl Love Ok, it seems that in Maple 17 the hue proc is getting passed a hardware float value (for the right end-point of the input range 0..1) which is slightly larger than 1.0, when the hue proc is run under evalhf (the default). This results in a negative value of very small magnitude being produced, and that seems to trigger a rescaling of all the computed hue data to fit the range 0..1.

So, another kludge to workaround the problem, for this particular example, might be to instead use something like,

   (x,y)-> abs(1-x)^Gamma/3

or

   (x,y)-> (1-min(1.0,x))^Gamma/3

as the hue proc.

I suppose that the input values for x are being produced by some formula involing the end points and the x-grid size, and that this is resulting in a roundoff problem such that the computed last value is not the same double-precision float as the end-point might be.

So, what changed between releases was the default grid size, which went from [25,25] to [49,49]. Using 40 for the x-component of the `grid` option reproduces the problem in Maple 14, 15, etc.

One can compare these two,

plot3d(0, 0..1, 0..1,
       color=[proc(x,y) eval(printf("%y\n",x)); (1-x)^1.0/3; end proc,
              (x,y)-> 1, (x,y)-> 1,
              colortype= HSV], grid=[39,2]);

plot3d(0, 0..1, 0..1,
       color=[proc(x,y) eval(printf("%y\n",x)); (1-x)^1.0/3; end proc,
              (x,y)-> 1, (x,y)-> 1,
              colortype= HSV], grid=[40,2]);

@Carl Love The problem seems to have been introduced between Maple 15.01 and 16.02. (I don't have 16.00 or 16.01 on hand to double check, right now.)

I suspect something to do with the `color` option procs running under evalhf. (Perhaps an exception not handled the same? I haven't dug in yet.) Making the hue proc be un-evalhf'able seems to get the expected result. Ie, since lists are not supported in evalhf,

   proc(x,y) []; (1-x)^Gamma/3 end proc

Perhaps another hint: grid=[39,40] does ok with the evalhf'able hue proc, but grid=[40,40] does not.

What exactly do you mean by, "math clickable popup"?

acer

How about just scaling the input and using custom tick marks?

acer

You added other suggestions to a list entitled 16+2, a year ago.

acer

@nicholasfbennett Yes, my answer was just to get your original design to work. I made the comment about having a checkbox instead of a button because I was guessing that what you really wanted was this other behaviour.

Here is a revised Document, with that check box idea.

Parabolascb.mw

Note that the action codee behind all 4 components (3 sliders and the checkbox) is exactly the same. You could make future editing easier if you defined a short procedure in the StartUp code of the Document which made this action. Then you could put just a single call to that procedure as the action for each component. This would centralize your code.

@Markiyan Hirnyk I think that the key issue is how can we get numerical roots out of a general RootOf. Or, perhaps more the point, how can we request that? The `evalf/RootOf` routine and its interoperation with `allvalues` is complicated. If there are infinitely many solutions then what might help is a better or new way to specify the request, eg. some way to request all roots within a finite range, or the ith root moving left/right from a particular starting points, etc. I think that your question raises some very important points about how Maple's functionality could be improved.

RootOf's can be utilized for some purposes other than this kind of numerical requests, so I don't quite see why difficulties with computing them should in itself bring into question the purpose of SolveTools[Engine].

How would you like the Sliders laid out?

As if you had repeatedly hit the Slider entry from the EmbeddedComponents palette? Ie, left to right in an input line?

Or, perhaps, laid out in a Table?

What should trigger the insertion? Some Button press, which reads the content of the TextArea component? Or a call of a procedure (of your authoring)?

acer

The short answer is... yes.

It's the weekend, sorry, and I won't be able to write a short procedure for it until this evening or tomorrow evening.

acer

@fluff That should be "end proc" not "ens proc".

And "randomize()" rather than "rendomize()" which does nothing.

And your proc's parameter name is "switch" but in the code you use "switches".

@Syeda The equations do not appear to have a solution for x when z is not a value above 1.249642 or so. You have now used z=1, for which there may be no root. When fsolve returns unevaluated it means that it has not found what it considers to be a root.

@Syeda Can you not just use fsolve?

Eg,

fsolve(eval(rhs(eq1)-rhs(eq2),z=1.2497),x);

                        0.0008311824617

@Carl Love Thanks, Carl, I had misread the exponents. But it only affects the result a small amount, and the the minimal z for which there is a root is still greater than 1 (or 0.5044).

I have edited my answer accordingly.

@john125 I am not aware of a technique that can always find the regions of convergence, which can be multiple and quite seperated. After fiddling with the Gaussian map (see here) I wrote a crude procedure to search for regions to investigate.

I've been trying to find some spare time to finish constructing a small suite of tools for handling iterated maps in a variety of ways, but it's not in a state ready to share yet. A central issue is in making it automatically as fast as possible, given the quite different supports of evalhf, option hfloat, Compile, and Threads.

@Markiyan Hirnyk Ok, that may be useful, though an optimization (maximization) problem might also do. Convexity has not been shown, but if it were than your fsolve result would be almost enough to show that abs(delta)<0.5 assures that the error term abs( sin(exp(100)+delta) - sin(exp(100)) ) will be less than 0.5.

But still Digits=100 is used without any evidence show why it is enough working precision. Why was 200 not needed? The purpose of part a) is, I believe, to put that aspect on a more firm footing. Which is (I think) the key as to why sin(exp(exp(100))) is so hard to approximate accurately.

 

First 364 365 366 367 368 369 370 Last Page 366 of 594