Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Op_Tame procedure returns 0 in one case, should return boolean true. #2

Open
agryman opened this issue Mar 25, 2022 · 0 comments
Open

Comments

@agryman
Copy link
Owner

agryman commented Mar 25, 2022

See:

Op_Tame:=proc(WOp::list(list))

Op_Tame:=proc(WOp::list(list))
    local parity,first,i,t,Wterm:

    if nops(WOp)=0 then return 0 fi:

    for i to nops(WOp) do
      Wterm:=WOp[i][2]:
      parity:=0:
      for t in Wterm do
        if t in [ Xspace_Pi, Xspace_PiPi2, Xspace_PiPi4 ] then
          return false:
        fi:
      od:
    od:

    true:
end:

The incorrect line is:

    if nops(WOp)=0 then return 0 fi:

The correction is:

    if nops(WOp)=0 then return true fi:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant