commit | e26c6f9d0a567877130fab9b59ae100a5e816ce4 | [log] [tgz] |
---|---|---|
author | Gavin Howard <yzena.tech@gmail.com> | Mon Feb 18 12:50:23 2019 -0700 |
committer | Gavin Howard <yzena.tech@gmail.com> | Mon Feb 18 12:50:23 2019 -0700 |
tree | 14ee9fffe97dd10cecda1a784f76344c55e52e1c | |
parent | dd52227852fe5a5bbc3974f42abc3c02732c63ab [diff] |
Add a readlink function in the install script
bc
This is an implementation of the POSIX bc
calculator that implements GNU bc
extensions, as well as the period (.
) extension for the BSD flavor of bc
.
For more information, see this bc
's full manual.
This bc
also includes an implementation of dc
in the same binary, accessible via a symbolic link, which implements all FreeBSD and GNU extensions. If a single dc
binary is desired, bc
can be copied and renamed to dc
. The !
command is omitted; I believe this poses security concerns and that such functionality is unnecessary.
For more information, see the dc
's full manual.
This bc
is Free and Open Source Software (FOSS). It is offered under the BSD 2-clause License. Full license text may be found in the LICENSE.md
file.
This bc
only requires a C99-compatible compiler and a (mostly) POSIX 2008-compatible system with the XSI (X/Open System Interfaces) option group. Be aware that this bc
requires some items in C99 that are considered optional, such as uintptr_t
.
Since POSIX 2008 with XSI requires the existence of a C99 compiler as c99
, any POSIX and XSI-compatible system will have everything needed.
Systems that are known to work:
Please submit bug reports if this bc
does not build out of the box on other systems.
This bc
should build unmodified on any POSIX-compliant system.
For more complex build requirements than the ones below, see the build manual.
It is possible to download pre-compiled binaries for a wide list of platforms, including Linux- and Windows-based systems, from xstatic. This link always points to the latest release of bc
.
For the default build with optimization, use the following commands in the root directory:
./configure.sh -O3 make
For debug builds, use the following commands in the root directory:
./configure.sh -g make
To install, use the following command:
make install
By default, bc
and dc
will be installed in /usr/local
. For installing in other locations, see the build manual.
This bc
is robust.
It is well-tested, fuzzed, and fully standards-compliant (though not certified) with POSIX bc
. The math has been tested with 40+ million random problems, so it is as correct as I can make it.
This bc
can be used as a drop-in replacement for any existing bc
. This bc
is also compatible with MinGW toolchains, though history is not supported on Windows.
This bc
has similar performance to GNU bc
. It is slightly slower on certain operations and slightly faster on others. Full benchmark data are not yet available.
To see what algorithms this bc
uses, see the algorithms manual.
Other projects based on this bc are:
busybox bc
. The busybox maintainers have made their own changes, so any bugs in the busybox bc
should be reported to them.
toybox bc
. The maintainer has also made his own changes, so bugs in the toybox bc
should be reported there.
This bc
is written in pure ISO C99, using POSIX 2008 APIs.
This bc
uses the commit message guidelines laid out in this blog post.
This bc
uses semantic versioning.
Items labeled with (maintainer use only)
are not included in release source tarballs.
Files:
configure.sh The configure script. install.sh Install script. karatsuba.py Script for package maintainers to find the optimal Karatsuba number. LICENSE.md A Markdown form of the BSD 2-clause License. link.sh A script to link dc to bc. Makefile.in The Makefile template. NOTICE.md List of contributors and copyright owners. RELEASE.md A checklist for making a release (maintainer use only). release.sh A script to run during the release process (maintainer use only). safe-install.sh Safe install script from musl libc.
Folders:
gen The bc math library, help texts, and code to generate C source. include All header files. manuals Manuals for both programs. src All source code. tests All tests.