Skip to content
Snippets Groups Projects
Commit c4cc825d authored by dtc's avatar dtc
Browse files

Updates to the derive type optimisers from Raymond Toy:

o Optimizer for + recognizes the case of (+ x x).  The old behavior
  produced a result that was wider than necessary.

o Optimizer for - recognizes (- x x) is always 0.

o Optimizer for / recognizes (/ x x) is 1, usually.  However, if x can
  contain 0, we don't return 1 as the result because 0 / 0 is not
  1. (Perhaps if safety = 0, we could ignore this possibility, and just
  say the result is always 1?)

o Optimizer for abs understands union types.  This also corrects the bug
  that abs of a union type returned NUMBER instead of (REAL 0), as it
  should have.
parent 8eb07ea5
No related branches found
No related tags found
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment