# Algorithm in vdCdfNormInv()

## Algorithm in vdCdfNormInv()

Hi,

I wonder what actual algorithm is inside VML function vdCdfNormInv().

Could you give some information about it?

I'm trying to compare it to other known algorithms for computing the inverse of the normal cumulative distribution.

Thanks!

7 posts / 0 nouveau(x)
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.

For example, I'm comparing it to Acklam's algorithm (http://home.online.no/~pjacklam/notes/invnorm/) and it seems vdCdfNormInv is slower, even though I'm not vectorizing my implementation of Acklam.

In addition to comparing for speed, you should also consider the accuracy of the result. Aclam's algorithm may be sufficient for many applications, but the claimed accuracy is 5-6 digits short of the full 52-bit floating point precision that one could expect from 64-bit IEEE floating point arithmetic.

Hello, the algorithm is proprietary of intel and implementation details are not disclosed. But we publish performance and accuracy data for each of VML functions in respective documents: http://software.intel.com/en-us/intel-mkl

I think these information about performance and accurace data for all VML routines and for all supported accurace mode
would be usefull to look at.
http://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/...

Sure, I'm considering accuracy of result.

Acklam is good enough for my needs, I was hoping that MKL would have an efficient (vectorized, threaded) implementation with similar accuracy.

Hello Darietti,

Intel(R) MKL CdfNormInv function, among other vector math functions, supports three accuracy modes, High Accuracy (default), Low Accuracy, and Enhanced Performance. Please, have a look at the additional details and definitions of the modes in "Data Types, Accuracy Modes, and Performance Tips" section of "Vector Mathematical Functions" Chapter in Intel(R) MKL Manual. Typically, you would see better performance in the modes with reduced accuracy like Enhanced performance. Please, review the CdfNormInv performance data and graphs including effect of threading on several CPUs  at http://software.intel.com/sites/products/documentation/doclib/mkl_sa/11/vml/functions/cdfnorminv.html.

When/if you compare Intel(R) MKL implementations of vector math functions against other algorithms, please choose accuracy mode in MKL math functions which corresponds to accuracy of those algorithms. It can be done by service function or by call to version of the math function that accepts accuracy mode as parameter. Also, make sure that you compare performance om vector lengths at least few hundreeds (Intel(R) MKL Manual does not suggest to use MKL vector math functions if size of vector is less than 40).

Please, feel free to share with us results of your comparative analysis or/and let us know if you have more questions on vector math functions available in Intel(R) MKL.

Thanks,

Andrey