Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
The Intel sign-in experience has changed to support enhanced security controls. If you sign in, click here for more information.

Quad precision for MKL functions

S__MPay
Beginner
566 Views

Is it possible to use quad precision for MKL functions and maintain the accuracy?

0 Kudos
5 Replies
TimP
Black Belt
566 Views

Is your question answered by previous threads about MKL and quad precision or real*16 ?

S__MPay
Beginner
566 Views

Tim P. wrote:

Is your question answered by previous threads about MKL and quad precision or real*16 ?

According to a similar threat:

Tim P. wrote:

You would have to compile the public source code (netlib.org) to make the quad precision versions of the functions you want. You would be giving up on the "performance" aspect of MKL, as there is no support for vectorization in quad precision.

But my confusion is for some inaccuracies that are causing trouble are gone when I use quad precision even though all I did was to simply call  double precision version of MKL.

Gennady_F_Intel
Moderator
566 Views

MKL doesn't support quad precision. MKL's API supports single & double precision only. 

TimP
Black Belt
566 Views

It's certainly possible to use higher precision in your source code while calling the MKL in standard double precision.  It's not normally necessary.  If you care to isolate where you may be losing accuracy, and that doesn't make the problem evident, you might show it on the relevant forum.

S__MPay
Beginner
566 Views

When I try to calculate the determinant of a matrix there is error in double precision while the error of quad precision is exactly zero:

    print *, 'zero determinant double precision' , dprMklDet(reshape((/ 6.d0, 3.d0, 5.d0, 4.d0, 4.d0, 7.d0, 12.d0, 6.d0, 10.d0 /),(/3, 3/)))
    print *, 'zero determinant  quad  precision ' , qprMklDet(reshape((/ 6.q0, 3.q0, 5.q0, 4.q0, 4.q0, 7.q0, 12.q0, 6.q0, 10.q0 /),(/3, 3/)))

Output is:

 zero determinant double precision  1.065814103640150E-014
 zero determinant  quad  precision  0.000000000000000000000000000000000E+0000

I will post more detail in this topic https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/733238

Reply