From: Rainer S. <rai...@gm...> - 2025-04-05 05:58:26
|
The accuracy a must be a positive integer, interpreted as 10^(-a), but this is not checked in the code. I will commit a correction with an additional error check in a moment. Rainer On Fri, 4 Apr 2025 at 22:32 +0100, Arthur Norman via Reduce-algebra-develop...: > Until this evening if you passed non-numeric values such as > (!:rd!: . 1.0e-36) to expt in CSL it crashed out in an embarassing way, but I > have now made that function check its args a bit better. I hit this when > trying to do a numerical minimization, and sometimes that seems to pass a > Reduce wrapped up float not a number. Well also the value 10^1.0e-36 looks a > pretty odd thing to be calculating! I have not (yet) looked inside the code > to understand what is going on - this is posted so that others can comment > too.... > > > 1: on backtrace; > > 2: num_min(cos x^2 + cos y^2, {x=1, y=2}, accuracy=1.0e-36, iterations=100); > +++ Error: expt 10 (!:rd!: . 1.0e-36) > Inside: steepdeceval1 > Arg1: (plus (expt (cos x) 2) (expt (cos y) 2)) > Arg2: (x y) > Arg3: (1 2) > Arg4: num_min > Inside: rdmineval > Arg1: ((plus (expt (cos x) 2) (expt (cos y) 2)) (list (equal x 1) (equal y > 2)) ( > equal accuracy (!:dn!: 10 . -37)) (equal iterations 100)) > Inside: lispapply > ... > > Arthur > > > > _______________________________________________ > Reduce-algebra-developers mailing list > Red...@li... > https://lists.sourceforge.net/lists/listinfo/reduce-algebra-developers > Rainer Schöpf |