LINUX.ORG.RU

История изменений

Исправление saahriktu, (текущая версия) :

Я читал, что писал автор теста. И он написал, что этот баг затрагивал не только «single-precision» вычисления, но и «double-precision divides». Именно поэтому я ни секунды не сомневался в том, чтобы в итоге оставить именно double, а не float.

There are some rare cases when the Pentium chip divides two floating-point numbers in which it returns an answer that is slightly inaccurate (the precision of the result is less than expected). The bug affects both single-precision and double- precision divides. It does not appear to effect any other instruction in the processor.

The bug occurs only for certain pairs of numbers. It is repeatable--i.e. if a pair of numbers is known to be affected by the bug, the pair will be affected every time it is tested on every chip with the bug. The bug is also independent of the speed of the chip and any previously executed instructions. ... The Pentium (along with every other major microprocessor) uses the IEEE 754 standard to represent floating point numbers. A floating- point number stores a real number as sign*1.XXX*2^YYY, i.e. one plus a fraction, raised to a power of two, along with the sign. The XXX part is the mantissa and the YYY part is the exponent.

The IEEE standard defines a single-precision number to have a 23-bit mantissa. This provides 24-bit precision (counting the leading one) and is equal to approximately 7 decimal digits. A double precision number has a 52 bit mantissa, giving 53-bit precision; equal to about 15 decimal digits.

Исходная версия saahriktu, :

Я читал, что писал автор теста. И он написал, чьл этот баг затрагивал не только «single-precision» вычисления, но и «double-precision divides». Именно поэтому я ни секунды не сомневался в том, чтобы в итоге оставить именно double, а не float.

There are some rare cases when the Pentium chip divides two floating-point numbers in which it returns an answer that is slightly inaccurate (the precision of the result is less than expected). The bug affects both single-precision and double- precision divides. It does not appear to effect any other instruction in the processor.

The bug occurs only for certain pairs of numbers. It is repeatable--i.e. if a pair of numbers is known to be affected by the bug, the pair will be affected every time it is tested on every chip with the bug. The bug is also independent of the speed of the chip and any previously executed instructions. ... The Pentium (along with every other major microprocessor) uses the IEEE 754 standard to represent floating point numbers. A floating- point number stores a real number as sign*1.XXX*2^YYY, i.e. one plus a fraction, raised to a power of two, along with the sign. The XXX part is the mantissa and the YYY part is the exponent.

The IEEE standard defines a single-precision number to have a 23-bit mantissa. This provides 24-bit precision (counting the leading one) and is equal to approximately 7 decimal digits. A double precision number has a 52 bit mantissa, giving 53-bit precision; equal to about 15 decimal digits.