mpreduce.mpws formatting question

8 views
Skip to first unread message

Kyle Johnson

unread,
Jul 27, 2019, 10:43:52 PM7/27/19
to mathpiper-dev
I'm currently in the process of reformatting the mpreduce.mpws and while this is going well I have ran into and issue with the Limit doc.

The path to this file is:
mathpiperide\src\library_apps\mathpiper4\src\org\mathpiper\scripts4\mpreduce\mpreduce.mpws

The issue I'm experiencing is I can't seem to get the graphic console or test suite minimal to read the in_prompt *Examples code.

The original block of code that I am in the process of reformatting:

*E.G.

In> ForEach( i ,[0,1,3,4,Infinity]) {tmp := "lim(x*Sin(1/x),x," +  ToString(i) + ") = ";Echo(tmp,Limit(Sin(1/_x)*_x,_x,i));} 
Result: True
Side Effects:
lim(x*Sin(1/x),x,0) = 0 
lim(x*Sin(1/x),x,1) = Sin(1) 
lim(x*Sin(1/x),x,3) = 3*Sin(1/3) 
lim(x*Sin(1/x),x,4) = 4*Sin(1/4) 
lim(x*Sin(1/x),x,Infinity) = 1 


The doc says that the Limit procedure accepts 3 parameters when it is called on. However, when I try try to input the code into the graphic console it tells me Limit is not able to accept 3 parameters

In> ForEach( i ,[0,1,3,4,Infinity]) {tmp := "lim(x*Sin(1/x),x," +  ToString(i) + ") = ";Echo(tmp,Limit(Sin(1/_x)*_x,_x,i));} 
Result: Exception
Exception: The 3 parameter version of procedure <Limit> is not defined (MAKE SURE THE PROCEDURE'S NAME IS SPELLED CORRECTLY and the correct number of arguments are being passed to it.)  Starting at index 93.

Any Help... Helps!
Kyle

Ted Kosan

unread,
Jul 28, 2019, 1:20:42 AM7/28/19
to mathpi...@googlegroups.com
Kyle,

"Limit" is not listed in the "def" attribute that is at the top of
"mpreduce.mpws". Add it to the list of procedure names, and the
example will then work.

Ted
> --
> You received this message because you are subscribed to the Google Groups "mathpiper-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mathpiper-de...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/mathpiper-dev/95061693-f818-4801-b522-6b36f5302eeb%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages