Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tuwien-cms/xprec
Full quadruple precision (double-double) data type for numpy
https://github.com/tuwien-cms/xprec
extended-precision numpy
Last synced: 7 days ago
JSON representation
Full quadruple precision (double-double) data type for numpy
- Host: GitHub
- URL: https://github.com/tuwien-cms/xprec
- Owner: tuwien-cms
- License: mit
- Created: 2021-08-23T14:53:50.000Z (about 3 years ago)
- Default Branch: mainline
- Last Pushed: 2024-06-24T14:39:39.000Z (5 months ago)
- Last Synced: 2024-10-31T19:37:04.901Z (14 days ago)
- Topics: extended-precision, numpy
- Language: C
- Homepage:
- Size: 270 KB
- Stars: 12
- Watchers: 5
- Forks: 4
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
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)Trouble shooting
---* icc
You may suffer from a long runtime when xprec is built with icc. If you encounter this problem, please try the following:```
CFLAGS="-fp-model=precise" pip install xprec
```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).