dimforge / simba

Set of mathematical traits to facilitate the use of SIMD-based AoSoA (Array of Struct of Array) storage pattern.
Apache License 2.0
295 stars 29 forks source link

Add partial support of fixed-point numbers. #3

Closed sebcrozet closed 4 years ago

sebcrozet commented 4 years ago

This add partial support of fixed-points numbers. Here "partial" means that fixed-point numbers implement all the scalar traits (including RealField) but a lot of their functions are just unimplemented!(). Among the special functions, only non-hyperbolic trigonometric functions, sqrt, and exp, are implemented.

In order to enable fixed-point supports, it is necessary to enable the partial_fixed_point_support feature of simba. The supported fixed-point types are exported in the simba::scalar module (e.g. simba::scalar::FixedI40F24 for a 64-bits fixed-point numbers with a 24-bits decimal part.