Menu

#106 Syntax error with square root of rational expression

None
closed
nobody
None
5
2020-01-07
2019-10-01
chakravala
No

Greetings, looks like one of my users (of Reduce.jl in Julia) found a bug in REDUCE:

reduce> (1/(f+t)^2)^(1/2);
Error showing value of type RExpr:
ERROR: Reduce: 

***** Syntax error: f(
+++ Error attempt to take car of an atom: 1

Link for the issue on github: https://github.com/chakravala/Reduce.jl/issues/27

Related

Bugs: #106

Discussion

  • Arthur Norman

    Arthur Norman - 2019-10-01

    On Tue, 1 Oct 2019, chakravala wrote:

    ** [bugs:#106] Syntax error with square root of rational expression**
    Greetings, looks like one of my users (of Reduce.jl in Julia) found a
    bug in REDUCE:
    ```
    reduce> (1/(f+t)^2)^(1/2);
    Error showing value of type RExpr:
    ERROR: Reduce:

    * Syntax error: f(
    +++ Error attempt to take car of an atom: 1
    ```
    Link for the issue on github:
    https://github.com/chakravala/Reduce.jl/issues/27

    When I try a first check using Reduce directly I see

    $O/bin/redcsl -w
    Reduce (Free CSL version, revision 5144), 30-Sep-19 ...

    1: (1/(f+t)^2)^(1/2);

      1
    

    abs(f + t)

    so there are several things that we can ask you about:
    (1) Exactly which release of Reduce has gone through all the various
    transformation processes so as to be sued within Julia? Ie if the current
    version on sourceforge built in simple ways doe snot fail is that because
    something has changed since the version you use?

    (2) I also tried using the Java "jlisp" with the most recent reduce.jar I
    happened to have made for myself. If I understand that you just sent
    "*1/(f+t)^2)^(1/2)" to the Reduce reader this takes things at least a bit
    closer to you. When starting up Reduce or earlier in the session with it
    what has happened? Are there flags set or changed or other things
    involved?

    java -jar reduce.jar -w -v
    Image file defaulting to in-store data
    Reduce (Free CSL version, revision 4976), 04-May-2019 20:49:43 ...
    Jlisp 0.97 ... 04/05/19 20:49
    Sym = 7475
    Cons = 61750
    String = 676

    1: (1/(f+t)^2)^(1/2);

      1
    

    abs(f + t)

    (3) Please try the example using the names a and b rather than f and t,
    since at the Lisp level T is a variable that has itself as its value and
    that has been used since the early 1960s to denote "true", and to a lesser
    extent sometimes f had the value nil and was used for false. That OUGHT
    not to intrude on algebraic mode usage but lets rule out any issues of
    that sort.

    (4) Can you go "tr simpsqrt;" and indeed "tr xxx;" for many functions
    within Reduce used to get to where you see this and see Reduce's trace
    output? I do not know yet what would be most useful to trace! Can you go

    (5) Can you find a way to reproduce the bad behaviour using the PSL or CSL
    "ordinary" versions of Reduce?

    (6) If all the above fail how feasible would it be to get a kit to us so
    that we could both build and rebuild trick versions of Reduce with extra
    print statements if we needed and them reproduce the issue you see? Note
    that I have perhaps never touched Javascript and so anything that involves
    it would need to be in a form that gave me very very simple push button
    schemes to do things.

    THose at least maybe provide s starting point, even though they do not
    resolve your issue!

    Arthur

     

    Related

    Bugs: #106

    • Arthur Norman

      Arthur Norman - 2019-10-01

      Oh one more idea to help debug. "on backtrace;" in Reduce can lead to a
      (sometimes cryptic!) indication of where things were when a low-level mess
      was seen, so switching that on can help diagnose.

      However the errorset function can make errors silent, so soimethimes I
      hack thatimplementation of errorset so that it is as if its args 2 and 3
      were always non-NIL so that backtraces do not get supressed!!

      Arthur

       
    • chakravala

      chakravala - 2019-10-02

      Thanks for your help, the solution was to upgrade to a newer version of REDUCE, I found that using revision 5122, 5129, and 5151 are all not erroring on this input.

      I have updated the build scripts to use the updated versions of REDUCE from september now.

      This issue can be closed now.

       

      Last edit: chakravala 2019-10-02
  • Rainer Schöpf

    Rainer Schöpf - 2020-01-07
    • status: open --> closed
    • Group: -->
     

Log in to post a comment.

MongoDB Logo MongoDB