We ran across these errors while doing "make check" on the hebimath bignum library on an alpine linux system running against toybox's `bc'. Hebimath uses POSIX bc as part of its test suite, Perhaps it could be used to drive the core arithmetic of your POSIX bc implementation as it is MIT licensed and is fast and accurate.
https://github.com/suiginsoft/hebimath Sasha Toltec Toltec Enterprises [email protected] On 8/27/18, Sasha Toltec <[email protected]> wrote: > Upon inspection of the mathematics core of the toybox bc it appears to > have multiple systemic issues and is potentially unsalvagable. > > All transcendental functions produce out of bounds memory accesses. > > All builtin functions produce gratuitous and insecure memory errors. > > Excessive or incorrect memory consumption for invocations of > transcendental functions result in total memory exhaustion consuming > about 1 GB for every few seconds of run time. > > The algorithms used are of the most naive possible variety and balk > under even the smallest inputs taking hundreds of times longer than > similar implementations. > > All builtin transcendental and irrational functions produce incorrect > results. > > Functions that should be complete in a fraction of a second are > getting bogged down in naive algorithmic complexity. > > I had read that a team of mathematicians and systems programmers were > working on the > new toybox bc implementation. What exactly happened here? > > > Sasha Toltec > Toltec Enterprises > [email protected] > _______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
