RVint Version 3
Based upon feedback, I have made some changes and did a third release of my RVint library of mathematical routines for RISC-V. This library contains 56 integer algorithms and uses less than 3 kilobytes of memory.
https://github.com/benmesander/rvint
This release has three major changes:
Memory usage is optimized on small processors (ie ch32v003 RV32E, etc.)
A buffer overrun when printing 128-bit binary numbers is fixed.
Signed division by 1000 on 64-bit processors had an error that caused very large dividends to result in an incorrect quotient.
Breaking all the routines up into separate files in order to optimize memory use was an interesting task. I had intended to use AI to do this, but I didn’t relish the prospect of cleaning up after it did a 90% correct job and it seemed annoying to do it entirely by hand.
Then I realized that since I have rather militant code formatting habits that I could use an emacs keyboard macro to automate splitting large files with multiple routines into individual files for each routine. It took 3 tries, but I got a nice keyboard macro and ripped through the source code in short order. I probably saved 100 gallons of water by doing it this way.


