TOWARDS GOOD C++ INTERVAL LIBRARIES: TRICKS AND TRAITS
暂无分享,去创建一个
Despite its usefulness for overcoming floating-point arithmetic defects, manipulating imprecise data, and performing non-linear global optimization, interval arithmetic is not yet a first-class type in any computer language. Some attempts are underway for Fortran and Java, not for C++. However, some add-on C++ interval libraries already exist though they do not respect the C++ standard library spirit since they are not generic (one cannot choose the type for the interval bounds). The design and implementation of JAIL, a C++ templated library based on the “traits” C++ programming technique, are presented in this paper; parameterization is shown to enhance the reliability, the versatily, and the portability of the library across multiple platforms. The impact on efficiency of parameterization through templated classes and of some implementation tricks is also investigated.
[1] Guido D. Salvucci,et al. Ieee standard for binary floating-point arithmetic , 1985 .
[2] David Goldberg. What Every Computer Scientist Should Know About Floating-Point Arithmetic , 1992 .
[3] Svetoslav Markov,et al. On directed interval arithmetic and its applications , 1996 .