Tracing broken in some cases
Describe the bug
Tracing of compiled functions is broken and sometimes the traced function returns incorrectly.
To Reproduce
Steps to reproduce the behavior:
- Get maxima source code. Compile with cmucl snapshot 2021-07
- Run ./maxima-local
- Enter ":lisp (trace meval)"
- Enter "quad_qags(jacobi_sn(x,1/2),x,0,1);"
- You'll see
0: (MEVAL (($QUAD_QAGS) ((%JACOBI_SN) $X ((MQUOTIENT) 1 2)) $X 0 1))
1: (MEVAL ((%JACOBI_SN) $X ((MQUOTIENT) 1 2)))
2: (MEVAL $X)
2: MEVAL returned $X
2: (MEVAL ((MQUOTIENT) 1 2))
3: (MEVAL 1)
3: MEVAL returned 1
3: (MEVAL 2)
3: MEVAL returned 2
2: MEVAL returned ((RAT SIMP) 1 2)
1: MEVAL returned ((%JACOBI_SN SIMP) $X ((RAT SIMP) 1 2))
1: (MEVAL $X)
1: MEVAL returned $X
1: (MEVAL 0)
1: MEVAL returned 0
1: (MEVAL 1)
1: MEVAL returned 1
1: (MEVAL ((MNOT) (($ATOM) $X)))
0: MEVAL returned
(($QUAD_QAGS SIMP) ((%JACOBI_SN SIMP) $X ((RAT SIMP) 1 2)) $X 0 1
((MEQUAL SIMP) $EPSREL 1.0e-8) ((MEQUAL SIMP) $EPSABS 0.0)
((MEQUAL SIMP) $LIMIT 200))
Evaluation took 0.2400 seconds (0.2400 elapsed) using 527.797 KB.
(%o4) quad_qags(jacobi_sn(x,1/2),x,0,1,epsrel = 1.0e-8,epsabs = 0.0,limit
= 200)
Expected behavior
quad_qags(jacobi_sn(x,1/2),x,0,1)
should return a numerical result
instead of returning the noun form of the function again.
Desktop:
- OS: Linux/Fedora
- Version: snapshot-2021-07