On Sun, Jul 31, 2022 at 06:53:47PM +0100, Aaron Sloman wrote: > Thanks Waldek > > > I played a bit with FriCAS on Poplog. That discoverd a few > > bugs in bignum arithmetic (which I introduced when changing > > representation of bignums in 2019). Fixes for the bugs > > are now commited to my Github repo. > > I regret I may not be able to test this in the near future. I haven't updated > the poplog systems I use for some time > > - on two machines in the CS department, running > > CentOS Linux release 7.9.2009 (Core) > > - on three machines at home, my main linux PC running Fedora 33, an older one > used for backup, still using Fedora 29, and my laptop (somewhere in-between), > now hardly ever needed because I work at home using zoom for communication. > > My old instructions for updating poplog are now out of date, and I've lost > track > of the best option for updating poplog on fedora at present, then linking in > all > the old poplog teaching materials and libraries. > > If there's a simple way to install your update on my main f33 PC at home > I'll try, then run any tests you give me for checking your fixes!
I have now created a new tarball and changed 'get_and_build_poplog.sh' to point to it. So now it reasonable simple: change to directory where you want to have Poplog wget https://www.math.uni.wroc.pl/~hebisch/poplog/get_and_build_poplog.sh sh get_and_build_poplog.sh that will fetch tarball (that is poplog-v16.02.tar.bz2), unpack it which creates subdirectory v16.02 and build Poplog in v16.02. It will not touch anything outside current directory and in current directory only thing affected are named files (so if you happen to have v16.01 it will be unaffected). To run use: v16.02/poplog pop11 etc. The v16.02/poplog scripts sets up paths based on poplogroot. You can move the script to different place and it will work. If you want to move the whole installation you need to change value in v16.02/poplog to match. Note: v16.02/com contains old scripts, most probably work but some almost surely are broken. In particular I do not use traditional Poplog way of setting environment variables at login and old scripts doing this are probably broken by changes. > I've never heard of or used FriCAS. Will I need to install it to check your > fixes on my machine? I have found instructions here: > > https://fricas.github.io/install.html > > I am not keen on trying to install and run a standard Common Lisp! I mentioned FriCAS because it deliverd about 0.5 h CPU time of testing. And I run FriCAS on top of Poplog Common Lisp (which is a bit tricky). Anyway, 3 failures can be reproduced in Pop11, below are correct results: : 2357947691 rem 100000000000000006579 => ** 2357947691 : vars a = -1169201309864722334558986458047313198845068836864, : b = 531266229322835086541; : gcd_n(a, b, 2), a // b => ** 1 -446001278937690371636 -2200782292062898266479046908 : -1490116119384765625 << 2 => ** -5960464477539062500 In 16.00 and 16.01 the first example AFAICS returned work bigint which gave rather bizzare effects. In the second example division returned semi-random results depending on what was in memory (gcd above is to make sure that memory is nonzero). Third example failed to propagate sign bits giving incorrect positive result. I am not sure if fourth problem can be reproduced in small expample, but bottom line is that 16.00 and 16.01 would fail if multipliction of bigints returned negative (non-bigint) integer. In normal use it should not happen, but it happended during tests. I did not investigate what exactly caused such result (it may be related to first example), but simply modified mutliplication to work even for such result. -- Waldek Hebisch