From: Barton W. <wi...@un...> - 2025-04-07 18:41:17
|
The CL function ridofab (get rid of zeroa and zerob) substitutes zero for zerob and zeroa ; example: (%i17) limit(elliptic_kc(m), m, 0, 'plus); 1 Call ridofab [elliptic_kc(zeroa)] 1 Return ridofab %pi/2 (%o17) %pi/2 Converting simplim%tan to use the symbol property dispatch mechanism should be fairly easy (and to not use the special variables var and val) . Converting all the special cases in simplimit to use the symbol property dispatch would be a larger effort—these functions are not written in in a consistent fashion. ________________________________ From: Raymond Toy <toy...@gm...> Sent: Monday, April 7, 2025 10:20 AM To: max...@li... <max...@li...> Subject: [Maxima-discuss] simplimit function vs simplimit%fun property Caution: Non-NU Email While trying to write a def-simplimit macro to make defining simplimit functions a little easier, I noticed that the function simplimit in limit.lisp, checks the caar for the operator and manually dispatches to a simplim function. Thus, limits for tan go through simplimit instead of dispatching directly to simplim%tan. And to make things worse, simplim%tan depends on the special variables var and val. In addition, a lot of the simplim functions in limit.lisp use ridofab to replace $zeroa and $zerob with 0. But other simplim functions in, say, bessel.lisp don’t do this. Should they? I’m not exactly sure how $zeroa gets converted to 0 when doing something like limit(elliptic_kc(m), m, 0, 'plus). ​ |