Carl Love

Carl Love

28115 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@Christopher2222 Your method has this flaw:

has(ifactor(2^7), 7);

      true

It's also extremely inefficient compared to the other methods. Compare using
n:= nextprime(2^(2^6))*nextprime(2^(2^7)).

What does it mean to "solve" a derivative?

@taro I'm having a bit of trouble understanding your English. The word "could" makes no sense to me in this context.

Regarding the effect of restart: If the random order of things is based on the explicit use of the random number generator, then restart will cause the same order to be used. However, if the random order is based on the memory addresses where things are stored, then restart won't fix the order.

It may be possible to enforce a certain order of the parts of an expression by using sort, but I have tried this several times before, and although it is possible, I decided that it wasn't worth the effort.

@roman_pearce By what algorithm do you expect to get a 30-fold improvement? I can get a 7-8-fold improvement with chrem. I don't know a better algorithm than that.

restart:

n:= 100:

A:= Matrix((n$2), ()-> rand(), order= C_order):

#Naive method:
CodeTools:-Usage(1/A):
memory used=5.68GiB, alloc change=164.00MiB, cpu time=78.91s, real time=77.12s, gc time=3.44s
#Use casting to select the method:
CodeTools:-Usage(1/Matrix(A, datatype= integer)):
memory used=5.46GiB, alloc change=360.00MiB, cpu time=14.78s, real time=12.78s, gc time=2.95s
#My best quick attempt at a faster integer inverse:
IntInv:= (A::Matrix(square, integer))-> 
   (n-> LinearAlgebra:-Modular:-IntegerLinearSolve(
      <A | LinearAlgebra:-IdentityMatrix(n)>, n, _rest
   ))
      (op([1,1], A), _rest)
:
CodeTools:-Usage(IntInv(A)):
memory used=1.57GiB, alloc change=0 bytes, cpu time=25.89s, real time=24.38s, gc time=2.08s
CodeTools:-Usage(IntInv(A, method= chrem)):
memory used=1.84GiB, alloc change=0 bytes, cpu time=13.16s, real time=10.25s, gc time=3.75s

 

@YasH How can one use your function and also effectively use plot option discont; i.e., how can one avoid the vertical lines at the discontinuities? There seems to be a subtle distinction---which I can't yet make precise---between functions for which discont will work and those for which it won't. I can't make it work with your function.

Another thing that I like about the new editor is that I can copy-and-paste plots direct from a worksheet. That's much easier than uploading a file.

@nika The chi-squared test won't tell you a suitable distribution. It'll only tell you whether or not the normal distribution is suitable. If the test fails, it tells you nothing.

@vahid65 How about

plots:-animate(
    plots:-polarplot,
    [[[r, 0, r= 0..1], [r, 9*Pi/4*k/50, r= 0..1]], color= magenta],
    k= 0..50, thickness= 6
);

@Mihrab Oops, I changed the parentheses from your original. My command should've been

plot([seq(-arctan(2*m*x/(1-x^2)), m= 1..10)], x= 0..10, discont);

@tomleslie You're right that I was too quick to say that those were the first 10.

@ETM1697 So, does f[x] mean the derivative of f with respect to x?

The comment below pertains to the originally posted form of the equations:

Your formulas are not clear enough. Obviously, they weren't given to you in the form above in your instructions. Please use square brackets to indicate subscripting, for example, the left side of the first equation almost certainly should be x[i+1]. I think that you're missing paretheses also. And why do you have both asterisks and centered dots? Do they both represent multiplication?

@Joe Riel I think that what he wants is a programmatic control so that his program's output appears in an otherwise empty window. Unless his output is strictly a plot, this'll require either some sort of embedded component or a Maplet.

All of your functions are functions of a single variable, so it's not clear what you mean by 3D. They could be done as a single 2D plot if you want.

@DSkoog wrote:

  • I do often see a lot of other stack users redirecting questions to MaplePrimes when an 'expert' answer is required, which speaks volumes about our community here.

I think that that's almost always me who says that. There are several reasons that I might say that:

  1. Yes, I know that there are some experts on MaplePrimes who aren't answering Questions on math.stackexchange or stackoverflow. (Please let me if there are other StackExchange sites where Maple is discussed.)
  2. I may see that the Question is primarily about Maple rather than about math or programming. The moderators are very strict. If the discussion becomes primarily about Maple, it gets shut down, usually within hours.
  3. Indeed, I often write that because the discussion has already been shut down by the time that I see it. At that point, Answers aren't allowed, but Comments are, so I put in a Comment like that.
  4. I'd like to Answer the Question by displaying a worksheet.
  5. StackExchange sites are strictly Q&A. There's not much room for the back-and-forth discussion that's often needed to reformulate the Question, nor is there much room for followup questions. A Comment on a StackExchange site is very limited is size and 2D display ability.

So, while an exclusively Maple site would be a welcome addition to the StackExchange portfolio, such a site couldn't be a replacement for MaplePrimes. What I want is for MaplePrimes to adopt the look and feel of a StackExchange site while still being MaplePrimes: There'd still be Posts and room for extensive back-and-forth discussion. By look and feel I mean the fonts, spacing, clickable controls, notifications, timers, and indexing, among other things.

 

First 376 377 378 379 380 381 382 Last Page 378 of 710