--* From postmaster%watson.vnet.ibm.com@yktvmv.watson.ibm.com  Thu Mar 31 06:32:18 1994
--* Received: from yktvmv.watson.ibm.com by leonardo.watson.ibm.com (AIX 3.2/UCB 5.64/920123)
--*           id AA26838; Thu, 31 Mar 1994 06:32:18 -0500
--* X-External-Networks: yes
--* Received: from watson.vnet.ibm.com by yktvmv.watson.ibm.com (IBM VM SMTP V2R3)
--*    with BSMTP id 1687; Thu, 31 Mar 94 06:31:55 EST
--* Received: from YKTVMV by watson.vnet.ibm.com with "VAGENT.V1.0"
--*           id <A.THEMOS.NOTE.YKTVMV.7023.Mar.31.06:31:54.-0500>
--*           for asbugs@watson; Thu, 31 Mar 94 06:31:55 -0500
--* Received: from ben.britain.eu.net by watson.ibm.com (IBM VM SMTP V2R3) with TCP;
--*    Thu, 31 Mar 94 06:31:53 EST
--* Received: from num-alg-grp.co.uk by ben.britain.eu.net via JANET
--*           with NIFTP (PP) id <g.09119-0@ben.britain.eu.net>;
--*           Thu, 31 Mar 1994 12:22:41 +0100
--* From: Theodore Thomas Tsikas <themos@num-alg-grp.co.uk>
--* Date: Thu, 31 Mar 94 12:18:51 BST
--* Message-Id: <7273.9403311118@nags2.nag.co.uk>
--* Received: from co.uk (nags8) by nags2.nag.co.uk (4.1/UK-2.1) id AA07273;
--*           Thu, 31 Mar 94 12:18:51 BST
--* To: asbugs@watson.ibm.com
--* Subject: rios executable fails with (illegal instruction)

--@ Fixed  by:  PAB   Thu May 11 09:53:36 EDT 1995 
--@ Tested by:  none 
--@ Summary:    Bug no longer appears. File compiles, runs, and produces huge amounts of output. 

#if 0
nagrs1:themos 1>source ~/.axiom_rs1_2.0b
nagrs1:themos 2>asharp -v -Fx -lasdem cantor.as
A# version 34.5 for AIX RS/6000
(Warning) The file `cantor.aso' will now be out of date.
(Warning) The file `cantor.c' will now be out of date.
Exec: unicl -I/home/red5/axiom/beta_2.0/asharp/base/rs3.2/include -c ca0DUX00.c
Exec: xlc -I/home/red5/axiom/beta_2.0/asharp/base/rs3.2/include -I/usr/include -c ca0DUX00.c
               in sc sy li pa ab sb ti gf of pb pc po
 Time    9.9 s .3 .3  1 .1 .5 .1 .3 29  2 .8 .1  8 56 %

 Source  104 lines,  628 lines per minute
 Store  3748 K pool
(Warning) The file `asmain.c' will now be out of date.
Exec: unicl -I/home/red5/axiom/beta_2.0/asharp/base/rs3.2/include -c as0DUX01.c
Exec: xlc -I/home/red5/axiom/beta_2.0/asharp/base/rs3.2/include -I/usr/include -c as0DUX01.c
               po
 Time    0.6 s100 %

 Source  104 lines,  10229 lines per minute
 Store  3748 K pool
Exec: unicl ca0DUX00.o as0DUX01.o -L/home/red5/axiom/beta_2.0/asharp/base/rs3.2/lib -o  cantor -lasdem -laslib -lfoam -lm
Exec: xlc -I/usr/include -ocantor ca0DUX00.o as0DUX01.o -L/home/red5/axiom/beta_2.0/asharp/base/rs3.2/lib -L/lib -L/usr/lib -L/usr/local/lib -lasdem -laslib -lfoam -lm
nagrs1:themos 3>./cantor
Illegal instruction
#endif

------- cantor.as follows
#include "aslib.as"
#library asdem "asdem"
import from asdem

import from OutPort

a1(l:List List DoubleFloat):List List DoubleFloat==
   concat( [cons(0.0,x) for x in l],[cons(1.0,x) for x in l])

raise(b:Complex DoubleFloat,n:SingleInteger):Complex DoubleFloat==
   c:Complex DoubleFloat:=complex(1.0,0.0)
   for i in 1..n repeat
    c:= c*b
   c

fm(b:Complex DoubleFloat,n:SingleInteger):Matrix DoubleFloat ==
   L:List List DoubleFloat:=
     [ [ real(f:=raise(b,i)),imag(f)]  for i in 1..n]
   matrix L

gm(n:SingleInteger):Matrix DoubleFloat ==
  l:List List DoubleFloat:=[empty()$List(DoubleFloat)]
  for i in 1..n repeat l:=a1(l)
  matrix l

ma(b:Complex DoubleFloat,n:SingleInteger):Matrix DoubleFloat ==
  gm(n)*fm(b,n)

b:Complex DoubleFloat:=complex(0.2,0.3)
j:SingleInteger:=15
m:Matrix DoubleFloat :=ma(b,j)
print(m)()




 
