Abstract
Non-uniform random number generators are key components in Monte Carlo simulations. The inverse cumulative distribution function (ICDF) technique provides a viable solution for generating random variables from various distributions. Thus, the ICDF of the standard normal distribution, or probit function for short, is of particular interest. The goal of this article is to revisit and improve a floating-point (FP) implementation of probit, from the perspective of modern hardware resources available on FPGAs. Beside reexamining the classical Wichura’s algorithm, we propose: (1) a single-precision implementation using the embedded FP DSP Blocks available in recent FPGA families; (2) generic custom-precision architectures that scale up to double-precision. These present a user-selectable trade-off between tail accuracy and resource utilization. Our proposed cores outperform existing single-precision FPGA implementations in area, latency and accuracy, and also set benchmarks for new custom and double-precision FP implementations.
Similar content being viewed by others
Notes
These correspond to formats with the same dynamic range as the binary64, but less precision, which can be useful for some applications. The fraction widths are chosen based on existing FP formats in the DSP Builder Advanced Blockset [3, Section 10.2].
Available at http://homepages.laas.fr/mmjoldes/probit
The absolute accuracy test in line 2 can be made relative by dividing with w0, provided that w0≠ 0
The multiplication by 2 in the previous change of variable is simply related to the fact that the probit function is the inverse erf function of argument 2x − 1 (see Eq. 2), so the approximations and segmentations will be directly related to those of the inverse error function which is symmetric around 0.
References
Intel Arria®10. (2018). Device Overview. https://www.intel.com/content/dam/altera-www/global/en_US/pdfs/literature/hb/arria-10/a10_overview.pdf.
IEEE Standard for Floating-Point Arithmetic. IEEE Std, 754-2019(Revision of IEEE 754-2008), 1–84, 2019.
DSP Builder for Intel FPGAs (Advanced Blockset) Handbook (2021). https://www.intel.com/content/dam/www/programmable/us/en/pdfs/literature/hb/dspb/hb_dspb_adv.pdf.
Cheung, R.C.C., Lee, D., Luk, W., & Villasenor, J.D. (2007). Hardware generation of arbitrary random number distributions from uniform distributions via the inversion method. IEEE Transactions on VLSI Systems, 15(8), 952–962.
Chevillard, S., Joldeş, M., & Lauter, C. (2010). Sollya: an environment for the development of numerical codes. In International congress on mathematical software, pp. 28–31. Springer.
Daumas, M., & Melquiond, G. (2010). Certification of bounds on expressions involving rounded operators. ACM Transactions on Mathematical Software (TOMS), 37(1), 1–20.
De Dinechin, F., Joldes, M., & Pasca, B. (2010). Automatic generation of polynomial-based hardware architectures for function evaluation. In IEEE International conference on application-specific systems, architectures and processors, pp. 216–222. IEEE.
De Schryver, C., Schmidt, D., Wehn, N., Korn, E., Marxen, H., & Korn, R. (2010). A new hardware efficient inversion based random number generator for non-uniform distributions. In Intl. Conf. on reconfig. Comp. and FPGAs, pp. 190–195. IEEE.
Echeverria, P., & López-Vallejo, M. (2007). FPGA Gaussian random number generator based on quintic Hermite interpolation inversion. In 2007 50Th midwest symposium on circuits and systems, pp. 871–874. IEEE.
Fousse, L., Hanrot, G., Lefèvre, V., Pélissier, P., & Zimmermann, P. (2007). MPFR: A Multiple-precision binary floating-point library with correct rounding ACM Transactions on Mathematical Software (TOMS) 33(2).
Hörmann, W., & Leydold, J. (2003). Continuous random variate generation by fast numerical inversion. ACM Trans. Model. Comput. Simul., 13(4), 347–362.
Joldes, M., & Pasca, B. (2020). Efficient floating-point implementation of the probit function on FPGAs. In 2020 IEEE 31St international conference on application-specific systems, architectures and processors (ASAP), pp. 173–180.
Lee, D.U., Cheung, R.C., Villasenor, J.D., & Luk, W. (2006). Inversion-based hardware gaussian random number generator: a case study of function evaluation via hierarchical segmentation. In 2006 IEEE International conference on field programmable technology, pp. 33–40. IEEE.
Luu, T. (2016). Fast and accurate parallel computation of quantile functions for random number generation. Ph.D. thesis UCL (University College London).
Malik, J.S., & Hemani, A. (2016). Gaussian random number generation: A survey on hardware architectures. ACM Comput. Surv 49(3).
Muller, J.M., Brunie, N., de Dinechin, F., Jeannerod, C.P., Joldes, M., Lefèvre, V., Melquiond, G., Revol, N., & Torres, S. (2018). Handbook of Floating-Point Arithmetic Birkhäuser.
Revol, N. (2003). Interval Newton iteration in multiple precision for the univariate case. Num. Alg., 34(2-4), 417–426.
Thomas, D.B. (2015). A general-purpose method for faithfully rounded floating-point function approximation in FPGAs. In 2015 IEEE 22Nd symposium on computer arithmetic, pp. 42–49.
Thomas, D.B., Luk, W., Leong, P.H., & Villasenor, J.D. (2007). Gaussian random number generators. ACM Comput. Surv 39(4).
Wichura, M.J. (1988). Algorithm as 241: the percentage points of the normal distribution. Journal of the Royal Statistical Society. Series C (Applied Statistics), 37(3), 477–484.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher’s Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
About this article
Cite this article
Joldes, M., Pasca, B. Efficient Floating-Point Implementation of the Probit Function on FPGAs. J Sign Process Syst 93, 1387–1403 (2021). https://doi.org/10.1007/s11265-021-01692-w
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s11265-021-01692-w