Comments (1)
Minimum example (compile with gcc -Wextra -Wall -std=c99 -pedantic -llapack
):
#include <complex.h>
#include <stdio.h>
typedef int lapack_int;
void clarfgp_(
lapack_int* n, float complex* alpha, float complex* x, lapack_int* incx,
float complex* tau
);
int main()
{
lapack_int n = 1;
float complex x[1] = { 2.073921727e-43f + 3.082856622e-44f * I };
lapack_int incx = 1;
float complex tau = -1.0f;
clarfgp_(&n, x, x + 1, &incx, &tau);
float complex tau_expected = 1.086842348e-02 - 1.470330722e-01 * I;
printf("computed tau: %.6e%+.6ej\n", crealf(tau), cimagf(tau));
printf(
"expected tau: %.6e%+.6ej\n", crealf(tau_expected), cimagf(tau_expected)
);
}
Output on my machine:
$ ./a.out
computed tau: 1.333332e-02-1.466667e-01j
expected tau: 1.086842e-02-1.470331e-01j
The expected value was computed with the help of Python NumPy by the expression
xnorm = np.abs(alpha)
(1 - alpha.real / xnorm) - (alpha.imag / xnorm) * 1j
in double-precision arithmetic.
from lapack.
Related Issues (20)
- xBBCSD: read of unitialised value
- cmake: enable Fortran HOT 1
- [Request for comments] Properly solving the *TRTRS singularity detection problem HOT 2
- Inkscape and OpenShot throw error "undefined symbol: ssyrk_64_" from libcblas HOT 4
- Installing Lapack in Red Hat linux
- Did 3.12.0 get re-tagged? HOT 6
- Failing tests for truncated QR routine in coverage build HOT 10
- Make all release tags annotated tags HOT 2
- Caller graph in html documentation is missing for some BLAS routines
- Issues, related to new feature DMD HOT 1
- Add zrot to LAPACKE HOT 1
- [v3.12.0] sblat1.f (SNRM2) test fail on i386 architectures HOT 5
- DBBCSD may compute insufficiently accurate singular vectors HOT 2
- Packages and build systems confusion: Separate or combined libraries?
- fails of tests for QR and LQ decompositions HOT 1
- LAPACK requires CMake 3.11 or newer HOT 1
- Documentation Error in {d/s}sytrf.f
- How to stand-alone build man pages? HOT 2
- LAPACKE in Doxygen documentation
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lapack.