home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.scheme
- Path: sparky!uunet!think.com!mintaka.lcs.mit.edu!zurich.ai.mit.edu!jaffer
- From: jaffer@zurich.ai.mit.edu (Aubrey Jaffer)
- Subject: patch for scm4a11
- Message-ID: <JAFFER.92Sep8231217@camelot.ai.mit.edu>
- Sender: news@mintaka.lcs.mit.edu
- Organization: M.I.T. Artificial Intelligence Lab.
- Distribution: comp
- Date: Wed, 9 Sep 1992 04:12:17 GMT
- Lines: 16
-
- From: robt@is.morgan.com (Rob Torop)
- (/ 1 1+i) gives a bus error on some systems. Here is the patch:
- camelot>diff -c scl.c~ scl.c
- *** scl.c~ Wed Aug 26 21:35:35 1992
- --- scl.c Tue Sep 8 23:04:31 1992
- ***************
- *** 809,816 ****
- double r=REAL(y),i=IMAG(y);
- long a=INUM(x);
- double d=r*r+i*i;
- - if CPLXP(x)
- - return makdbl((a*r+IMAG(x)*i)/d,(IMAG(x)*r-a*i)/d);
- return makdbl((a*r)/d,(-a*i)/d);
- }
- return makdbl(INUM(x)/REALPART(y) ,0.0);
- --- 809,814 ----
-