Support for fixed point arithmetic in libc · Issue #74560 · llvm/llvm-project (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Description
Clang supports fixed point arithmetic which was proposed in ISO/IEC JTC1 SC22 WG14 N1169. This document also proposes the stdfix.h
header which introduces:
- Integer types used for the bits conversion functions
- Precision macros
- The
FX_FULL_PRECISION
pragma - The fixed-point overflow pragmas
- Fixed-point arithmetic
- The fixed-point arithmetic operation support functions
- The fixed-point absolute value functions
- The fixed-point rounding functions
- The fixed-point
countls
functions - The bitwise fixed-point to integer conversion functions
- The bitwise integer to fixed-point conversion functions
- Type-generic fixed-point functions
- Numeric conversion functions
- The
fprintf
function conversion specifiers for fixed-point type arguments - The
fscanf
function conversion specifiers for fixed-point type arguments
To improve the usability of fixed point arithmetic in Clang, LLVM libc should provide the stdfix.h
header and implement all the functions declared there.