Carl Love

Carl Love

28070 Reputation

25 Badges

13 years, 36 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Kitonum I'm guessing that the phenomenon that I described is an anomaly of Maple 16 (and maybe 17 and 15).


restart:

kernelopts(version);

`Maple 16.02, X86 64 WINDOWS, Nov 18 2012, Build ID 788210`

(1)

X:= [seq(i^3, i= 1..5000000)]:

st:= time():
`+`(X[]);
time()-st;

156250062500006250000000000

 

.624

(2)

restart:

X:= [seq(i^3, i= 1..5000000)]:

st:= time():
add(x, x= X);
time()-st;

156250062500006250000000000

 

1.060

(3)


Download plus_vs_add.mw

I've been able the duplicate the above on different computers. But in Maple 2015, I get that add is faster than `+`.

 

What does the projection of a point onto a curve mean? Can you give me a formula or reference for it?

@Alejandro Jakubi I wonder if add(U) is equivalent to `+`(U[]). Of course they produce the same result. But I think that `+`(U[]) is faster than add(u, u= U). That is, when the list of summands already exists (and only when it already exists) the prefix `+` form is faster than the older form of add.

You'll need to post the complete code so that we can duplicate your problem. You can post a worksheet by using the green uparrow tool, which is the last item on the second row of the toolbar in the MaplePrimes editor.

@acer 

Okay, I made the tables explicitly constructed as tables, which takes care of all your objections except the last. Regarding your last objection, I find it rather distasteful for code to use more variable names than are necessary. For one thing, it interferes with the garbage collection of the tables. A better solution is to not use names that reveal the underlying data structure.

@tomleslie Yes, your worksheet works in Maple 16 and gives a very reasonable answer. When N is increased to 100, it gets the answer to 4 decimal places.

I don't understand the significance of the ScatterPlot3D and the lowess surface.

 

kegj: If you want me to check your code, you'll have to upload the most recent version. The version that you most recently uploaded obviously doesn't work because you've mixed up lowercase and uppercase letters.

This extra space is a long-standing and oft-reported bug. AFAIK, there is no known workaround.

@kegj In Maple, the familiar constant Pi is spelled with a capital P; when you spell it pi, it just becomes a regular variable name.

@tomleslie The different behavior of Pi in floating-point expressions is intentional and documented.

@maple fan You are trying to apply the paradigm of the plot command to implicitplot. There is no algorithm by which you can apply adaptive plotting to an implicit plot.

The numpoints option applies to the overall grid, not to the individual curves. One thousand points means that a 33x33 grid is overlaid on your x and y ranges, and for each cell, a check is made for each curve. At numpoints= 10000, that grid is increased to 101x101. Option gridrefine causes each cell to be further refined if it is suspected of containing a point. Please read the help page ?implicitplot. Be sure to pull down and read the Options section.

Note that your red curve is highly complex. It is quite diffiuclt to find real-valued points along the curve. Try doing it.

You probably should be using fsolve instead of solve. You can supply a guess with fsolve.

Please post your code in plaintext form or upload a worksheet.

@Axel Vogt Using 500 digits and floating-point determinant, I got the same answer.

@Markiyan Hirnyk 

You can assume that if the code is presented here in plaintext form that it's meant to be executed as 1D input.

@Arno wrote:

The fsolve command only returns 1 solution, so what I'm trying to do with the loop is to determine the first nLimit solutions > 0

There is an alternative to fsolve for exactly this situation. It's called RootFinding:-NextZero.

@nm To my reading, the OP is only interested in the unit interval, and the function is real-valued there.

First 502 503 504 505 506 507 508 Last Page 504 of 709