Add math/py-reals: Lightweight python3 library for arithmetic with real numbers

This commit is contained in:
Li-Wen Hsu 2022-10-17 11:51:16 +08:00
parent d26e350ec3
commit 3b00134bc2
No known key found for this signature in database
GPG Key ID: 82B261B14D3BC7AF
4 changed files with 38 additions and 0 deletions

View File

@ -968,6 +968,7 @@
SUBDIR += py-qdldl
SUBDIR += py-quadprog
SUBDIR += py-random2
SUBDIR += py-reals
SUBDIR += py-rectangle-packer
SUBDIR += py-roman
SUBDIR += py-rpy2

19
math/py-reals/Makefile Normal file
View File

@ -0,0 +1,19 @@
PORTNAME= reals
PORTVERSION= 0.0.4
CATEGORIES= math python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= lwhsu@FreeBSD.org
COMMENT= Lightweight python3 library for arithmetic with real numbers
WWW= https://github.com/rubenvannieuwpoort/reals
LICENSE= MIT
LICENSE_FILE= ${WRKSRC}/LICENSE
USES= python:3.10+
USE_PYTHON= autoplist distutils
NO_ARCH= yes
.include <bsd.port.mk>

3
math/py-reals/distinfo Normal file
View File

@ -0,0 +1,3 @@
TIMESTAMP = 1665974950
SHA256 (reals-0.0.4.tar.gz) = ce6f23006e2d47685273d5f33ac829037d6912339f1b2f704f1524e926f826dc
SIZE (reals-0.0.4.tar.gz) = 15407

15
math/py-reals/pkg-descr Normal file
View File

@ -0,0 +1,15 @@
Reals is a lightweight Python library for arbitrary precision arithmetic. It
allows you to compute approximations to an arbitrary degree of precision, and,
contrary to most other libraries, guarantees that all digits it displays are
correct. It works by using interval arithmetic and continued fractions. The
bulk of this code is based on Bill Gosper's notes on continued fractions in
which he presents algorithms for doing arithmetic on continued fractions.
The reals library is characterized by:
* Correctness; the reals library uses interval arithmetic to ensure that all
the digits are correct.
* Calculations are done in a streaming way; the result of previous
calculations can be re-used.
* Uses no external libraries.
* Focus on usability.