# How to Use Quad Precision Version of DSYEVD Routine in Julia Linear Algebra LAPACK Library?

**URL:** https://discourse.julialang.org/t/how-to-use-quad-precision-version-of-dsyevd-routine-in-julia-linear-algebra-lapack-library/114992
**Category:** New to Julia
**Created:** [May 31, 2024, 3:46am UTC](https://discourse.julialang.org/t/how-to-use-quad-precision-version-of-dsyevd-routine-in-julia-linear-algebra-lapack-library/114992 "2024-05-31T03:46:54Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Akhil\_Akkapelli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/akhil_akkapelli/32/202792_2.png) [@Akhil\_Akkapelli](https://discourse.julialang.org/u/Akhil_Akkapelli)
#### Post date: [May 31, 2024, 3:46am UTC](https://discourse.julialang.org/t/how-to-use-quad-precision-version-of-dsyevd-routine-in-julia-linear-algebra-lapack-library/114992/1 "2024-05-31T03:46:54Z")

</div>

I am currently working on a project that involves high-precision computations on real symmetric matrices. Specifically, I need to compute all eigenvalues and, optionally, eigenvectors of these matrices using a quad precision routine.

`LAPACK` library provides the `DSYEVD` routine, which computes all eigenvalues and, optionally, eigenvectors of a real symmetric matrix `A`. However, my computations require quad precision. I have explored the documentation but have not found a direct reference to a quad precision equivalent of `DSYEVD`.

1. Is there a quad precision version of the `DSYEVD` routine available in the Julia `LinearAlgebra.LAPACK` library?
2. If it is not directly available, what would be the recommended approach to achieve quad precision eigenvalue computations in Julia?
3. Are there any external packages or libraries compatible with Julia that provide such functionality?

---

<div class="post-metadata">

### Author: ![Ralph\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ralph_smith/32/10344_2.png) [@Ralph\_Smith](https://discourse.julialang.org/u/Ralph_Smith)
#### Post date: [May 31, 2024, 4:19am UTC](https://discourse.julialang.org/t/how-to-use-quad-precision-version-of-dsyevd-routine-in-julia-linear-algebra-lapack-library/114992/2 "2024-05-31T04:19:41Z")

</div>

The GenericLinearAlgebra.jl and GenericSchur.jl packages provide eigensystem methods which will work with `Float128` from Quadmath.jl (or `BigFloat` for even finer precision). They implement straight-forward QR approaches rather than the divide-and-conquer (DC) scheme in DSYEVD, but the advantages of DC are questionable for non-BLAS types.

---

<div class="post-metadata">

### Author: ![Akhil\_Akkapelli](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/akhil_akkapelli/32/202792_2.png) [@Akhil\_Akkapelli](https://discourse.julialang.org/u/Akhil_Akkapelli)
#### Post date: [June 2, 2024, 12:46pm UTC](https://discourse.julialang.org/t/how-to-use-quad-precision-version-of-dsyevd-routine-in-julia-linear-algebra-lapack-library/114992/3 "2024-06-02T12:46:09Z")

</div>

I attempted to use the `GenericLinearAlgebra.LAPACK2.syevd!` routine, but it does not accept `Matrix{Float128}` or `Symmetric{Float128, Matrix{Float128}}` as input.

Here’s a minimal example of what I tried:

```julia
using Random, Quadmath, LinearAlgebra, GenericLinearAlgebra
Random.seed!(123)
A = randn(Float128, 4, 4)
A = Symmetric(A)
GenericLinearAlgebra.LAPACK2.syevd!('N', 'U', A)

```

This results is an error indicating that `syevd!` does not support Symmetric `Matrix{Float128}` types.

What I need is a routine that can handle matrices of type `Symmetric{Float128, Matrix{Float128}}` and compute their eigenvalues with 128-bit or more precision.

---

<div class="post-metadata">

### Author: ![Ralph\_Smith](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ralph_smith/32/10344_2.png) [@Ralph\_Smith](https://discourse.julialang.org/u/Ralph_Smith)
#### Post date: [June 2, 2024, 6:46pm UTC](https://discourse.julialang.org/t/how-to-use-quad-precision-version-of-dsyevd-routine-in-julia-linear-algebra-lapack-library/114992/4 "2024-06-02T18:46:11Z")

</div>

`GenericLinearAlgebra` provides `eigen, eigvals` etc. for `Hermitian`, but not `Symmetric`. `GenericSchur` provides them for both.
