Carl Love

Carl Love

28055 Reputation

25 Badges

12 years, 360 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Dima My computer is running this problem now. So far it has taken about an hour. It would help if you have ranges for k1, k2, and k3.

@J4James You still need to specify the numpoints. I just added an example to my Answer. Let me know if you can follow that.

@ateaktree I disagree that the brute plotting is better. If you set adaptive= false, it should use exactly the number of points specified by numpoints.

With your integral, there are specific values of phi where it takes a long time to evaluate. Some of your plots are hitting some of those values. In order to say more, I need to know what range of phi you are trying to plot over. So please answer that.

By lowering the accuracy with the epsilon option to Int, I can get a plot quickly on -1..1 without adjusting the number of points.

F:= unapply(
     Int(309.9615685*exp(3.936759889*phi-3.936759889*`ϕ`)*
         Heaviside(-phi+`ϕ`)*exp(-1549.807842*`ϕ`^2)/
         (Pi*sqrt(-15.74703956*phi+15.74703956*`ϕ`)),
         `ϕ` = -infinity .. infinity,
         epsilon= 5e-5 #4 sig. digits
     ),
     phi
);

plot(F, -1..1);

 

@Joe Riel Thanks. I remember that from Fortran. I guess C uses that also.

@mriedel  wrote: It looks to me like order is key here (e.g. the defining advantage of your solution.)

Yes, the ordering is Kitonum's idea.

Is it possible to count the partitions in a way that is faster than generating them?

@gkokovidis The problem with doing it this way is that it doesn't alter the original value of D. It's the D that needs to be declared local, not the Lett.

@Hypnos Yes, (H+H*)/2 is always a Hermitian matrix.

@taro yamada While it is true that numbers (or anything else) can be made into a symbol with ``, that is not what Preben's code is doing. He is using `` as a function. ``(2) is like saying f(2), but without the f being visible in the prettyprint. Making 2 into a symbol would be `2`.

@nicoviaux Why do you have try...end try? With that there you can't see whatever error message is telling you why your data is not going to the file. A likely cause is that you don't have permission for the file.

Simply sending the output to the screen works fine:

for i to 4 do
     printf("%g %g\n",i/10.0,i):
end do;

0.1 1
0.2 2
0.3 3
0.4 4

@Preben Alsholm Do the given values of h and k seem ridiculously large to you? The relative errors are so large that a comparison between k=0.1 and k=0.05 seems meaningless. I wonder if the numbers given in the problem statement are off by a decimal place.

@mriedel Pehaps reading my extensively commented final version of the algorithm at the end of the thread will substitute for the mathematical notation. Note that this algorithm actually produces the factorings rather than counting them. Also, they are produced in a natural order without needing a final sort.

@acer wrote:

On my machine your original `mp` handled 9! in about 35sec, and the edited `mp3` above took 1.2sec, while Joe's Factorings took 0.14sec.

Kitonum, Joe, and I contributed equally to the program Factorings.

@ecterrab Yes, I understand all the caveats.

To do this, I assume that I would need to modify not the regular `print/diff` but rather the `print/diff` that is installed by PDEtools:-declare.

@ecterrab Thanks. I should've checked whether `print/` procedures were traceable.

My goal is to investigate the feasibility of satisfying a recent request on MaplePrimes that subscripted derivatives (as produced by PDEtools:-declare) be printed in an abbreviated form. The Asker wants, for example, that f[x,x,x,x,x,x] print as f[`6x`] and that f[x,x,x,y,y,y,y] print as f[`3x`,`4y`] or perhaps f[`3x4y`].

 

 

@Muhammad Usman Your file still did not attach.

I guess it was the same file as your other question, which did attach, so don't bother responding here. You should delete this question.

First 574 575 576 577 578 579 580 Last Page 576 of 709