For the developer, our type system introduces few changes in the programming style,
limited to giving the accuracy of the inputs of the accuracy of comparisons to allow the
typing of certain recursive functions.
A first perspective to the present work is the implementation of a compiler for
Numl. We aim at using the type information to select the most appropriate formats
(the IEEE754 formats of Figure 1, multiple precisions numbers of the GMP library
when needed or requested by the user or fixed-point numbers.) In the longer term, we
also aim at introducing safe compile-time optimizations based on type preservation:
an expression may be safely (from the accuracy point of view) substituted to another
expression as long as both expressions are mathematically equivalent and that the new
expression has a greater type than the older one in the sense of Equation (6). Finally,
a second perspective is to integrate our type system into other applicative languages.
In particular, it would be of great interest to have such a type system inside a language
used to build critical embedded systems such as the synchronous language Lustre
[4]. In this context numerical accuracy requirements are strong and difficult to obtain.
Our type system could be integrated naturally inside Lustre or similar languages.
References
1. ANSI/IEEE: IEEE Standard for Binary Floating-point Arithmetic (2008)
2. Atkinson, K.: An Introduction to Numerical Analysis, 2nd Edition. Wiley (1989)
3. Boldo, S., Jourdan, J., Leroy, X., Melquiond, G.: Verified compilation of floating-point com-
putations. J. Autom. Reasoning 54(2), 135–163 (2015)
4. Caspi, P., Pilaud, D., Halbwachs, N., Plaice, J.: Lustre: A declarative language for program-
ming synchronous systems. In: POPL. pp. 178–188. ACM Press (1987)
5. Chiang, W., Baranowski, M., Briggs, I., Solovyev, A., Gopalakrishnan, G., Rakamaric, Z.:
Rigorous floating-point mixed-precision tuning. In: POPL. pp. 300–315. ACM (2017)
6. Damouche, N., Martel, M., Chapoutot, A.: Impact of accuracy optimization on the conver-
gence of numerical iterative methods. In: LOPSTR’15. LNCS, vol. LNCS 9527, pp. 1–18.
Springer (2015)
7. Damouche, N., Martel, M., Chapoutot, A.: Improving the numerical accuracy of programs
by automatic transformation. STTT 19(4), 427–448 (2017)
8. Darulova, E., Kuncak, V.: Sound compilation of reals. In: POPL’14. pp. 235–248. ACM
(2014)
9. Denis, C., de Oliveira Castro, P., Petit, E.: Verificarlo: Checking floating point accuracy
through monte carlo arithmetic. In: ARITH’16. pp. 55–62. IEEE (2016)
10. Franco, A.D., Guo, H., Rubio-Gonz
´
alez, C.: A comprehensive study of real-world numerical
bug characteristics. In: ASE. pp. 509–519. IEEE (2017)
11. Goubault, E.: Static analysis by abstract interpretation of numerical programs and systems,
and FLUCTUAT. In: SAS. LNCS, vol. 7935, pp. 1–3. Springer (2013)
12. Graphics, M.: Algorithmic C Datatypes, software version 2.6 edn. (2011), http://www.
mentor.com/esl/catapult/algorithmic
13. Harrison, J.: Floating-point verification. J. UCS 13(5), 629–638 (2007)
14. Lam, M.O., Hollingsworth, J.K., de Supinski, B.R., LeGendre, M.P.: Automatically adapting
programs for mixed-precision floating-point computation. In: Supercomputing, ICS’13. pp.
369–378. ACM (2013)
15. Lee, W., Sharma, R., Aiken, A.: On automatically proving the correctness of math.h imple-
mentations. PACMPL 2(POPL), 47:1–47:32 (2018)
199
Numl - A Strongly Typed Language for Numerical Accuracy
199