Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jan 2019 17:42:21 -0700
From:      Gavin Howard <gavin.d.howard@gmail.com>
To:        cem@freebsd.org
Cc:        Devin Teske <dteske@freebsd.org>,  "freebsd-arch@freebsd.org" <freebsd-arch@freebsd.org>
Subject:   Re: GNU-compatible, BSD-licensed bc
Message-ID:  <CAF=dzRNYxYf7P8q7mZo=Tc6a%2BfTYsARGpG0=ZTvBP1ESLPBLOg@mail.gmail.com>
In-Reply-To: <CAG6CVpXam0bJD9B7n0xDQiRF=ZTeH0hN7wd8f8fDGyMSsCwh0w@mail.gmail.com>
References:  <CAF=dzRNnurahLBOaKgq8_bDXNuM8biYPFbj6F2vp0t58Ejp8bg@mail.gmail.com> <8FFA4578-0BAE-4F9F-8A06-AE83283BDEA4@FreeBSD.org> <CAG6CVpXam0bJD9B7n0xDQiRF=ZTeH0hN7wd8f8fDGyMSsCwh0w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.
Also, the POSIX bc standard mandates doing math in decimal. OpenSSL
would not be smart if they did that. There are also a few
peculiarities with the POSIX bc standard that (more or less) require a
standalone implementation.

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.

Gavin Howard



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF=dzRNYxYf7P8q7mZo=Tc6a%2BfTYsARGpG0=ZTvBP1ESLPBLOg>