Date: Mon, 7 Jan 2019 21:57:43 -0800 From: Devin Teske <dteske@FreeBSD.org> To: Gavin Howard <gavin.d.howard@gmail.com> Cc: Devin Teske <dteske@FreeBSD.org>, cem@freebsd.org, "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org> Subject: Re: GNU-compatible, BSD-licensed bc Message-ID: <61F802DC-2E59-4E0A-955D-899EBD7874A1@FreeBSD.org> In-Reply-To: <CAF=dzRNYxYf7P8q7mZo=Tc6a%2BfTYsARGpG0=ZTvBP1ESLPBLOg@mail.gmail.com> References: <CAF=dzRNnurahLBOaKgq8_bDXNuM8biYPFbj6F2vp0t58Ejp8bg@mail.gmail.com> <8FFA4578-0BAE-4F9F-8A06-AE83283BDEA4@FreeBSD.org> <CAG6CVpXam0bJD9B7n0xDQiRF=ZTeH0hN7wd8f8fDGyMSsCwh0w@mail.gmail.com> <CAF=dzRNYxYf7P8q7mZo=Tc6a%2BfTYsARGpG0=ZTvBP1ESLPBLOg@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Jan 7, 2019, at 4:42 PM, Gavin Howard <gavin.d.howard@gmail.com> wrote: > > On Mon, Jan 7, 2019 at 5:38 PM Conrad Meyer <cem@freebsd.org> wrote: >> >> On Mon, Jan 7, 2019 at 4:00 PM Devin Teske <dteske@freebsd.org> wrote: >>> How do you handle arbitrary arithmetic precision? >> >> Looks like https://github.com/gavinhoward/bc/blob/master/src/num.c . > > That is correct. Because this bc is meant to help bootstrap the Linux > kernel and have no dependencies other than POSIX 2008, I wrote my own. Impressive. It might be worth turning this into a library itself. > Also, the POSIX bc standard mandates doing math in decimal. OpenSSL > would not be smart if they did that. Not sure I understand what you mean here. > There are also a few > peculiarities with the POSIX bc standard that (more or less) require a > standalone implementation. > How hard would it be to convert a bn(3)-based library to use your code? Would there be any performance impact -- I've benchmarked bn(3) to be pretty fast. > Also, right now I am working on getting a release candidate out that > will enable me to make a quick port that Stefan could use as a jumping > off point. My build system changed between 1.0 and now, and I would > like to be able to test it. > Cool. Looking forward to it. -- Cheers, Devin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?61F802DC-2E59-4E0A-955D-899EBD7874A1>