Simon Brooke
46a4132823
Made it easier to run individual unit tests
2019-01-18 20:55:03 +00:00
Simon Brooke
7f93b04b72
Various refactorings around bignum arithmetic
2019-01-17 17:04:14 +00:00
Simon Brooke
d624c671cd
Major refactoring, all tests still pass
...
Bignum issues not yet folly resolved.
2019-01-05 11:42:17 +00:00
Simon Brooke
67443e1d46
OK, adding bignums works; multiplying bignums does not work.
...
There's no evidence of a bug in reading/printing, because the only way I can currently get a number big enough to trigger the supposed bug is by multiplying, which doesn't work.
2019-01-04 11:04:55 +00:00
Simon Brooke
67802a07b8
Now successfully reading/printing 2 cell bignums
...
Something is wrong with n-cell bignums, but let's make haste slowly.
2019-01-04 10:40:15 +00:00
Simon Brooke
d9d789fdd0
Now creating the correct internal bignum representation
...
add_integers returns an integer which by inspection of the internal representation is correct, but the print representation is not correct.
2019-01-03 11:21:08 +00:00
Simon Brooke
4295b6e57f
This isn't working, but it's VERY promising.
2019-01-01 15:04:44 +00:00
Simon Brooke
6d2cf313cb
Very small fix to formatting integers.
2018-12-31 16:24:38 +00:00
Simon Brooke
e5f40032e9
Now safely detecting (but not dealing with) integer overflow.
...
Also printing and reading integers with comma separators.
2018-12-31 16:15:14 +00:00
Simon Brooke
02fe5669d8
Complete reworking of the REPL
...
which is good in itself, but not what I was meant to be working on.
2018-12-30 17:56:15 +00:00
Simon Brooke
47f4b4c7f7
Bug was in integer_to_string; all tests now pass.
2018-12-30 12:07:38 +00:00
Simon Brooke
61573d85d9
/all-integers-are-bignums: broken, but I don't know why.
2018-12-30 11:10:14 +00:00
Simon Brooke
489f008044
Printing of bignums basically done, not tested.
2018-12-29 23:44:28 +00:00
Simon Brooke
342f0308d3
The beginning of bignums is in place, tests still pass.
2018-12-29 22:30:07 +00:00
Simon Brooke
75abfb4050
Much better debugging, but it still doesn't work
2018-12-27 21:37:38 +00:00
Simon Brooke
6ee9f9b59a
Begun work on bignums; changed integer size to 64 bits
...
I'm fairly sure the size of a long int on my machines is 64 bit anyway, but for portability it needs to be explicit.
2018-12-25 13:18:37 +00:00
Simon Brooke
ad9b1cd7f8
Ratio arithmetic separated out into its own files.
2018-12-24 21:06:58 +00:00
Simon Brooke
a5e1d3ccd8
Reorganised source files to make navigation easier
...
All tests still pass (slightly to my surprise)
2018-12-24 19:27:04 +00:00