From: Jaime V. <vi...@fe...> - 2024-11-28 14:23:29
|
On 28/11/24 11:50, Thomas D. Dean wrote: > Maxima branch_5_47_base_1500_g32a79c344 https://maxima.sourceforge.io > using Lisp GNU Common Lisp (GCL) GCL 2.6.14 git tag Version_2_6_14 > Distributed under the GNU Public License. See the file COPYING. > Dedicated to the memory of William Schelter. > The function bug_report() provides bug reporting information. > (%i1) ??hstep > > > -- Function: hstep (<x>) > The Heaviside unit step function, equal to 0 if <x> is negative, > equal to 1 if <x> is positive and equal to 1/2 if <x> is equal to > zero. > > If you want a unit step function that takes on the value of 0 at > <x> equal to zero, use 'unit_step'. > > (%o1) true > (%i2) hstep(x); > file_search1: pwilt not found in file_search_maxima,file_search_lisp. > -- an error. To debug this try: debugmode(true); > That message is apparently a compiler warning which only appears in some list flavors and does not seem to affect the computation of hstep: Maxima branch_5_47_base_1500_g32a79c344https://maxima.sourceforge.io using Lisp CLISP 2.49.93+ (2018-02-18) (%i1) hstep(x); (%o1) hstep(x) (%i2) hstep(0); (%o2) 1/2 (%i3) plot2d(hstep(x),[x,-2,2])$ Everything works as expected in Clisp Maxima branch_5_47_base_1500_g32a79c344https://maxima.sourceforge.io using Lisp Clozure Common Lisp Version 1.12.2 (v1.12.2) LinuxX8664 (%i1) hstep(x); ;Compiler warnings for "/home/villate/.local/share/maxima/branch_5_47_base_1500_g32a79c344/share/diffequations/pwilt.lisp" : ; In PWILT-ADD-PARTS: Local function or macro name MERGE shadows standard CL definition. (%o1) hstep(x) (%i2) hstep(0); (%o2) 1/2 (%i3) plot2d(hstep(x),[x,-2,2])$ In spite of the warning, hstep(0) and the plot work correctly. Regards, Jaime P.S. I can no longer build Maxima with the same SBCL version that I used a few weeks ago. Is anyone else having that problem? |