Changeset 26307 in project


Ignore:
Timestamp:
04/01/12 17:49:52 (9 years ago)
Author:
sjamaan
Message:

numbers: Fix another copy/paste mistake found by s7 tests, this time in division

Location:
release/4/numbers/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • release/4/numbers/trunk/numbers.scm

    r26306 r26307  
    517517              (%/ (%* (%quotient a g1) (%quotient d g2))
    518518                  (%* (%quotient b g2) (%quotient c g1))))]
    519        [COMP (%comp-comp (%make-complex x 0) y)]
     519       [COMP (%comp/comp (%make-complex x 0) y)]
    520520       ;; TODO: This can be incorrect when the ratnum consists of bignums
    521521       [FLO (fp/ (%exact->inexact x) y)]
  • release/4/numbers/trunk/tests/numbers-test.scm

    r26306 r26307  
    184184 (test-assert "/: comp/comp" (show (/ c1 c1)))
    185185 (test-assert "/: comp/comp (inexact)" (show (/ c1 c2)))
     186 (test "/: rat/complex" 1/10-1/5i (/ 1/2 1+2i))
     187 (test "/: rat/complex (negative im)" 1/10+1/5i (/ 1/2 1-2i))
     188 (test "/: rat/complex (negative real)" -1/10-1/5i (/ 1/2 -1+2i))
     189 (test "/: rat/complex (negative real&im)" -1/10+1/5i (/ 1/2 -1-2i))
     190 
    186191 (test-assert "/: multiarg" (show (/ 66 2 44)))
    187192 (test-error "/: div by 0" (/ 33 0))
Note: See TracChangeset for help on using the changeset viewer.