Page 1 of 1

Computational standards compliance

Posted: 2019-01-20, 23:01:33
by JoeDuarte
Hi Agner -- I suggest that the ForwardCom specification be explicit about compliance or noncompliance with the relevant computational/math standards. You cite IEEE 754-2008 sometimes in the document, but the more comprehensive and international standard is ISO/IEC 10967, which includes not only floating point but also integer and complex number computation.

https://en.wikipedia.org/wiki/ISO/IEC_10967

Surprisingly for the ISO, the documents are free:

https://standards.iso.org/ittf/Publicly ... 1_2012.zip
https://standards.iso.org/ittf/Publicly ... 001(E).zip
https://standards.iso.org/ittf/Publicly ... 006(E).zip

I would also clarify in your specification that extended precision is 80 bits, for example on page 63 of the ForwardCom spec.

Note that one of the reasons that the RISC-V team gave for not just adopting OpenRISC was that it wasn't compliant with IEEE 754-2008 (see FAQ #10: https://riscv.org/faq/), so clarifying where ForwardCom stands might be helpful.

Re: Computational standards compliance

Posted: 2019-01-21, 19:56:54
by agner
The intention is to support IEEE-754 in the form of the next revision forthcoming in 2019. Among the forthcoming changes to IEEE-754 is a sanitation of the max and min functions for NAN inputs.

Subnormal numbers may be turned off by default for performance reasons. They are very costly to support.

Trapping of floating point exceptions is costly to implement in hardware. It is rarely used, and it causes inconsistencies in vector operations. Instead, I would prefer to rely on NAN propagation as default. Exception trapping may be turned on when necessary for standards compliance, but a better solution might be to use special instructions for detecting exceptions that cannot be expressed as NANs. There are no status flags, because they would not work well with out-of-order parallelism and vector parallelism. See https://www.agner.org/optimize/nan_propagation.pdf

Extended f.p. precision is 128 bits (binary), not 80 bits.

ForwardCom has no intrinsic complex type and no complex number instructions, but the fused multiply-and-add instruction allows alternating addition and subtraction to facilitate complex number multiplication.

Thank you for linking to the ISO standard. I have not had the time to study it in details, but ForwardCom has instructions for detecting signed and unsigned integer overflow.

Re: Computational standards compliance

Posted: 2019-01-22, 20:44:42
by JoeDuarte
x86 extended precision is 80 bits: https://en.wikipedia.org/wiki/Extended_ ... ion_format

Is there a broader use of the term "extended precision" that means 128 bits? If so, what do they call the 80-bit form?

Re: Computational standards compliance

Posted: 2019-01-24, 17:34:37
by agner
80 bit float is not mentioned in the IEEE standard. It was introduced with the Intel 8087 coprocessor and AFAIK used only in Intel-compatible processors.
The IEEE standard mentions the following floating point types: binary16, binary32, binary64, binary128.