xprec precision numpy extension
Project description
Library for double-double arithmetic calculation
Extension module for numpy providing the ddouble
data type.
Loading this module registers an additional scalar data type ddouble
with
numpy implementing double-double arithmetic. You can use use the data type
by passing dtype=xprec.ddouble
to numpy functions.
The xprec.linalg
module provides some linear algebra subroutines, in
particular QR, RRQR, SVD and truncated SVD.
Installation
$ pip install xprec
Quickstart
import numpy as np
x = np.linspace(0, np.pi)
# import double-double precision data type
from xprec import ddouble
x = x.astype(ddouble)
y = x * x + 1
z = np.sin(x)
# do some linalg
import xprec.linalg
A = np.vander(np.linspace(-1, 1, 80, dtype=ddouble), 150)
U, s, VT = xprec.linalg.svd(A)
Licence
The xprec library is Copyright (C) 2021 Markus Wallerberger. Licensed under the MIT license (see LICENSE.txt).
Contains code from the QD library, which is Copyright (C) 2012 Yozo Hida, Xiaoye S. Li, David H. Bailey. Released under a modified BSD license (see QD-LICENSE.txt).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file xprec-1.3.4.tar.gz
.
File metadata
- Download URL: xprec-1.3.4.tar.gz
- Upload date:
- Size: 34.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13f646bbbfaf5b935bf72490851577811c65ee075da831ddc6c8c04271698245 |
|
MD5 | 205deeb5d454388126808d6c479c64f7 |
|
BLAKE2b-256 | 081ac43f13a2a99892cb6ee8b0ce3d874c019996637c04176fb181ebc3f05408 |