Carl Love

Carl Love

28160 Reputation

25 Badges

14 years, 15 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@pake The computer's processor (or chip) model is more important than the operating system, in particular the number of "cores". Use the Maple command kernelopts(numcpus) to see how many simultaneous threads can run on each of your computers.

Also, as pointed out in the Answer below, your basic task of adding the integers from 1 to 1000 is much too small for this test. Change that to about 10,000,000 and reduce the number of iterations of the outer loops.

@vv Your solution leads to the very unusual situation that the definition of a module procedure depends on a global variable and if that global variable changes---even after the module is loaded---then the module export will change. It's not a bug per se, but I think that it's bug prone.

@vv But the divisors of a^b can be easily determined from the divisors of a.

@taro You should think of LL as a matrix which contains only the z-values. So, there are 12 z-values laid out in a 3 x 4 grid.

@Mitterrand Perhaps there is a bug with the limits in your version of Maple which has subsequently been corrected? If I re-execute your worksheet, I don't get 0. I get the same result as shown by Kitonum below.

@Kitonum Why gpwr:= gpwr*(g mod p) rather than the original gpwr:= gpwr*g mod p? I think that the original is correct.

@Jjjones98 It is common for respondents on MaplePrimes to end their example commands with semicolons because that used to be required for single-command input. These terminal semicolons are not parts of the commands and are not meant to be included when those commands are used as subexpressions in other expressions. So, remove the internal semicolon.

@Jjjones98 But vv's S is a procedure, not a direct command.

@Kitonum I didn't mean to give the impression that one couldn't animate a plot3d. However, it was pretty clear to me that the OP wanted a 2D animation. This is afterall the equation of a wave moving through a one-dimensional object, a string.

@st0812 You can export a Maple worksheets as a PDF. Use "Export as" from the File menu. This will include the code, text, results, and graphics, and it'll be viewable by anyone, regardless of whether they have Maple.

@st0812 To animate that, change plot3d to plot.

@rstellian Here's another way, which I like better because it makes it clear that you're trying to pad x with leading zeros so that it's the same length as X:

scm:= (X::posint, x::posint)-> nprintf("%0*d", length(X), x):

Also, I changed ilog10 to length in the Answer above.

@Preben Alsholm The button only appears on posts (questions, answers, replies) that have no responses and whose authors have 10 or fewer reputation points. It has always been that way, ever since the spam button has existed.

You wouldn't do this with nested if statements. Every practical computer language (above the level of assembler) has a looping command that increments an index variable (i in your case) for each pass through the loop. That command in Maple is for, as used in John Fredsted's Answer below.

To directly answer the question that you pose in your title: Yes, that has happened to me a few times. I can't recall how it got fixed, but it did.

You should upload your worksheet as a file attachment rather than as a screenshot. To do that, use the green uparrow on the toolbar in the MaplePrimes editor.

First 346 347 348 349 350 351 352 Last Page 348 of 711