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 the BSD license.
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.2.3.tar.gz
.
File metadata
- Download URL: xprec-1.2.3.tar.gz
- Upload date:
- Size: 26.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0946fb838c6a01949f4f2d95342722e0735cde06b7dddf262f9f0cc7e19a2dc |
|
MD5 | d95787947a8a0a56bf43ac370f7453de |
|
BLAKE2b-256 | fb65e352cdf188006e840e7612a2205889b85662fdd18796e5eb621df7f1a0e1 |