close Warning: Can't synchronize with repository "(default)" (The repository directory has changed, you should resynchronize the repository with: trac-admin $ENV repository resync '(default)'). Look in the Trac log for more information.

Changeset 4411


Ignore:
Timestamp:
2016-06-07T19:53:33-07:00 (8 years ago)
Author:
Marek Rychlik
Message:

* empty log message *

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/f4grobner/5am-infix-print.lisp

    r4410 r4411  
    6161  ;; observing the precedence defined in the INFIX package
    6262  (is (equal (infix-print-to-string '(* 3 (sin x))) "3*(SIN(X))"))
     63  (is (equal (infix-print-to-string '(+ (* 3 x) (- (* 2 (expt y 2)) z))) "3*X+2*(Y^2)-Z"))
     64  ;; Distinguich between unary and binary minus
    6365  (is (equal (infix-print-to-string '(+ x (- y z))) "X+Y-Z"))
    6466  (is (equal (infix-print-to-string '(+ x (- y))) "X-Y"))
     67  ;; Distinguich between unary and binary division
    6568  (is (equal (infix-print-to-string '(* x (/ y z))) "X*Y/Z"))
    6669  (is (equal (infix-print-to-string '(* x (/ y))) "X/Y"))
    67   (is (equal (infix-print-to-string '(+ (* 3 x) (- (* 2 (expt y 2)) z))) "3*X+2*(Y^2)-Z"))
     70
    6871  )
    6972
Note: See TracChangeset for help on using the changeset viewer.