Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.

VML Sinh incorrect results

woodbird
Beginner
464 Views

#include <iostream>
#include <mkl.h>

int main()
{
    double a[3];
    double y[3];

    a[0] = 669.77512986632064;
    a[1] = a[0] - 1;
    a[2] = a[0] + 1;

    vdSinh(3, a, y);

    std::cout << y[0] << std::endl;
    std::cout << y[1] << std::endl;
    std::cout << y[2] << std::endl;

    return 0;
}

Please see the attached code. a[0] has a relatively larger value, a[1] and a[2] differs from a[0] by 1, When passing these values into vdSinh, I got correct values for y[1] and y[2], and yet got NaN for y[0].

First of all, the input value is not too large, in fact a[2] is bigger than a[0]. And secondly, in the worst case a finite input should produce Inf when it is too big instead of NaN.

The platform tested is OS X 11, GCC 6.2, Intel ICPC 17, Apple Clang 7.3, are all used to test the above example. MKL version is 2017. 

0 Kudos
6 Replies
woodbird
Beginner
464 Views

(I can't edit the post, it says access denied)

A few additional information, the CPU is Intel(R) Core(TM) i7-4960HQ CPU @ 2.60GHz

To reproduce the error, 

icpc -o test test.cpp -lmkl_rt; ./test

0 Kudos
mecej4
Honored Contributor III
464 Views

Additional quirks:

      Windows 10-64bit, Intel C 17.0 for 64-bit:

             -1.#QNAN for first value

     Windows 10-64bit, Intel C 17.0 for 32-bit

             Compiled with /Qmkl: Pop-up saying

                  The procedure entry point mkl_serv_is_sse4_2_enabled could not be

                   located in the dynamic link library xsinh.exe.

              Compiled and linked with with mkl_rt.lib: 3.78977e+290 for first value.

0 Kudos
woodbird
Beginner
464 Views

It seems a range of values around 669 is problematic, for example, 669.77538698120043, and a few others that I tried. I cannot determine the exact range yet.

0 Kudos
Nikita_A_Intel
Employee
464 Views

Thank you very much for your report. I confirm the correctness issue with the library. It will be fixed in a future release. We will let you know as soon as we can.

0 Kudos
Gennady_F_Intel
Moderator
464 Views

here is the number of internal issue (DPD200587997) for your the reference only.  

0 Kudos
Gennady_F_Intel
Moderator
464 Views

mecej, wrt to message you see (" The procedure entry point mkl_serv_is_sse4_2_enabled could not be   located in the dynamic link library xsinh.exe. ") on your side.

I don't have access to win10 right now, but checking the problem on win8.1 64 bit OS, I don't see the problem when use 32bit compiler v.2017. Please see below the logs:

1)..forums\u685048>icl /Qmkl test.cpp
Intel(R) C++ Intel(R) 64 Compiler for applications running on IA-32, Version 17.0 Build 20160721
Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.

2) ...forums\u685048>icl /Qmkl test.cpp

Intel(R) C++ Intel(R) 64 Compiler for applications running on IA-32, Version 17.0 Build 20160721
Copyright (C) 1985-2016 Intel Corporation.  All rights reserved.

test.cpp
Microsoft (R) Incremental Linker Version 12.00.30723.0
Copyright (C) Microsoft Corporation.  All rights reserved.

-out:test.exe
-libpath:C:\APPS\Intel_2017\compilers_and_libraries_2017\windows\mkl\lib\ia32_win
test.obj

3) forums\u685048>test.exe
-1.#QNAN
1.39418e+290
1.03017e+291

Could you add into your code  mkl_get_version(&Version); and give us output?

 

0 Kudos
Reply