Very nice. I'm trying to remember what little I know about block matricies
so I can use the new quoted features.
Whilst exploring, I of course found another crash bug:
egcs-1.1.2,glibc-2.1.1,readline-4.0
CFLAGS=-g -pipe
genius> a=`[[1,2:3,4],[5:6]:[7,8],[9]]
=
`[[1,2:3,4] [5:6]
[7,8] [9]]
genius> a*a
Can't add/subtract two matricies of different sizes
Can't multiply matricies of wrong sizes
Can't multiply matricies of wrong sizes
Primitives must get numeric/matrix/string arguments
Can't multiply matricies of wrong sizes
Can't multiply matricies of wrong sizes
Primitives must get numeric/matrix/string arguments
Can't add/subtract two matricies of different sizes
=
`[([7,10:15,22]+[83]) (([1,2:3,4]*[7,8])+([7,8]*[9]))
(([5:6]*[1,2:3,4])+([9]*[5:6])) ([35,40:42,48]+[81])]
genius> a*a
Segmentation fault (core dumped)
(gdb) where
#0 0x8071586 in matrixw_free (m=0x80bb560) at matrixw.c:451
#1 0x804e079 in freetree_full (n=0x80bb290, freeargs=1) at eval.c:260
#2 0x804e256 in freetree (n=0x80bb290) at eval.c:313
#3 0x8051aa6 in freeargarr (r=0xbffffb5c, n=2) at eval.c:1232
#4 0x8055d0b in matrix_mul_op (n=0x80bb278, arg=0xbffffb5c, f=0x806a094)
at eval.c:2592
#5 0x80580b7 in evaloper (n=0x80bb278, argeval=1, do_ret=1) at
eval.c:3127
#6 0x8059f9f in evalnode_full (n=0x80bb278, do_ret=1) at eval.c:3458
#7 0x804d434 in runexp (exp=0x80bb278) at calc.c:1242
#8 0x804d56c in evalexp_parsed (parsed=0x80bb278, outfile=0x400574e0,
outstring=0x0, prefix=0x80854ad "= ", pretty=1) at calc.c:1284
#9 0x805adf0 in main (argc=1, argv=0xbffffc44) at genius.c:238
Note I was just stubborn and asked it to multiply a and a again.
I'm starting to dig into your code now.
Cheese feature request: set-able output radix. Hex is nice sometimes.
I'm continuing to play with the C++ interface to gmp. Comments welcome,
numerous bug fixes since last time, and some preliminary transcendental
support. http://www.xirr.com/~squeak/gmp.H. Note it is definately just
hacked together right now. I wanted to see the billionth digit of pi and
all, for myself, blah blah.
After I determine all the rules neccessary for making the math behave
under C++, I'll try adding it to a user interface, but I've been seeing
there are important issues of type-promotion etc. to deal with. Hopefully
this will result in a consistent intuitive syntax. (I still am not
completely clear on how unquoted matrices expand....
genius> [[1,2:3,4],5:6,7]
=
[1 2 5
3 4 5
6 6 7]
genius> [[1,2:3,4],5,6,7:8,9,10]
=
[1 2 5 6 7
3 4 5 6 7
8 8 9 10 0]
seems weird...)
Are you interested in bug-reports on libgel? There are so anomolies there
I believe, but I haven't looked close enough to be sure it wasn't an
id-10-t user error.
BTW this is definately a cool little piece of software you've got here
george.
-jack
Received on Wed May 26 1999 - 22:35:56 CDT
This archive was generated by hypermail 2.2.0 : Sun Apr 17 2011 - 21:00:02 CDT