13.07.2015 Views

pcp_reference_guide_v2.5 - Tasking

pcp_reference_guide_v2.5 - Tasking

pcp_reference_guide_v2.5 - Tasking

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Run−time Environment4−54.5.1 COMPLIANCE WITH IEEE−754The level to which the floating−point implementation complies with theIEEE−754 standard, depends on the choosen configuration.All floating−point calculations are executed using the ’round to nearest(even)’ rounding mode, since this is required by ANSI−C 89. This isconform IEEE−754. Because there are no double precision floating−pointhardware instructions, an emulating library is always needed for doubleprecision calculation.Compliance with IEEE−754: Trapping emulation libraryThe following implementation issues for the trapping floating−point libraryare important:• subnormals are not supported. This is conform the PCP hardwaredesign.• when converting floats to integers, the value is truncated. This complieswith ANSI−C 89 and ISO−C 99, but does not comply with IEEE−754,since the current rounding mode is ’round to nearest (even)’.• when a converted float overflows the target integer type, a predictablevalue is assigned to the target integer.Compliance with IEEE−754: Non−trapping emulation libraryThe following implementation issues for the non−trapping floating−pointlibrary are important:• when calculating with floats, rounding is done to the nearest integer(rounding towards infinity when equally near).• there is no distinction between −0 and +0• when an operand of a calculation is a NaN, Inf or subnormal, the resultis undefined.• when the result of a calculation would be a subnormal, the result is 0.• whenever a NaN or Inf would be the result of a calculation, the resultis undefined• when converting single precision floats to integers, rounding is done tothe nearest integer (rounding towards infinity when equally near).• when converting double precision floats to integers, the value istruncated. This is similar to the trapping emulation library.• when a converted float overflows the target integer type, the value issaturated to MAX_INT or MIN_INT.• • • • • • • •

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!