Carl Love

Carl Love

28070 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@Markiyan Hirnyk Yes, of course, what I have created does not represent the original graph internally in Maple. This is a workaround required to create an approximate visualization of the Asker's original, which seemed to be what she wanted.

@erik10 What is the maximum number of dintinct entries in A? It can't be 10000 because you wouldn't be able to visualize 10000 distinct vertical lines on one plot.

I multiplied by 1000 because I thought that that would cover any perceivable visual differences.

I don't understand what you're saying about no repetitions in the A vector. My code does not rely on there being repetitions.

If only the frequencies the given, then A could default to [$1..nops(B)] (i.e. [1, 2, ..., |B|]).

@erik10 What is the maximum number of dintinct entries in A? It can't be 10000 because you wouldn't be able to visualize 10000 distinct vertical lines on one plot.

I multiplied by 1000 because I thought that that would cover any perceivable visual differences.

I don't understand what you're saying about no repetitions in the A vector. My code does not rely on there being repetitions.

If only the frequencies the given, then A could default to [$1..nops(B)] (i.e. [1, 2, ..., |B|]).

Do you mean the package Gravitation written by John Fredsted?

Good solution. I like it better than my own.

Good solution. I like it better than my own.

@itsme Rather than copying and pasting, use lprint(%) and you'll get

hypergeom([2, 2, (-I*beta*epsilon+Pi)/Pi, (I*beta*epsilon+Pi)/Pi], [1, (-I*beta*epsilon+2*Pi)/Pi, (I*beta*epsilon+2*Pi)/Pi], 1/exp(4))/((beta^2*epsilon^2+Pi^2)*exp(4))

Here's Kitonum's procedure in more-standard Maple, using recursion and avoiding unnecessary recomputation.

a:= proc(n::posint)
option remember;
     `if`(n::odd, thisproc(n-2)*thisproc(n-1), thisproc(n-3) + thisproc(n-2))
end proc:

(a(1),a(2)):= (1,2):

Here's Kitonum's procedure in more-standard Maple, using recursion and avoiding unnecessary recomputation.

a:= proc(n::posint)
option remember;
     `if`(n::odd, thisproc(n-2)*thisproc(n-1), thisproc(n-3) + thisproc(n-2))
end proc:

(a(1),a(2)):= (1,2):

@acer 

but I'll chip in with some anecdotal evidence if that's OK.

Sure, your input is most welcome. So, it seems that your technique is still roughly based on numcpus. Perhaps that optimal value was 1/16th? two tasks per core? I'd like to see how may threads Threads:-Seq, Threads:-Map, etc., use when there's no tasksize specified, but the code is hidden in the kernel procedure Threads:-MultiThreadInterface.

Darin:

Thank you for this post, from which I've attained more understanding of Threads:-Task in two readings than I've obtained in multiple readings of the help pages and prepackaged example worksheet.

Your examples of using Task in a scalable way, and most other examples I've seen, bifurcate the problem into subtasks until a "base case" is reached. The base cases seem somewhat arbitrarily chosen, and may end up being inefficiently small on future machines. Why not use kernelopts(numcpus) to determine how many subtasks to use? That would be scalable.

A few days ago, I also posted a question/Comment to another of your parallelization blog entries. I know that it's very easy for followups to old posts to be missed, so you probably didn't see it.

Do you mean long division of numbers or of polynomials?

@J4James

You should convert this to a separate question. There are some important issues here, probably some bugs. But nobody except you, me, and possibly Preben will see this if you don't make it a separate question.

It is not necessary to use plot3d; Preben was just giving an example.

pds2:-plot(T2(x,t), x=0, t= 0..5);

But I see several things very strange with the plots in this system. I think there's a bug, but I can't quite isolate it. The plot should be the same as pds2:-plot(diff(T(x,t),x), x= 0, t= 0..5). Furthermore, the plots

pds2:-plot3d(diff(T(x,t), x), x= 0..1, t= 0..5);
pds2:-plot3d(diff(T(x,t), t), x= 0..1, t= 0..5);

are identically 0, which contradicts the plot

pds2:-plot3d(T(x,t), x= 0..1, t= 0..5),

which seems normal.

@J4James

You should convert this to a separate question. There are some important issues here, probably some bugs. But nobody except you, me, and possibly Preben will see this if you don't make it a separate question.

It is not necessary to use plot3d; Preben was just giving an example.

pds2:-plot(T2(x,t), x=0, t= 0..5);

But I see several things very strange with the plots in this system. I think there's a bug, but I can't quite isolate it. The plot should be the same as pds2:-plot(diff(T(x,t),x), x= 0, t= 0..5). Furthermore, the plots

pds2:-plot3d(diff(T(x,t), x), x= 0..1, t= 0..5);
pds2:-plot3d(diff(T(x,t), t), x= 0..1, t= 0..5);

are identically 0, which contradicts the plot

pds2:-plot3d(T(x,t), x= 0..1, t= 0..5),

which seems normal.

Your file of Maple code did not upload properly. Would you please upload it again?

First 635 636 637 638 639 640 641 Last Page 637 of 709