Parma Polyhedra Library requirements
C++ hexadecimal floating-format metadata

C++ hexadecimal floating-format metadata

UID:
VERSION:
CLASSIFICATION:
PREFIX:
Type
Level
MID
UID
REFS
Title
Statement
Rationale
Comment
BIBLIOGRAPHY
STATUS
COMPONENT
APPLICABILITY
VERIFICATION_METHODS
VERIFICATION_CRITERIA
SOURCE
LANGUAGE
VISIBILITY
INTERFACE
SW_SPEC
1
PPL-SPEC-001594
PPL-SPEC-001594
IBM hexadecimal format metadata for expression analysis

float_ibm_single and float_ibm_double shall provide compile-time numerical metadata for the short and long IBM hexadecimal formats used by floating-expression analysis. Both shall expose radix BASE == 16, characteristic width EXPONENT_BITS == 7 and excess-64 bias EXPONENT_BIAS == 64. MANTISSA_BITS shall count stored fraction bits: 24 for the short format and 56 for the long format, corresponding to six and fourteen hexadecimal digits. The short descriptor shall also expose floating_point_format == IBM_SINGLE.

Reading these constants shall require no library initialization, floating hardware support or FPU rounding-state setup. Their use in rounded analysis shall retain the numerical and initialization prerequisites of the selected consumer, including 🔗 11. Descriptor-based relative rounding error and 🔗 1. Descriptor absolute-error interval. The cached enumeration-based query shall retain its supported-format domain in 🔗 2. Enumeration-based cached absolute error.

Expression analysis needs the analyzed format's radix, fraction precision and bias independently of the analyzer's native arithmetic. Stating the precision unit prevents interpreting a bit count as a hexadecimal digit count when selecting rounding-error bounds.

APPROVED
EXPRESSION_ANALYSIS
IF_CPP
Test, Analysis, Inspection

Use constant expressions to check every exposed metadata value and the short-format identifier independently of native IBM hardware. Check the existing short and long expression-analysis error bounds against exact rational hexadecimal quantization, including underflow, both signs and consumer rejection of unsupported cached format selections.

src/Float_defs.hh; src/Float_templates.hh; src/Linear_Form_templates.hh; tests/floatrepresentationsspec1.cc; tests/Concrete_Expression/floatingcontracts1.cc; tests/Concrete_Expression/ibmroundoff1.cc; tests/ownedexpressionspec1.cc.

CPP
Internal

Public header: <ppl.hh>; implementation names in Parma_Polyhedra_Library.

struct float_ibm_single {
  static constexpr unsigned int BASE = 16;
  static constexpr unsigned int EXPONENT_BITS = 7;
  static constexpr unsigned int MANTISSA_BITS = 24;
  static constexpr int EXPONENT_BIAS = 64;
  static constexpr Floating_Point_Format floating_point_format = IBM_SINGLE;
};
struct float_ibm_double {
  static constexpr unsigned int BASE = 16;
  static constexpr unsigned int EXPONENT_BITS = 7;
  static constexpr unsigned int MANTISSA_BITS = 56;
  static constexpr int EXPONENT_BIAS = 64;
};