Talk:Quadruple precision

From Wikipedia, the free encyclopedia

I think this article should be moved, since the title is not conform to IEEE 754r, which refers the format as quad or quadruple precision, but never quad precision. Also quad is not really an adjective like single and double. See e.g. the draft on [1]. — Ylai 08:53, 9 January 2006 (UTC)

Good point. So changed. --Jake 21:43, 9 January 2006 (UTC)

Contents

[edit] 1/3 rounds up or down?

This page on quadruple precision says:

   (1/3 rounds up like double precision, because of the odd number of bits in the significand.)

However the page for double precision says:

   (1/3 rounds down instead of up like single precision, because of the odd number of bits in the significand.)

These statements contradict each other.

[edit] Max quad begins with (hex) 7fef or 7ffe?

I think it should probably be "7ffe" in the first block of four hex digits unless anyone can say why not.

[edit] Possible Error in the Example for 1/3

It appears that an error has crept into the example for 1/3, namely:

1) The examples states that the following bits, presented as hex numbers, denote 1/3:

3ffeh 5555h 5555h 5555h 5555h 5555h 5555h 5555h

2) When expanded into binaly notation this is:

0011b 1111b 1111b 1110b 0101b 0101b 0101b 0101b ....

3) The exponent is (15 bits):

011111111111110b = 16382d, adding the offset of -16383d the value of the exponent is found to be 16382-16383=-1d. And this is what appears wrong to me. It must be -2d. Why? Because, read on...

4) The mantissa is:

0101b 0101b 0101b .... = 1/4d + 1/16d + 1/64d + 1/256d + 1/1024d + 1/4096d ... = 0.333d... When we add the implied 1d the value of the matissa is found to be 1+0.333...=1.333d...

5) Finally we construct the floating-point number as follows:

mantissa * 2^exponent = 1.333... * 2^-1 = 1.333... * 1/2 = 0.666..., which is not 1/3 as the text states it must be. However, if the exponent was -2 then the result would be: mantissa * 2^exponent = 1.333... * 2^-2 = 1.333... * 1/4 = 0.333..., which is the correct result.

6) Bottom line: I think that the example for 1/3 must be:

3ffdh 5555h 5555h 5555h 5555h 5555h 5555h 5555h

Plamka 23:16, 17 September 2007 (UTC)

Plamka is right and unfortunately MAX is also broken. I've changed the values accordingly. --136.172.253.11 19:17, 5 March 2008 (UTC)


[edit] Hardware and software support

Do any hardware or CPUs support quadruple precision floating point already?

Do any programming languages?

193.74.100.50 (talk) 08:00, 9 May 2008 (UTC)

Java does not support quadruples, but you can use BigDecimals instead. C/C++ has 'long double', but that might be interpreted the same as 'double'.
Honnza (talk) 06:41, 22 May 2008 (UTC)