[prev in list] [next in list] [prev in thread] [next in thread] 

List:       sbcl-devel
Subject:    [Sbcl-devel] =?utf-8?q?Some_compiled_functions_of_Maxima_are_brok?= =?utf-8?q?en_on_ARM64_macOS_Mont
From:       有坂 via Sbcl-devel <sbcl-devel () lists ! sourceforge ! net>
Date:       2023-07-13 20:24:00
Message-ID: 3c94721e-58ca-4f91-98c5-758bcef252db () me ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Thanks for your help!Now, I can build Maxima-5.47.0 with the development version of \
SBCL.But, some compiled functions of Maxima are broken on ARM64 macOS Monterey.For \
example, both SLATEC:ZBESH and SLATEC::DGAMLN are broken. This issue causes an error \
of the bessel_j function of Maxima.On ARM64 SBCL Maxima-5.47.0, the bessel_j function \
returns an error:- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -% \
../../sbcl_arm64/bin/sbcl --core ./binary-sbcl/maxima.core --noinform --norcMaxima \
5.47.0 https://maxima.sourceforge.iousing Lisp SBCL \
2.3.6.116-a58a4b217-WIPDistributed 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) bessel_j(- 6.01, 4.0*%i - 2.0);Maxima \
encountered a Lisp error:%                                                            \
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -On the other hand, x86-64 \
SBCL Maxima-5.47.0 works well:- - - - - - - - - - - - - - - - - - - - - - - - - - - - \
- -$ ../../sbcl_x86_64/bin/sbcl --core ./binary-sbcl/maxima.core --noinform \
--norcMaxima 5.47.0 https://maxima.sourceforge.iousing Lisp SBCL \
2.3.6.116-a58a4b217-WIPDistributed 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) bessel_j(- 6.01, 4.0*%i - 2.0);(%o1)         \
0.04316916456151376 %i + 0.26621554003138737(%i2) quit();- - - - - - - - - - - - - - \
- - - - - - - - - - - - - - - -And the following trace shows that bessel_j calls \
SLATEC:ZBESH function two times:(only the fifth argument is different)- - - - - - - - \
- - - - - - - - - - - - - - - - - - - - - -$ ../../sbcl_x86_64/bin/sbcl --core \
./binary-sbcl/maxima.core --noinform --norcMaxima 5.47.0 \
https://maxima.sourceforge.iousing Lisp SBCL 2.3.6.116-a58a4b217-WIPDistributed 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) :lisp \
(trace $bessel_j SLATEC:ZBESH HANKEL-1 HANKEL-2 BESSEL-J)($BESSEL_J ZBESH HANKEL-1 \
HANKEL-2 BESSEL-J)(%i1) bessel_j(- 6.01, 4.0*%i - 2.0);   0: (MAXIMA::BESSEL-J \
-6.01d0 #C(-2.0d0 4.0d0))       1: (MAXIMA::HANKEL-1 -6.01d0 #C(-2.0d0 4.0d0))        \
2: (MAXIMA::HANKEL-1 6.01d0 #C(-2.0d0 4.0d0))               3: (SLATEC:ZBESH -2.0d0 \
4.0d0 0.009999999999999787d0 1 1 7 #(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0) \
#(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0) 0 0)               3: SLATEC:ZBESH \
returned NIL NIL NIL NIL NIL NIL NIL NIL 0 0           2: HANKEL-1 returned \
#C(-0.05960122792538561 -0.15726626400631025)       1: HANKEL-1 returned \
#C(-0.054631965587457046 -0.15906078240964094)       1: (MAXIMA::HANKEL-2 -6.01d0 \
#C(-2.0d0 4.0d0))           2: (MAXIMA::HANKEL-2 6.01d0 #C(-2.0d0 4.0d0))             \
3: (SLATEC:ZBESH -2.0d0 4.0d0 0.009999999999999787d0 1 2 7 #(0.0d0 0.0d0 0.0d0 0.0d0 \
0.0d0 0.0d0 0.0d0) #(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0) 0 0)               3: \
SLATEC:ZBESH returned NIL NIL NIL NIL NIL NIL NIL NIL 0 0           2: HANKEL-2 \
returned #C(0.579065193105355 0.2637181177754141)       1: HANKEL-2 returned \
#C(0.5870630456502318 0.24539911153266847)   0: BESSEL-J returned \
#C(0.26621554003138737 0.04316916456151376)(%o1)                       \
0.04316916456151376 %i + 0.26621554003138737(%i2) quit();- - - - - - - - - - - - - - \
- - - - - - - - - - - - - - - -So I tried to debug bessel_j on ARM64 SBCL \
Maxima-5.47.0:- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -% \
../../sbcl_arm64/bin/sbcl --core ./binary-sbcl/maxima.core --noinform --norcMaxima \
5.47.0 https://maxima.sourceforge.iousing Lisp SBCL \
2.3.6.116-a58a4b217-WIPDistributed 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) to_lisp();Type (to-maxima) to restart, \
($quit) to quit Maxima.MAXIMA> (setq *debugger-hook* nil)NILMAXIMA> (trace $bessel_j \
SLATEC:ZBESH HANKEL-1 HANKEL-2 BESSEL-J)($BESSEL_J SLATEC:ZBESH HANKEL-1 HANKEL-2 \
BESSEL-J)MAXIMA> #$bessel_j(- 6.01, 4.0*%i - 2.0)$   0: (MAXIMA::BESSEL-J -6.01d0 \
#C(-2.0d0 4.0d0))       1: (MAXIMA::HANKEL-1 -6.01d0 #C(-2.0d0 4.0d0))           2: \
(MAXIMA::HANKEL-1 6.01d0 #C(-2.0d0 4.0d0))               3: (SLATEC:ZBESH -2.0d0 \
4.0d0 0.009999999999999787d0 1 1 7 #(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0) \
#(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0) 0 0)debugger invoked on a \
SB-INT:INVALID-ARRAY-INDEX-ERROR @7004D7DA50 in thread#<THREAD "main thread" RUNNING \
{7006E00003}>:   #<unknown immediate object, lowtag=#b1101, widetag=#xD {700732230D}> \
is not of type INTEGER.Type HELP for debugger help, or (SB-EXT:EXIT) to exit from \
SBCL.restarts (invokable by number or by possibly-abbreviated name):   0: \
[MACSYMA-QUIT] Maxima top-level   1: [ABORT             ] Exit from the current \
thread.(SLATEC:ZBESH -2.0d0 4.0d0 0.009999999999999787d0 1 1 7 \
#(-0.006422270890237786d0 -0.007452140904358356d0 -0.011244693070829145d0 \
-0.020737028670355366d0 -0.04400017233503277d0 -0.1022606857621183d0 \
-0.24847333482671863d0) #(-0.008439416303090813d0 -0.00896909532292368d0 \
-0.010557598350871592d0 -0.012937037782551123d0 -0.013650100581509214d0 \
4.563390974043763d-4 0.08972961010333168d0) 0 0)     source: (SETF (F2CL-LIB:FREF CYR \
(I) ((1 N))) (* STR ATOL))0] LSLATEC::ASCLE   =   1.0020841800044862d-289SLATEC::ATOL \
=   1.0d0SLATEC::CSGNI   =   -0.6365412341661386d0SLATEC::CSGNR   =   \
-0.009999588771556434d0SLATEC::CYI   =   #(-0.008439416303090813d0 \
-0.00896909532292368d0                                   -0.010557598350871592d0 \
-0.012937037782551123d0                                   -0.013650100581509214d0 \
4.563390974043763d-4                                   \
0.08972961010333168d0)SLATEC::CYR   =   #(-0.006422270890237786d0 \
-0.007452140904358356d0                                   -0.011244693070829145d0 \
-0.020737028670355366d0                                   -0.04400017233503277d0 \
-0.1022606857621183d0                                   \
-0.24847333482671863d0)SLATEC::FNU   =   0.009999999999999787d0SLATEC::I   =   \
#(-0.008439416303090813d0 -0.00896909532292368d0                               \
-0.010557598350871592d0 -0.012937037782551123d0                               \
-0.013650100581509214d0 4.563390974043763d-4                               \
0.08972961010333168d0)SLATEC::IERR   =   0SLATEC::KODE   =   1SLATEC::M   =   \
1SLATEC::N   =   7SLATEC::NZ   =   0SLATEC::RTOL   =   \
4.503599627370495d15SLATEC::STI   =   0.004172430931124104d0SLATEC::TOL   =   \
2.2204460492503136d-16SLATEC::ZI   =   4.0d0SLATEC::ZR   =   -2.0d0SLATEC::ZTI   =   \
-1.0d00] P(SLATEC:ZBESH -2.0d0 4.0d0 0.009999999999999787d0 1 1 7 \
#(-0.006422270890237786d0 -0.007452140904358356d0 -0.011244693070829145d0 \
-0.020737028670355366d0 -0.04400017233503277d0 -0.1022606857621183d0 \
-0.24847333482671863d0) #(-0.008439416303090813d0 -0.00896909532292368d0 \
-0.010557598350871592d0 -0.012937037782551123d0 -0.013650100581509214d0 \
4.563390974043763d-4 0.08972961010333168d0) 0 0)0] SOURCE(SETF (F2CL-LIB:FREF CYR (I) \
((1 N))) (* STR ATOL))0] 1               3: SLATEC:ZBESH exited non-locally           \
2: HANKEL-1 exited non-locally       1: HANKEL-1 exited non-locally   0: BESSEL-J \
exited non-locallyReturning to Maxima- - - - - - - - - - - - - - - - - - - - - - - - \
- - - - - -It seems that the first called SLATEC:ZBESH function returns an error when \
evaluating (SETF (F2CL-LIB:FREF CYR (I) ((1 N))) (* STR ATOL)).SLATEC:ZBESH is \
included in "maxima-5.47.0/src/numerical/slatec/zbesh.lisp".And I tried to evaluate \
the second called SLATEC:ZBESH function,then it returns another error:- - - - - - - - \
- - - - - - - - - - - - - - - - - - - - - -% ../../sbcl_arm64/bin/sbcl --core \
./binary-sbcl/maxima.core --noinform --norcMaxima 5.47.0 \
https://maxima.sourceforge.iousing Lisp SBCL 2.3.6.116-a58a4b217-WIPDistributed 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) \
to_lisp();Type (to-maxima) to restart, ($quit) to quit Maxima.MAXIMA> (setq \
*debugger-hook* nil)NILMAXIMA> (trace slatec:zbesh f2cl-lib:d1mach f2cl-lib:i1mach \
f2cl-lib:int-sub f2cl-lib:flog f2cl-lib:int-add f2cl-lib:dsign f2cl-lib:fref \
slatec::zbunk slatec::zacon slatec::zbknu slatec::zuoik slatec::zabs slatec::zbinu \
slatec::zmlt slatec::zs1s2 slatec::zseri slatec::zasyi   slatec::zmlri slatec::zwrsk \
slatec::zbuni slatec::zdiv slatec::zuchk slatec::dgamln slatec::zlog f2cl-lib:int \
f2cl-lib:fdo)(SLATEC:ZBESH F2CL-LIB:D1MACH F2CL-LIB:I1MACH F2CL-LIB:INT-SUB \
F2CL-LIB:FLOG                           F2CL-LIB:INT-ADD F2CL-LIB:DSIGN F2CL-LIB:FREF \
SLATEC::ZBUNK                           SLATEC::ZACON SLATEC::ZBKNU SLATEC::ZUOIK \
SLATEC::ZABS                           SLATEC::ZBINU SLATEC::ZMLT SLATEC::ZS1S2 \
SLATEC::ZSERI                           SLATEC::ZASYI SLATEC::ZMLRI SLATEC::ZWRSK \
SLATEC::ZBUNI                           SLATEC::ZDIV SLATEC::ZUCHK SLATEC::DGAMLN \
SLATEC::ZLOG                           F2CL-LIB:INT F2CL-LIB:FDO)MAXIMA> \
(SLATEC:ZBESH -2.0d0 4.0d0 0.009999999999999787d0 1 2 7 (make-array 7 :element-type \
'double-float :initial-contents '(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0)) \
(make-array 7 :element-type 'double-float :initial-contents '(0.0d0 0.0d0 0.0d0 0.0d0 \
0.0d0 0.0d0 0.0d0)) 0 0)   0: (SLATEC:ZBESH -2.0d0 4.0d0 0.009999999999999787d0 1 2 7 \
#(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0) #(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 \
0.0d0) 0 0)       1: (F2CL-LIB:D1MACH 4)       1: F2CL-LIB:D1MACH returned \
2.2204460492503136e-16       1: (F2CL-LIB:I1MACH 15)       1: F2CL-LIB:I1MACH \
returned -1020       1: (F2CL-LIB:I1MACH 16)       1: F2CL-LIB:I1MACH returned 1023   \
1: (F2CL-LIB:D1MACH 5)       1: F2CL-LIB:D1MACH returned 0.30102999566398114       1: \
(F2CL-LIB:I1MACH 14)       1: F2CL-LIB:I1MACH returned 53       1: (SLATEC::ZABS \
-2.0d0 4.0d0)       1: SLATEC::ZABS returned 4.47213595499958 NIL NIL       1: \
(F2CL-LIB:I1MACH 9)       1: F2CL-LIB:I1MACH returned 4611686018427387903       1: \
(F2CL-LIB:D1MACH 1)       1: F2CL-LIB:D1MACH returned 2.2250738585072014e-308       \
1: (SLATEC::ZUOIK -4.0d0 -2.0d0 0.009999999999999787d0 1 2 7 #(0.0d0 0.0d0 0.0d0 \
0.0d0 0.0d0 0.0d0 0.0d0) #(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0) 0 \
2.2204460492503136d-16 700.2285216144315d0 664.1783734536958d0)           2: \
(F2CL-LIB:D1MACH 1)           2: F2CL-LIB:D1MACH returned 2.2250738585072014e-308     \
2: (SLATEC::ZABS 1.2448979591836735d0 0.32653061224489793d0)           2: \
SLATEC::ZABS returned 1.2870093898308215 NIL NIL           2: (SLATEC::ZDIV \
2.125146068076162d0 0.14510587625445748d0 0.5714285714285714d0 0.2857142857142857d0 \
0.0d0 0.0d0)               3: (SLATEC::ZABS 0.5714285714285714d0 \
0.2857142857142857d0)               3: SLATEC::ZABS returned 0.6388765649999399 NIL \
NIL           2: SLATEC::ZDIV returned                     NIL                     \
NIL                     NIL                     NIL                     \
3.076778608684747                     -1.284454020897073           2: (SLATEC::ZLOG \
3.076778608684747d0 -1.284454020897073d0 2.125146068076162d0 0.14510587625445748d0 0) \
3: (SLATEC::ZABS 3.076778608684747d0 -1.284454020897073d0)               3: \
SLATEC::ZABS returned 3.334124883482727 NIL NIL           2: SLATEC::ZLOG returned \
NIL NIL 1.204210241180393 -0.395473001075958 0           2: (SLATEC::ZDIV 1.0d0 0.0d0 \
1.125146068076162d0 0.14510587625445748d0 0.5714285714285714d0 0.2857142857142857d0)  \
3: (SLATEC::ZABS 1.125146068076162d0 0.14510587625445748d0)               3: \
SLATEC::ZABS returned 1.1344643625212831 NIL NIL           2: SLATEC::ZDIV returned   \
NIL                     NIL                     NIL                     NIL           \
0.8742329908129602                     -0.11274655600883517           2: \
(SLATEC::ZABS 0.12489042725899431d0 -0.016106650858405024d0)           2: \
SLATEC::ZABS returned 0.12592475143040271 NIL NIL           2: (SLATEC::ZABS \
0.4438353080759295d0 -0.028501864931645117d0)           2: SLATEC::ZABS returned \
0.44474952164048137 NIL NIL       1: SLATEC::ZUOIK returned NIL NIL NIL NIL NIL NIL \
NIL NIL 0 NIL NIL NIL       1: (SLATEC::ZACON -4.0d0 -2.0d0 0.009999999999999787d0 1 \
1 7 #(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0) #(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 \
0.0d0 0.0d0) 0 21.784271729432422d0 85.92135864716212d0 2.2204460492503136d-16 \
700.2285216144315d0 664.1783734536958d0)           2: (SLATEC::ZBINU 4.0d0 2.0d0 \
0.009999999999999787d0 1 7 #(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0) #(0.0d0 0.0d0 \
0.0d0 0.0d0 0.0d0 0.0d0 0.0d0) 0 21.784271729432422d0 85.92135864716212d0 \
2.2204460492503136d-16 700.2285216144315d0 664.1783734536958d0)               3: \
(SLATEC::ZABS 4.0d0 2.0d0)               3: SLATEC::ZABS returned 4.47213595499958 \
NIL NIL               3: (SLATEC::ZSERI 4.0d0 2.0d0 0.009999999999999787d0 1 7 \
#(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0) #(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 \
0.0d0) 0 2.2204460492503136d-16 700.2285216144315d0 664.1783734536958d0)              \
4: (SLATEC::ZABS 4.0d0 2.0d0)                   4: SLATEC::ZABS returned \
4.47213595499958 NIL NIL                   4: (F2CL-LIB:D1MACH 1)                   \
4: F2CL-LIB:D1MACH returned 2.2250738585072014e-308                   4: \
(SLATEC::ZMLT 2.0d0 1.0d0 2.0d0 1.0d0 0.0d0 0.0d0)                   4: SLATEC::ZMLT \
returned NIL NIL NIL NIL 3.0 4.0                   4: (SLATEC::ZABS 3.0d0 4.0d0)      \
4: SLATEC::ZABS returned 5.0 NIL NIL                   4: (SLATEC::ZLOG 2.0d0 1.0d0 \
0.0d0 0.0d0 0)                       5: (SLATEC::ZABS 2.0d0 1.0d0)                    \
5: SLATEC::ZABS returned 2.23606797749979 NIL NIL                   4: SLATEC::ZLOG \
returned                             NIL                             NIL              \
0.8047189562170503                             0.46364760900080615                    \
0                   4: (SLATEC::DGAMLN 7.01d0 0)                       5: \
(F2CL-LIB:D1MACH 4)                       5: F2CL-LIB:D1MACH returned \
2.2204460492503136e-16                       5: (F2CL-LIB:I1MACH 14)                  \
5: F2CL-LIB:I1MACH returned 53                       5: (F2CL-LIB:D1MACH 5)           \
5: F2CL-LIB:D1MACH returned 0.30102999566398114debugger invoked on a TYPE-ERROR \
@7005DD02EC in thread#<THREAD "main thread" RUNNING {7006E00003}>:   The value       \
#<unknown immediate object, lowtag=#b1001, widetag=#x49 {7005C4FA49}>   is not of \
type       (SIGNED-BYTE 32)Type HELP for debugger help, or (SB-EXT:EXIT) to exit from \
SBCL.restarts (invokable by number or by possibly-abbreviated name):   0: \
[MACSYMA-QUIT] Maxima top-level   1: [ABORT             ] Exit from the current \
thread.(SLATEC::DGAMLN 7.01d0 0)     source: (F2CL-LIB:INT-ADD K 1)0] LSLATEC::IERR   \
=   0SLATEC::Z   =   7.01d00] P(SLATEC::DGAMLN 7.01d0 0)0] SOURCE(F2CL-LIB:INT-ADD K \
1)0] 1                   4: SLATEC::DGAMLN exited non-locally               3: \
SLATEC::ZSERI exited non-locally           2: SLATEC::ZBINU exited non-locally       \
1: SLATEC::ZACON exited non-locally   0: SLATEC:ZBESH exited non-locallyReturning to \
Maxima- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -It seems that \
SLATEC::DGAMLN function returns an error when evaluating (F2CL-LIB:INT-ADD K \
1).SLATEC::DGAMLN is included in \
"maxima-5.47.0/src/numerical/slatec/dgamln.lisp".Thanks.


[Attachment #5 (multipart/related)]

[Attachment #7 (unknown)]

<html><body><div>Thanks for your help!<br></div><div>Now, I can build Maxima-5.47.0 \
with the development version of SBCL.<br></div><div><br></div><div>But, some compiled \
functions of Maxima are broken on ARM64 macOS \
Monterey.<br></div><div><br></div><div>For example, both SLATEC:ZBESH and \
SLATEC::DGAMLN are broken. This issue causes an error of the bessel_j function of \
Maxima.<br></div><div><br></div><div>On ARM64 SBCL Maxima-5.47.0, the bessel_j \
function returns an error:<br></div><div>- - - - - - - - - - - - - - - - - - - - - - \
- - - - - - - -<br></div><div>% ../../sbcl_arm64/bin/sbcl --core \
./binary-sbcl/maxima.core --noinform --norc<br></div><div>Maxima 5.47.0 <a \
rel="noopener noreferrer" \
href="https://maxima.sourceforge.io">https://maxima.sourceforge.io</a><br></div><div>using \
Lisp SBCL 2.3.6.116-a58a4b217-WIP<br></div><div>Distributed under the GNU Public \
License. See the file COPYING.<br></div><div>Dedicated to the memory of William \
Schelter.<br></div><div>The function bug_report() provides bug reporting \
information.<br></div><div>(%i1) bessel_j(- 6.01, 4.0*%i - \
2.0);<br></div><div><br></div><div>Maxima encountered a Lisp \
error:<br></div><div><br></div><div>%&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& \
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb \
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp \
;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& \
nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb \
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br></div><div>- \
- - - - - - - - - - - - - - - - - - - - - - - - - - - - \
-<br></div><div><br></div><div>On the other hand, x86-64 SBCL Maxima-5.47.0 works \
well:<br></div><div>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \
-<br></div><div>$ ../../sbcl_x86_64/bin/sbcl --core ./binary-sbcl/maxima.core \
--noinform --norc<br></div><div>Maxima 5.47.0 <a rel="noopener noreferrer" \
href="https://maxima.sourceforge.io">https://maxima.sourceforge.io</a><br></div><div>using \
Lisp SBCL 2.3.6.116-a58a4b217-WIP<br></div><div>Distributed under the GNU Public \
License. See the file COPYING.<br></div><div>Dedicated to the memory of William \
Schelter.<br></div><div>The function bug_report() provides bug reporting \
information.<br></div><div>(%i1) bessel_j(- 6.01, 4.0*%i - \
2.0);<br></div><div>(%o1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
0.04316916456151376 %i + 0.26621554003138737<br></div><div>(%i2) \
quit();<br></div><div>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \
-<br></div><div><br></div><div>And the following trace shows that bessel_j calls \
SLATEC:ZBESH function two times:<br></div><div>(only the fifth argument is \
different)<br></div><div>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \
-<br></div><div>$ ../../sbcl_x86_64/bin/sbcl --core ./binary-sbcl/maxima.core \
--noinform --norc<br></div><div>Maxima 5.47.0 <a rel="noopener noreferrer" \
href="https://maxima.sourceforge.io">https://maxima.sourceforge.io</a><br></div><div>using \
Lisp SBCL 2.3.6.116-a58a4b217-WIP<br></div><div>Distributed under the GNU Public \
License. See the file COPYING.<br></div><div>Dedicated to the memory of William \
Schelter.<br></div><div>The function bug_report() provides bug reporting \
information.<br></div><div>(%i1) :lisp (trace $bessel_j SLATEC:ZBESH HANKEL-1 \
HANKEL-2 BESSEL-J)<br></div><div><br></div><div>($BESSEL_J ZBESH HANKEL-1 HANKEL-2 \
BESSEL-J)<br></div><div>(%i1) bessel_j(- 6.01, 4.0*%i - 2.0);<br></div><div>&nbsp; 0: \
(MAXIMA::BESSEL-J -6.01d0 #C(-2.0d0 4.0d0))<br></div><div>&nbsp;&nbsp;&nbsp; 1: \
(MAXIMA::HANKEL-1 -6.01d0 #C(-2.0d0 \
4.0d0))<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2: (MAXIMA::HANKEL-1 6.01d0 \
#C(-2.0d0 4.0d0))<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3: \
(SLATEC:ZBESH -2.0d0 4.0d0 0.009999999999999787d0 1 1 7 #(0.0d0 0.0d0 0.0d0 0.0d0 \
0.0d0 0.0d0 0.0d0) #(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0) 0 \
0)<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3: SLATEC:ZBESH returned \
NIL NIL NIL NIL NIL NIL NIL NIL 0 0<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2: \
HANKEL-1 returned #C(-0.05960122792538561 \
-0.15726626400631025)<br></div><div>&nbsp;&nbsp;&nbsp; 1: HANKEL-1 returned \
#C(-0.054631965587457046 -0.15906078240964094)<br></div><div>&nbsp;&nbsp;&nbsp; 1: \
(MAXIMA::HANKEL-2 -6.01d0 #C(-2.0d0 \
4.0d0))<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2: (MAXIMA::HANKEL-2 6.01d0 \
#C(-2.0d0 4.0d0))<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3: \
(SLATEC:ZBESH -2.0d0 4.0d0 0.009999999999999787d0 1 2 7 #(0.0d0 0.0d0 0.0d0 0.0d0 \
0.0d0 0.0d0 0.0d0) #(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0) 0 \
0)<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3: SLATEC:ZBESH returned \
NIL NIL NIL NIL NIL NIL NIL NIL 0 0<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2: \
HANKEL-2 returned #C(0.579065193105355 \
0.2637181177754141)<br></div><div>&nbsp;&nbsp;&nbsp; 1: HANKEL-2 returned \
#C(0.5870630456502318 0.24539911153266847)<br></div><div>&nbsp; 0: BESSEL-J returned \
#C(0.26621554003138737 \
0.04316916456151376)<br></div><div>(%o1)&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
0.04316916456151376 %i + 0.26621554003138737<br></div><div>(%i2) \
quit();<br></div><div>- - - - - - - - - - - - - - - - - - - - - - - - - - - - - \
-<br></div><div><br></div><div>So I tried to debug bessel_j on ARM64 SBCL \
Maxima-5.47.0:<br></div><div>- - - - - - - - - - - - - - - - - - - - - - - - - - - - \
- -<br></div><div>% ../../sbcl_arm64/bin/sbcl --core ./binary-sbcl/maxima.core \
--noinform --norc<br></div><div>Maxima 5.47.0 <a rel="noopener noreferrer" \
href="https://maxima.sourceforge.io">https://maxima.sourceforge.io</a><br></div><div>using \
Lisp SBCL 2.3.6.116-a58a4b217-WIP<br></div><div>Distributed under the GNU Public \
License. See the file COPYING.<br></div><div>Dedicated to the memory of William \
Schelter.<br></div><div>The function bug_report() provides bug reporting \
information.<br></div><div>(%i1) to_lisp();<br></div><div><br></div><div>Type \
(to-maxima) to restart, ($quit) to quit \
Maxima.<br></div><div><br></div><div>MAXIMA&gt; (setq *debugger-hook* \
nil)<br></div><div><br></div><div>NIL<br></div><div>MAXIMA&gt; (trace $bessel_j \
SLATEC:ZBESH HANKEL-1 HANKEL-2 BESSEL-J)<br></div><div><br></div><div>($BESSEL_J \
SLATEC:ZBESH HANKEL-1 HANKEL-2 BESSEL-J)<br></div><div>MAXIMA&gt; #$bessel_j(- 6.01, \
4.0*%i - 2.0)$<br></div><div>&nbsp; 0: (MAXIMA::BESSEL-J -6.01d0 #C(-2.0d0 \
4.0d0))<br></div><div>&nbsp;&nbsp;&nbsp; 1: (MAXIMA::HANKEL-1 -6.01d0 #C(-2.0d0 \
4.0d0))<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2: (MAXIMA::HANKEL-1 6.01d0 \
#C(-2.0d0 4.0d0))<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3: \
(SLATEC:ZBESH -2.0d0 4.0d0 0.009999999999999787d0 1 1 7 #(0.0d0 0.0d0 0.0d0 0.0d0 \
0.0d0 0.0d0 0.0d0) #(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0) 0 \
0)<br></div><div><br></div><div>debugger invoked on a \
SB-INT:INVALID-ARRAY-INDEX-ERROR @7004D7DA50 in thread<br></div><div>#&lt;THREAD \
"main thread" RUNNING {7006E00003}&gt;:<br></div><div>&nbsp; #&lt;unknown immediate \
object, lowtag=#b1101, widetag=#xD {700732230D}&gt; is not of type \
INTEGER.<br></div><div><br></div><div>Type HELP for debugger help, or (SB-EXT:EXIT) \
to exit from SBCL.<br></div><div><br></div><div>restarts (invokable by number or by \
possibly-abbreviated name):<br></div><div>&nbsp; 0: [MACSYMA-QUIT] Maxima \
top-level<br></div><div>&nbsp; 1: [ABORT&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ] Exit \
from the current thread.<br></div><div><br></div><div>(SLATEC:ZBESH -2.0d0 4.0d0 \
0.009999999999999787d0 1 1 7 #(-0.006422270890237786d0 -0.007452140904358356d0 \
-0.011244693070829145d0 -0.020737028670355366d0 -0.04400017233503277d0 \
-0.1022606857621183d0 -0.24847333482671863d0) #(-0.008439416303090813d0 \
-0.00896909532292368d0 -0.010557598350871592d0 -0.012937037782551123d0 \
-0.013650100581509214d0 4.563390974043763d-4 0.08972961010333168d0) 0 \
0)<br></div><div>&nbsp;&nbsp; source: (SETF (F2CL-LIB:FREF CYR (I) ((1 N))) (* STR \
ATOL))<br></div><div>0] L<br></div><div>SLATEC::ASCLE&nbsp; =&nbsp; \
1.0020841800044862d-289<br></div><div>SLATEC::ATOL&nbsp; =&nbsp; \
1.0d0<br></div><div>SLATEC::CSGNI&nbsp; =&nbsp; \
-0.6365412341661386d0<br></div><div>SLATEC::CSGNR&nbsp; =&nbsp; \
-0.009999588771556434d0<br></div><div>SLATEC::CYI&nbsp; =&nbsp; \
#(-0.008439416303090813d0 \
-0.00896909532292368d0<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
-0.010557598350871592d0 \
-0.012937037782551123d0<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
-0.013650100581509214d0 \
4.563390974043763d-4<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
0.08972961010333168d0)<br></div><div>SLATEC::CYR&nbsp; =&nbsp; \
#(-0.006422270890237786d0 \
-0.007452140904358356d0<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
-0.011244693070829145d0 \
-0.020737028670355366d0<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
-0.04400017233503277d0 \
-0.1022606857621183d0<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
-0.24847333482671863d0)<br></div><div>SLATEC::FNU&nbsp; =&nbsp; \
0.009999999999999787d0<br></div><div>SLATEC::I&nbsp; =&nbsp; \
#(-0.008439416303090813d0 \
-0.00896909532292368d0<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
-0.010557598350871592d0 \
-0.012937037782551123d0<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
-0.013650100581509214d0 \
4.563390974043763d-4<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
0.08972961010333168d0)<br></div><div>SLATEC::IERR&nbsp; =&nbsp; \
0<br></div><div>SLATEC::KODE&nbsp; =&nbsp; 1<br></div><div>SLATEC::M&nbsp; =&nbsp; \
1<br></div><div>SLATEC::N&nbsp; =&nbsp; 7<br></div><div>SLATEC::NZ&nbsp; =&nbsp; \
0<br></div><div>SLATEC::RTOL&nbsp; =&nbsp; \
4.503599627370495d15<br></div><div>SLATEC::STI&nbsp; =&nbsp; \
0.004172430931124104d0<br></div><div>SLATEC::TOL&nbsp; =&nbsp; \
2.2204460492503136d-16<br></div><div>SLATEC::ZI&nbsp; =&nbsp; \
4.0d0<br></div><div>SLATEC::ZR&nbsp; =&nbsp; -2.0d0<br></div><div>SLATEC::ZTI&nbsp; \
=&nbsp; -1.0d0<br></div><div><br></div><div>0] P<br></div><div>(SLATEC:ZBESH -2.0d0 \
4.0d0 0.009999999999999787d0 1 1 7 #(-0.006422270890237786d0 -0.007452140904358356d0 \
-0.011244693070829145d0 -0.020737028670355366d0 -0.04400017233503277d0 \
-0.1022606857621183d0 -0.24847333482671863d0) #(-0.008439416303090813d0 \
-0.00896909532292368d0 -0.010557598350871592d0 -0.012937037782551123d0 \
-0.013650100581509214d0 4.563390974043763d-4 0.08972961010333168d0) 0 \
0)<br></div><div>0] SOURCE<br></div><div><br></div><div>(SETF (F2CL-LIB:FREF CYR (I) \
((1 N))) (* STR ATOL))<br></div><div>0] \
1<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 3: SLATEC:ZBESH exited \
non-locally<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 2: HANKEL-1 exited \
non-locally<br></div><div>&nbsp;&nbsp;&nbsp; 1: HANKEL-1 exited \
non-locally<br></div><div>&nbsp; 0: BESSEL-J exited \
non-locally<br></div><div>Returning to Maxima<br></div><div>- - - - - - - - - - - - - \
- - - - - - - - - - - - - - - - -<br></div><div>It seems that the first called \
SLATEC:ZBESH function returns an error when evaluating (SETF (F2CL-LIB:FREF CYR (I) \
((1 N))) (* STR ATOL)).<br></div><div><br></div><div>SLATEC:ZBESH is included in \
"maxima-5.47.0/src/numerical/slatec/zbesh.lisp".<br></div><div><br></div><div><br></div><div>And \
I tried to evaluate the second called SLATEC:ZBESH function,<br></div><div>then it \
returns another error:<br></div><div>- - - - - - - - - - - - - - - - - - - - - - - - \
- - - - - -<br></div><div>% ../../sbcl_arm64/bin/sbcl --core \
./binary-sbcl/maxima.core --noinform --norc<br></div><div>Maxima 5.47.0 <a \
rel="noopener noreferrer" \
href="https://maxima.sourceforge.io">https://maxima.sourceforge.io</a><br></div><div>using \
Lisp SBCL 2.3.6.116-a58a4b217-WIP<br></div><div>Distributed under the GNU Public \
License. See the file COPYING.<br></div><div>Dedicated to the memory of William \
Schelter.<br></div><div>The function bug_report() provides bug reporting \
information.<br></div><div>(%i1) to_lisp();<br></div><div><br></div><div>Type \
(to-maxima) to restart, ($quit) to quit \
Maxima.<br></div><div><br></div><div>MAXIMA&gt; (setq *debugger-hook* \
nil)<br></div><div><br></div><div>NIL<br></div><div>MAXIMA&gt; (trace slatec:zbesh \
f2cl-lib:d1mach f2cl-lib:i1mach f2cl-lib:int-sub f2cl-lib:flog f2cl-lib:int-add \
f2cl-lib:dsign f2cl-lib:fref slatec::zbunk slatec::zacon slatec::zbknu slatec::zuoik \
slatec::zabs slatec::zbinu slatec::zmlt slatec::zs1s2 slatec::zseri \
slatec::zasyi&nbsp; slatec::zmlri slatec::zwrsk slatec::zbuni slatec::zdiv \
slatec::zuchk slatec::dgamln slatec::zlog f2cl-lib:int \
f2cl-lib:fdo)<br></div><div><br></div><div>(SLATEC:ZBESH F2CL-LIB:D1MACH \
F2CL-LIB:I1MACH F2CL-LIB:INT-SUB \
F2CL-LIB:FLOG<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
F2CL-LIB:INT-ADD F2CL-LIB:DSIGN F2CL-LIB:FREF \
SLATEC::ZBUNK<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
SLATEC::ZACON SLATEC::ZBKNU SLATEC::ZUOIK \
SLATEC::ZABS<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
SLATEC::ZBINU SLATEC::ZMLT SLATEC::ZS1S2 \
SLATEC::ZSERI<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
SLATEC::ZASYI SLATEC::ZMLRI SLATEC::ZWRSK \
SLATEC::ZBUNI<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
SLATEC::ZDIV SLATEC::ZUCHK SLATEC::DGAMLN \
SLATEC::ZLOG<br></div><div>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
F2CL-LIB:INT F2CL-LIB:FDO)<br></div><div>MAXIMA&gt; (SLATEC:ZBESH -2.0d0 4.0d0 \
0.009999999999999787d0 1 2 7 (make-array 7 :element-type 'double-float \
:initial-contents '(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0)) (make-array 7 \
:element-type 'double-float :initial-contents '(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 \
0.0d0)) 0 0)<br></div><div>&nbsp; 0: (SLATEC:ZBESH -2.0d0 4.0d0 \
0.009999999999999787d0 1 2 7 #(0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0) #(0.0d0 \
0.0d0 0.0d0 0.0d0 0.0d0 0.0d0 0.0d0) 0 0)<br></div><div>&nbsp;&nbsp;&nbsp; 1: \
(F2CL-LIB:D1MACH 4)<br></div><div>&nbsp;&nbsp;&nbsp; 1: F2CL-LIB:D1MACH returned \
2.2204460492503136e-16<br></div><div>&nbsp;&nbsp;&nbsp; 1: (F2CL-LIB:I1MACH \
15)<br></div><div>&nbsp;&nbsp;&nbsp; 1: F2CL-LIB:I1MACH returned \
-1020<br></div><div>&nbsp;&nbsp;&nbsp; 1: (F2CL-LIB:I1MACH \
16)<br></div><div>&nbsp;&nbsp;&nbsp; 1: F2CL-LIB:I1MACH returned \
1023<br></div><div>&nbsp;&nbsp;&nbsp; 1: (F2CL-LIB:D1MACH \





_______________________________________________
Sbcl-devel mailing list
Sbcl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sbcl-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic