nd maxima compiles but gives wrong result