Commit graph

17 commits

Author SHA1 Message Date
Simon Brooke 7f93b04b72 Various refactorings around bignum arithmetic 2019-01-17 17:04:14 +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 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 e7dffcad2c Not really making progress. 2018-12-30 19:07:07 +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 40e1f3ca64 Whitespace only changes 2018-12-29 07:40:01 +00:00
Simon Brooke e52ccce0eb Much progress! Half the unit tests pass. 2018-12-28 15:50:37 +00:00
Simon Brooke 75abfb4050 Much better debugging, but it still doesn't work 2018-12-27 21:37:38 +00:00
Simon Brooke 3d5c27cb10 Horribly broken, may have to rethink. 2018-12-26 21:10:24 +00:00
Simon Brooke 9937f344dc Major refactoring. Major problems!
On the right path but it doesn't work yet.
2018-12-26 20:30:14 +00:00
Simon Brooke ae8ba67ed7 Better exceptions, investigation on failure to read/print wide chars. 2018-12-25 15:32:53 +00:00
Simon Brooke 9ff2f14c7d Reverse 2018-12-25 14:44:38 +00:00
Simon Brooke 9e5af35aa0 Read negative numbers 2018-12-25 13:51:15 +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
Renamed from src/read.c (Browse further)