picotm
0.6.0

Covers the C Math Library module. This module provides transactional C math functions, such sqrt()
or pow()
.
More...
Files  
file  complex.h 
Transactional wrappers for interfaces of <complex.h>.  
file  mathtm.h 
Transactional wrappers for interfaces of <math.h>.  
file  math.h 
Transactional wrappers for interfaces of <math.h>.  
file  picotmlibm.h 
Public interfaces of picotm's libm module.  
The C Math Library module provides transactional implementations of typical C math functions, such ar sqrt()
or pow()
. The functions in this module can simply be invoked without further configuration. Most of them don't have any state besides error reporting and the floatingpoint environment. All functions instrument the TM module for privatizing argument buffers, and instrument libc for saving errno.
The C Math Library maintains two global states. These are the floatingpoint environment and the floatingpoint status flags.
The floatingpoint environment contains configuration flags for operations that involve floatingpoint arithmetics. A typical example is the rounding mode.
The floatingpoint status flags signal errors during floatingpoint operations. Examples are overflow errors or divisions by zero.
All functions in libm handle these state variables automatically. If you implement an external module that modifies these states, libm offers two interface for saving the states. Call picotm_libm_save_fenv() to save the floatingpoint environment, and call picotm_libm_save_fexcept() to save the floatingpoint status flags. This will save and restore each state when necessary.