Carl Love

Carl Love

28110 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@Axel Vogt The procedure produced by rsolve with option makeproc uses a "sliding window" such that it saves the previous three computed values. Aside from error checking, it's equivalent to this:

X:= proc(n)
     local k,L,r;
     L:= [0,1,2]; #Initial values
     for k from 3 to n do
          r:= `+`((k*L)[]);
          L:= [L[2], L[3], r]
     end do;
     L[4+n-k]
end proc:

@mois Can you show the exact command that you used and the results that it returned? Also, why didn't you do the model function f:= a+b*x^c+d*x^e?

Yes, please "send" the document (worksheet) by attaching it to a Reply.

By the way, your English is fine by MaplePrimes standards. Try to make a better title though.

As a moderator, I changed this Question's title from "A Rounding bug in maple" to "Is this a Rounding bug in maple?"

@Sujaan Kunalan There is no way to explicitly mark a Question as answered, but you can "vote up" for the Answer by clicking on the "thumb up" icon in the upper right corner of the Answer.

@Mac Dude The only thing that makes the difference in your call to NonlinearFit is the initialvalues. All Statistics package routines that take a Vector will take a list also.

@Markiyan Hirnyk Quoting from ?combine:

For many functions, the transformations applied by combine are the inverse of the transformations that are applied by expand. For example, consider the well-known identity
           sin(a + b) = sin(a) cos(b) + cos(a) sin(b)
The combine function applies the identity from right to left, whereas the expand function does the reverse.

You wrote: What is the reasoning behind the output?

The reasoning is that the result should also be valid for n=0.

@Alex Smith Why [-90,1] and not [-90,0]? Also, you can hide the z-axis label.

plot3d(
     [x,y,0], x= 0..1, y= 0..1-x,
     axes= boxed, labels= [x,y,``], style= patchnogrid, orientation= [-90,0]
);

x:= [2,3,5,1,4]:
y:= [1,2,3,4,5]:
H:= table(x =~ y):
convert(H, list);
 

The default built-in ordering that sort uses for listlists is lexicographic, so the following works and is more efficient than sorting with a user-supplied total-ordering procedure:

sort([[2,1],[3,2],[5,3],[1,4],[4,5]]);

                  [[1, 4], [2, 1], [3, 2], [4, 5], [5, 3]]

@Joe Riel Oh, I just misunderstood your last sentence to mean that the attributes trick could be done simpler, faster, and smaller in a loop. You just meant a straightforward max-finding loop. It's all clear now.

Please repost the array Data in a plaintext form so that I can cut-and-paste it.

@Joe Riel I'm having trouble understanding your last sentence---why it's simpler, faster, smaller. Could you show an example doing it in a do loop?

It just requires a slight modification of the original:

add(s^LL[1]*t^LL[2]/mul(x!, x= LL), LL= L);

First 588 589 590 591 592 593 594 Last Page 590 of 710