I tested your function up to 100,000 with all the variations of f, and they all worked after applying the patch for #847.
--Mike On Nov 30, 2007 10:01 PM, john_perry_usm <[EMAIL PROTECTED]> wrote: > > Thanks (I really like that!) but... While this approach worked well > with the numbers given, it generated the same error on larger values > of n. > > regards > john perry > > > On Nov 30, 3:58 pm, "Mike Hansen" <[EMAIL PROTECTED]> wrote: > > Hello, > > > > > In Maple one typically write f:=x->x if one means a function instead > > > of an expression. Doing something similar in SAGE makes a *lot* of > > > sense, so I don't object inherently to the lambda notation, although > > > the default Python syntax ("lambda") is not intuitive to an "ordinary" > > > math student. A nice solution might be to introduce an intuitive SAGE > > > construction for functions. -- My $.02 (US $ so not as much lately as > > > it used to be...) > > > > Actually, now that I think about it, there is a "nice" way to create > > the function in Sage which I completely forgot about. > > > > sage: f(x) = x > > sage: Midpoint_Riemann_Sums(0,5,f,1000) > > 12.5250000000000 > > > > I also put a patch up that make Sage work when you use "f = x". It > > should get into the next release, > > > > --Mike > > > > --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to sage-support@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sage-support URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/ -~----------~----~----~----~------~----~------~--~---