Talk:IEEE 754-1985/Archive 1
This is an archive of past discussions about IEEE 754-1985. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 |
merging articles
I think that merging the articles about "floating point standard" and the seperate articles about "half/single/double/quad precision" will lead to unreadble big articles... Merging everything would make it more difficult to find the wanted information in article... If there is no direct reason like "too little hosting space" i would leave them apart.
with regards, Jochem Bonarius
Another request
Could someone add some information about which common processors implement this standard, and whether there are known bugs/non-conformities in the implementation. In particular, I'd like to know about modern PC and Mac processors, and reassurance that processors from different manufacturers have the same level of conformance to the standard.
About "C++ Source"
The section "C++ Source" should be either removed or rewritten for the following reasons:
- It does not add anything to the content of this article.
- The algorithm does not describe what it is supposed todo -- this makes it hard to diskuss its correctness.
- It seams to be wrong anyway -- it assigns a double value "DBL_MAX" to a float, ...?
- It could be replaced by a more correct 1 line algorithm.
If nobody complains I'm going to remove it the next time I consult this page. --cwb 06:32, 18 May 2006 (UTC)
- I agree completely. Done. Silverdirk 03:07, 22 November 2006 (UTC)
I agree, this code is strange. It would only be useful if you had a machine which didn't internally use IEEE 754, and even then, it loses things like NaN and +/-Inf, which seem important to preserve.
A more useful algorithm to post would be converting text representations to binary, since doing it at the bit level is more reliable (and efficient) than using a series of base-10 float ops on an accumulator.
Maybe it's a nice illustration to have the following code on the page. It shows the ranges of valid FP values.
unsigned __int32 Floats32[] =
{
0x7fffffff, // +qNaN 00
0x7fc00000, // +qNaN 04
0x7fbfffff, // +sNaN 08
0x7f800001, // +sNaN 0c
0x7f800000, // +inf 10
0x3f800000, // +1 14
0x40000000, // +2 18
0x40800000, // +4 1c
0x007fffff, // +denorm 20
0x00000001, // +denorm 24
0x00000000, // +0 28
0x80000000, // -0 2c
0x80000001, // -denorm 30
0x807fffff, // -denorm 34
0xbf800000, // -1 38
0xc0000000, // -2 3c
0xc0800000, // -4 40
0xff800000, // -inf 44
0xff800001, // -sNaN 48
0xffbfffff, // -sNaN 4c
0xffc00000, // -qNaN 50
0xffffffff, // -qNaN 54
};
unsigned __int64 Floats64[] =
{
0x7fffffffffffffff, // +qNaN 00
0x7ff8000000000000, // +qNaN 08
0x7ff7ffffffffffff, // +sNaN 10
0x7ff0000000000001, // +sNaN 18
0x7ff0000000000000, // +inf 20
0x3ff0000000000000, // +1 28
0x4000000000000000, // +2 30
0x4010000000000000, // +4 38
0x000fffffffffffff, // +denorm 40
0x0000000000000001, // +denorm 48
0x0000000000000000, // +0 50
0x8000000000000000, // -0 58
0x8000000000000001, // -denorm 60
0x800fffffffffffff, // -denorm 68
0xbff0000000000000, // -1 70
0xc000000000000000, // -2 78
0xc010000000000000, // -4 80
0xfff0000000000000, // -inf 88
0xfff0000000000001, // -sNaN 90
0xfff7ffffffffffff, // -sNaN 98
0xfff8000000000000, // -qNaN a0
0xffffffffffffffff, // -qNaN a8
};
Smallest non-zero normalized number
After looking at page 200 of the textbook "Computer Organization and Design" by Patterson & Hennessy, and consulting with a CS graduate student, we confirmed that this is in fact the correct "smallest non-zero normalized number" because (as per the textbook and this very same article) there is no restriction on the fraction of a normalized number. There is an implied 1 in the 20 position of all normalized numbers, so the number is not 2−126 * 0.
It is instead: 2−126 * 1.0 ≈ .1175494351×10−37
If there is evidence to contradict this please reference it before changing the main article. I know textbooks make mistakes, but I have found no source that says normalized fractions must be non-zero. -Nick 01:17, 28 April 2006 (UTC)
I think Double-precision 64 bit floating-point shuld follow this rule
the smallest value should be
, not ( )
Largest nonzero normalized number
I think there is an error here. When, as stated in the section referring to the largest normalized number, the value of the binary number that is used for the exponent is 254 (since 255 is reserved for Nan or Infinity), then the value of exp is: 254 - 127 = 127. That is, the largest exponent that can be represented in single precision is 2^127, NOT 2^128. The same applies for double precision. Am I correct in my assumptions? Is it okay to go ahead and change this?89.244.191.153 17:08, 13 August 2007 (UTC)
- The value is correct as it is -- but it might be clearer if it were written (2−2(−23)) × 2127. mfc 12:54, 29 August 2007 (UTC)
IEEE 854 redirects here, when this page doesn't talk about 854 at all
Strange that IEEE 854 redirects here, when this page doesn't talk about 854 at all. -- Jake 21:23, 28 November 2005 (UTC)
- If you check google:IEEE+854, you'll find that IEEE 854 is the radix-independant floating-point arithmetic. Close enough. Alphax τεχ 03:44, 21 March 2006 (UTC)
- Still, it seems that there should be a mention or it should get its own page.
- So I just added something about 854. -- Jake 18:23, 5 October 2006 (UTC)
- Still, it seems that there should be a mention or it should get its own page.
Mantissa or significand?
In the context of floating-point arithmetic, mantissa and significand are synonymous, but this article uses them inconsistently. Mantissa is only used in the Anatomy section and significand is only used in the 32-bit section. Should one be used throughout, with a mention of the other?
- Thats actually a good question. Actually, mantissa is not synonymous with siginificand, it took time for me to figure this out. Both standard docuements, IEEE 854 and IEEE 754 use only "significand". The word "mantissa" is not mentioned at all. Jidan 23:50, 12 April 2006 (UTC)
- Jidan, could you please explain in what way the terms are not synonymous, as applied to floating point arithmetic? As far as I can tell, with reference to floating-point arithmetic the terms signifcand and mantissa refer to exactly the same thing. Mantissa also has a more general mathematical definition, which is only conceptually related to floating point arithmetic. The term mantissa seems to be in much more common usage everywhere other than the actual IEEE standard document. I agree, however, that the article should use consistent terminology. --Brouhaha 16:39, 14 April 2006 (UTC)
Hope this will clear everything(from Significand):
Use of "mantissa"
The original word used in American English to describe the coefficient of floating-point numbers in computer hardware, later called the significand, seems to have been mantissa (see Burks et al., below), and as of 2005 this usage remains common in computing and among computer scientists. However, this use of mantissa is discouraged by the IEEE floating-point standard committee and by some professionals such as William Kahan and Donald Knuth, because it conflicts with the pre-existing usage of mantissa for the fractional part of a logarithm (see also common logarithm).
The older meaning of mantissa is related to the IEEE's significand in that the fractional part of a logarithm is the logarithm of the significand for the same base, plus a constant depending on the normalization. (The integer part of the logarithm requires no such manipulation to relate to the floating-point exponent.)
The logarithmic meaning of mantissa dates to the 18th century (according to the OED), from its general English meaning (now archaic) of "minor addition", which stemmed from the Latin word for "makeweight" (which in turn may have come from Etruscan). Significand is a 20th century neologism.
Jidan 06:47, 15 April 2006 (UTC)
- It still wasn't clear to me, so I dug a little derper into the articles; there actually is a mathematical difference. Consider the number 75 = 10010112 = 1.0010112*26 ≈ 26.22881869 ≈ 2110.0011101010012. In either case, the exponent is 6 = 1102, but the significand, in the floating-point sense is 1.0010112 whereas the mantissa, in the logaritmic sense, is .001110101001...2. Hope that sheds some light on the difference. mennsa 20:10, 8 August 2006 (UTC)
The question is what do we call the significand minus the hidden bit? I can't redo the pictures until we have a good name and the literature has been no help so far.Charles Esson 21:52, 11 April 2007 (UTC)
Info on double extended floating point numbers? (80 bits)
As per title :) —porges(talk) 10:59, 4 June 2006 (UTC)
- Definitely should be added, by direct reference to an authoritative source. Borland Pascal and Delphi support type extended.
- From memory, the 10 bytes are 5 words. The first word starts with the sign bit, then 15 biased-exponent bits (bias 16383). The remaining 4 words hold 64 mantissa bits, commonly representing the binary fraction 1.xxx... but maybe 0.xxx... (no implicit 1). NaN and Inf resemble those of Doubles.
Comparing floating-point numbers
--Radomir Tomis 23 August 2006
I understand "the same byte ordering" and "NaNs", but I can't see reason for "the same sign" and "two positive floating-point numbers" (or implied "two negative ...").
You can always specify whether you want to compare 2 integers using either signed or unsigned arithmetic so single/double floating-point values can / must be compared using *signed* 32/64-bit integer comparison. IEEE754 sign bit + exponent + mantissa are organized appropriately for signed 32/64-bit integer comparison.
--Radomir Tomis 20:13, 25 August 2006 (UTC)
- Sorry, I was wrong !
- The sign bit makes difference when both values are negative.
- So the integer comparison can look like this:
float f1, f2; int32_t i1, i2; int relation; scanf("%f",&f1); scanf("%f",&f2); i1 = *(int32_t *)&f1; i2 = *(int32_t *)&f2; if ( i1 == i2 ) relation = 0; else if ( i1 < 0 && i2 < 0 ) relation = i1 > i2 ? -1 : +1; else relation = i1 < i2 ? -1 : +1; if ( relation > 0 ) printf(" f1 > f2 (%s)\n", f1 > f2 ? "OK" : "\aERR!"); else if ( relation < 0 ) printf(" f1 < f2 (%s)\n", f1 < f2 ? "OK" : "\aERR!"); else printf(" f1 == f2 (%s)\n",f1 == f2 ? "OK" : "\aERR!");
Another information I cannot identify with:
- " Because the byte order matters, this type of comparison cannot be used in portable code through a union in the C programming language.
Not through union, but you can write portable C code (for CPUs with 8-bit 'char' data type defined by their compilers) to convert the floating-point values to byte ordering of the target
CPU (detected at run-time), if necessary, and then do the integer comparison. Alternatively, you can compare the floating-point values byte-by-byte in sequence from the most to the least significant byte (the most significant byte using signed integer comparison, the remaining bytes using unsigned integer comparison).
- It doesn't matter. The article mentions using int-compare in the context of optimization. You will certianly not save time using four byte-compares (along with all the shift instructions needed) instead of simply using your floating point hardware. The article simply lets us know about a "nifty hack" available for those times where speed is critical and the hardware is a known constant.
There should also be noted that (as far as I gathered) IEEE 754 does not specify *byte* order of the values (CPU/implementation dependant), it specifies only bit order. This might not be apparent from the article.
- It's a bit more complicated than that, I fear -- some hardware (I forget which) does not do little-endian/big-endian on a byte basis, but on a word basis, the 'word' in question being 16 bits. mfc 15:20, 27 August 2006 (UTC)
- Correct. It's called middle-endian (used by e.g. PDP-11). However, you can still detect and support all byte-ordering schemes if necessary. --Radomir Tomis 08:33, 28 August 2006 (UTC)
This should work if you union an integer with a float. If you ignore NaN you should be able to treat the float as a signed magnitude integer for comparisons ( that was the whole idea). The hardware or compiler deals with the byte order when loading the integer. I will check on a 68k and Intel system before changing the article ( sorry no PDP-11 to check with). Charles Esson 10:24, 14 April 2007 (UTC)
- I guess that depends what "should work" means to you. "The whole idea" was that this representation would make it easy to implement on lots of existing hardware, not that it would be guaranteed to work automatically on all existing hardware. If you want "works in all cases on every conformant C installation," then it doesn't work. If you want "works in a well-defined range of cases on every current laptop, desktop, workstation, or server on the market," maybe it does.
- There are systems where the byte order for floats and ints is different. Early ARM systems were always word-big-endian, but could be byte-little-endian (hence middle-endian). However, ARMs with hardware floating point always had big-endian floats. ARMs with switchable hardware FP (e.g., an FPU that can be disabled for power savings) had soft floats that could be made to match the hardware floats or the soft floats. Modern ARMs are either big-endian or little-endian, and floats match--except when they're in emulation mode, of course. I believe glibc still supports this wonderful feature.
- Just as you can deal with the difference between signed-magnitude and 2's complement in different ways depending on what you care about (e.g., if all of your values are non-negative, you can ignore it), there are different ways to deal with middle-endianness. But if you truly want to handle all legal variations, all you can really assume is that 0 is always 0.
- Except that I'm pretty sure C doesn't even guarantee that float is exactly 32 bits. --75.36.132.72 12:05, 28 July 2007 (UTC)
Single and double merge or partition?
How should we partition the content between this article and single precision and double precision?
- It seem to me that we would be better off having details of the formats in their own page since they
are linked to from elsewhere. We should include enough in this article for people to understand the standard. -- Jake 18:26, 5 October 2006 (UTC)
I agree. Do not merge. The single and double pages have very useful technical information, collected in one place, at the right level of detail for people wanting to know how the bits work. These people might not be interested in the history or other aspects of the standard. William Ackerman 01:41, 13 October 2006 (UTC)
Interesting note
16,777,216 is the largest number a float can get to by incrementing by 1. This is when the exponent is so large that the significand loses precision to the... uh, one's place, first decimal, first unit. Whatever, it loses precision. There is no floating point 16,777,217.
If you moving away from zero every time you go through a power of two the resolution is halved. See Q numbers if it is a problem.Charles Esson 21:57, 11 April 2007 (UTC)
The general formula for a continuous range of integers is -(2**(#fractionalBits+1)) to (2**(#fractionBits+1)). [Lawrence Miller] —Preceding unsigned comment added by 71.57.53.31 (talk) 06:06, 28 January 2008 (UTC)
more work, notes
I've just made text consistent with the diagram but reading. "What every computer scientist should know about floating point arithmetic"
significand was introduced by Forsythe and Moler [1967] and has generally replaced the older term mantissa.
Hidden bit footnote page 191
I think the diagram will have to be replaced and the text altered.Charles Esson 12:07, 11 April 2007 (UTC)
General layout
Because mantissa has many uses I have started on changing the name of the significand minus the first bit to fraction; I've been through a reasonable amount of the literature and there seems to be no standard word. Fraction seems a reasonable choice. Charles Esson 22:25, 13 April 2007 (UTC)
Link to Cygnus website
The link Comparing floating point numbers was recently added. I'm getting a "403" -- "You don't have permission to access /papers/comparingfloats/ on this server." error on this. Is this just me? Does anyone know the status of this site? William Ackerman 15:03, 17 April 2007 (UTC)
- I get the same no permission message as you, probably a typo in the URL - Gesslein 15:16, 17 April 2007 (UTC)
A request
What is the section "Recommended functions and predicates" about, I'm no C programmer. I assume it has something to do with C, who's doing the recommendation and why are the things I would like to find out reading the section. 69.224.108.90 02:10, 2 June 2007 (UTC)
- That section is ok, even if you are not a C programmer. IEEE recommends these functions and their task for any programming language or technical system implementing the norm. --Brf 07:07, 11 June 2007 (UTC)
content duplication
lots of content duplication with Single precision — MFH:Talk 13:37, 21 June 2007 (UTC)
Format names?
Hi, I'm a student I'm learning floating-point formats now. I'm taught that there are 6 formats: 2-based:
- SHORT
- LONG
- TEMPORARY
and 16-based:
- REAL
- DOUBLE
- EXTENDED
But I can't see these formats in this article. If I'm correct, these names should be added, or is there any reason not to? My book cites IEEE-P754 standard. Sevcsik 17:12, 8 October 2007 (UTC)
- Hi – the P754-1985 standard describes two basic formats (Single (32-bit), and Double (64-bit)) along with 'extended' (longer) versions of these, which are not well defined. All these are base-2 (binary). The names of these as used by various programming languages vary widely – languages often have their own syntax rules for names – and so are not part of the standard. mfc (talk) 20:37, 28 November 2007 (UTC)
Pos/Neg Zero
Should the table at the end of section "Single-precision 32 bit," have a * for the Sign on Zero, since both 0x00000000 and 0x10000000 represent zero? --Rickpock (talk) 21:57, 27 February 2008 (UTC)
Section called 'Converters' should be removed
A collection of web sites offering 'converters' have been added to the end of the article. These sites have no notability or references to establish their importance. I suggest that this section might be removed. The 'Think Silicon' converter won't run unless you register with the site; the 'Handyscript' converter is poorly documented and it's hard to interpret the results. Under WP:NOT I don't think any of these things belong here. EdJohnston (talk) 03:32, 30 March 2008 (UTC)
- I agree. Anyone else? mfc (talk) 16:14, 31 March 2008 (UTC)
Denormalized numbers
AFAIK the smallest denormalized number have an exponent value -126 (because the smallest normalized number is 00000001 and zeroes in M, mind hidden 1), however it's represented by E value of 0000 0000. I'm not completely sure, may someone check this out? —Preceding unsigned comment added by 82.143.190.73 (talk) 17:06, 27 May 2008 (UTC)
Easily mix-up with the exponent terms
There is a slight but little difference between exponent and exponent. I had a hard time figuring out what was the exponent and what was the biased exponent, until I saw that one group where written in italic. It could probably be shown more clearly what is the biased exponent by for for example writing it in short form, or putting apostrophe after it; maybe as an alternative, exponent could be written as "unbiased expoinent" instead. —Preceding unsigned comment added by Kri (talk • contribs) 23:18, 16 June 2008 (UTC)
Simply not true, and needs rephrased
I read that "All integers that are a power of 2 can be stored in a 32-bit float without rounding" herein. This of course isn't true for large integers. Marc W. Abel (talk) 17:10, 8 September 2008 (UTC)
- Thanks, it should be more clear now -- KelleyCook (talk) 18:18, 8 September 2008 (UTC)
Denormalized numbers
"Denormalized numbers are the same except that e = −126 and m is 0.fraction. (e is not −127 : The fraction has to be shifted to the right by one more bit, in order to include the leading bit, which is not always 1 in this case. This is balanced by incrementing the exponent to −126 for the calculation.)"
In my opinion, this is quite confusing. It would be much more clear if it read "Denormalized numbers are the same except that m is 0.fraction and the exponent is usually the minimal exponent possible - for example e = −126 in the case of single precision. The value actually being stored in the exponent's bits (0...0) merely may be seen as a "flag" indicating that the number is denormalized. It does not mean that the exponent is e = -127." or something similar. Please correct me if I'm wrong.
(http://754r.ucbtest.org/standards/754.pdf#page=4 - Definitions) —Preceding unsigned comment added by 84.162.103.186 (talk) 17:27, 10 September 2008 (UTC)
Rules for narrowing conversion?
Are there standard rules for converting from larger (eg 64-bit) to smaller (eg 32-bit) formats?
Specifically, what happens if you have a denormal 64-bit number that's (much) smaller than the smallest 32-bit denormal number? Does it become zero, or the smallest 32-bit denormal?
The obvious thing would be if it became the closest 32-bit value, which could be zero. But this would mean that some quite important properties could be violated by such a conversion. Using the smallest denormal as a sort of floor would maintain those properties, at the expense of accuracy. There are advantages and disadvantages either way. —Preceding unsigned comment added by 93.96.235.0 (talk) 20:39, 13 May 2009 (UTC)
- The normal rounding rules are applied. The default is round to nearest with ties going to even. So yes generally they will go to 0, however there is both a +0 and -0 which can take care of most of the problems you're probably thinking of. With directed rounding you can do the thing you're saying but to be frank I don't think it is a good idea except for interval arithmetic or sometimes when emulating extended arithmetic. Dmcq (talk) 08:55, 14 May 2009 (UTC)
Improving the main article
Could somebody link the main article to a list of microprocessors that support IEEE 754-1985? Do any of these microprocessors trigger an interrupt when a rounding error is forced? Dexter Nextnumber (talk) 04:46, 23 December 2009 (UTC)
- I can't see what linking to a list of microprocessors supporting the standard would be in aid of. What would be the point? Why would anyone look at it or what would they do with it? The term for a rounding error in the standard is an inexact exception and you can enable it. Mathematical functions like exp or log are not required to support it, see the latest version of the standard IEEE 754-2008. There's only a couple of processors that support the decimal version of the new floating point standard and they are mentioned in the 2008 article but I wouldn't see the point of mentioning any but the first couple. Some simple software implementations of the standard and some embedded processors avoid implementing any of the exceptions or any rounding mode except the usual round to even as for instance Java doesn't require them. Dmcq (talk) 10:49, 23 December 2009 (UTC)
What came first
I reverted a change saying the x87 was the basis for the IEEE 754 standard to the saying it was an early implementation. The x87 project was started up before iee754 but it could easily have tried implementing DECs way of doing things. They helped set up ieee 754 so they could have a good standard to implement and then they implemented an early revision of that standard is how I see it. Dmcq (talk) 12:44, 19 February 2010 (UTC)
Comparing floats as integers
I removed a bit about comparing floating point numbers as integers. This will work for the standard positive floating point numbers and infinity but it doesn't work when negative numbers are included and would need a bit of explanation if it wasn't to confuse. If they really could be compared as integers you'd need to do something like invert all the bits to get the negative numbers. Dmcq (talk) 07:36, 24 October 2010 (UTC)
- Dmcq, would you be willing to research this and restore/revise the explanation yourself? Omitting an explanation of the reason for the exponent bias is a shame. If it has to be a little bit complicated because integer comparison only works for positive floats, well, so be it. BTW, here's a nice explanation someone else wrote: http://www.cygnus-software.com/papers/comparingfloats/comparingfloats.htm Ours should be way shorter, of course. If you don't want to write it, though, I can probably get to it within a week or so. —Ben Kovitz (talk) 17:42, 24 October 2010 (UTC)
- I believe the bias explanation is relevant and important. IIRC, there was a design intent for sorting fields. Glrx (talk) 17:49, 24 October 2010 (UTC)
- The code in that reference ignores the problems of zeroes infinities and NaNs. The values are not in lexicographic order. There is no evidence the values were designed for anything except hardware implementation. I really think this is a bad idea. Modern hardware does the job well and if you are stuck on a micro without hardware you can easily devise alternatives which are much faster when implemented in software. 21:14, 24 October 2010 (UTC)
- Uh, the text in that reference cites Kahan stating lexographic ordering was a design goal. Even if the citation is not WP:RS, it implies there is an RS. The design issue is not about meagre micros; it is about sensibly sorting external representations. Glrx (talk) 23:18, 24 October 2010 (UTC)
- I think one would need to find out what Kahan was on about when he said that but there is no reason to stick rubbish into the article. The algorithms all have caveats or aren't recommended in that source, if it was simple don't you think they'd have put in something that works without such warnings? If you don't have a meagre micro then you have a floating point unit and you can use that. Why are you so set on sticking in something over and above the standard which is a load of trouble and unnecessary and plain wrong by the standard? Dmcq (talk) 23:58, 24 October 2010 (UTC)
- If you want to use integers in a sort you'd have to first decide what you want to do about NaNs and zeros. If you use the total order predicate then NaNs with different representations are different and -0 < +0, however you might want zeros to compare equal and all the NaNs to be equal to each other either below or above the standard numbers. Floating point numbers can be made suitable for use as a total order predicate by comparing as unsigned numbers by just flipping the sign bit if the number is positive or flipping all the bits if it is negative. Dmcq (talk) 08:59, 25 October 2010 (UTC)
- For the finite numbers, isn't it just "flip the sign bit"? mfc (talk) 07:38, 26 October 2010 (UTC)
- I've put in a fix for a silly slip above, it's flip all the bits if negative. Just flipping the sign bit doesn't work as the numbers are essentially sign and magnitude, for a negative floating point number increasing it as an integer means the magnitude of the negative number becomes bigger - so the number becomes more negative. Dmcq (talk) 08:27, 26 October 2010 (UTC)
- I've just had a look at the 2008 standard and it has a totalOrder predicate in section 5.10 which what I was saying would exactly duplicate. Except it has a fudge about non canonical representations which would be for the decimal floating point - they would all have to be made canonical first is my reading. Dmcq (talk) 08:59, 26 October 2010 (UTC)
- Yes – quite right, sorry! mfc (talk) 08:34, 31 October 2010 (UTC)
- It looks like nothing so simple could be got to work for the decimal floating point numbers unfortunately. They mix up bits of the exponent and significand to save space and I can't see an easy way to disentangle them to give a total order, never mind the problems they have with 'cohorts' having the same value. Dmcq (talk) 11:48, 2 November 2010 (UTC)
- Dmcq, would you be willing to write an explanation of the purpose of exponent biasing and find a good source for it? —Ben Kovitz (talk) 07:23, 5 November 2010 (UTC)
- I believe the principal reason was so a zero value was represented by zero bits. To fit in with small positive numbers this means the minimum exponent should be zero or 1 and the sign bit should be zero for positive numbers. It probably is easier from the hardware and emulation point to deal with unsigned numbers but I don't think this was the determining factor. I don't know if anybody has ever written anything down about this but it's been the way since the very earliest floating point on computers I believe. Dmcq (talk) 08:59, 5 November 2010 (UTC)
- I see the earliest hardware implementations, the Z3 and Bell Labs Mark V, plus some later ones did not have biased exponents. The first one with a biased exponent was the IBM 704 in 1954. Dmcq (talk) 09:57, 5 November 2010 (UTC)
Z3 first working computer
An editor first removed the statement and then wanted to put in modifiers saying it is disputed. I believe the article History of computing hardware is the appropriate place to go first if wishing to start putting in caveats. There are far more eyes there interested in this sort of thing and it says there "The Z3 thus became the first functional program-controlled, all-purpose, digital computer." I added a second citation to this article on this point, it is in a Springer-Verlag book published in 2008 on the history of Computers and you don't get much more reputable than that. It says of Zuse and the Z3 "his greatest achievement was the completion of the first functional tape-stored program-controlled computer". Dmcq (talk) 23:28, 3 February 2011 (UTC)
- I have reservations because these claims depend on the definition of "computer". The Jacquard loom, a player piano, and a tabulating machine would fit the bill for having a stored program. To me, the stored program aspect implies the program is in read/write memory rather than external cards, paper rools, or plug boards. Paper is write once; plug boards are not modified by the computer. That the Zuse Z3 was not using conditional branches is also troubling. Hollerith's machines did conditional branches. For a computer, I want to see something that is Turing complete.
- For this article, the computer claim is irrelevant; the article's interest is floating point calculation. That somebody built an automatic calculator with binary FP is the achievement; that the FP box also did infinities is even better. (von Neuman thought FP wasn't needed.)
- The sources also have some problems. Wiki is not an RS. One Z3 source is a website. A 2008 book is better, but the given quotation is narrow, may not use the same def of "computer", and does not say the Z3 was the first one.
- What specific statement do you want to include in the article? I doubt I'd go with the revert.
- If you disagree with the revert to saying no caveats then I would really appreciate if you would discuss that on the History of computing hardware article. I believe it is inappropriate for us to be sticking in caveats here if they don't bother with one there where they actually do talk about Jaquard looms and tabulators rather than about something on digital computers. The Z3 is Turing complete as was shown by Rojas though I don't find that a convincing argument for anything, it isn't as though Zuse hadn't considered branching back in 1935, just he traded it out in the priorities for getting engineering computation implemented quickly and cheaply. Dmcq (talk) 09:59, 4 February 2011 (UTC)
- By the way if you just want programmability you have to go way farther back. Hero of Alexandria built a cart that could be programmed to go along a path using cord wrapped round pegs on a cylinder. Dmcq (talk) 12:16, 4 February 2011 (UTC)
- Just saw you say one source was not a reliable source, was that the IEEE History of Computers journal or the Springer-Verlag book? Dmcq (talk) 20:21, 4 February 2011 (UTC)
- The 'first working' was there to show it was there at the start of modern computing. I haven't seen any objections which are based on any more than opinions compared to the cited reliable sources and the other articles on Wikipedia. Therefore I am restoring the text. Dmcq (talk) 13:56, 5 February 2011 (UTC)
- Interestingly reading about the Z3 it looks like he probably meant there to be three instruction that were later implemented in the Z4 which set a register to +1 or -1 depending on if a value was equal to 0, or >=0, or an infinity, but even these operations were left out due to lack of materials. He never planned the Z3 to have the conditional skip to mark instruction he implemented in the Z4. Dmcq (talk) 18:59, 5 February 2011 (UTC)
Rojas does not claim Z3 is a computer. See page 1 and page 15. Rojas also points out that most want stored program. Even with his def, there is no branch instruction and presumably no simulated indirect reference because code isn't modified. Glrx (talk) 16:31, 8 February 2011 (UTC)
- Not a universal computer. Big difference. Please argue this at the History of computing hardware article. What is the problem with doing that? Dmcq (talk) 17:22, 8 February 2011 (UTC)
- Well actually not a universal computer in a practical sense which is all I'd consider, [1], a later paper by Rojas, shows that it is actually a universal computer. The same thing about practically can be said about later universal computers though compared to the Z3, implementing good floating point on them would slow them down dreadfully and they didn't have enough storage to keep the algorithms in memory. Dmcq (talk) 17:33, 8 February 2011 (UTC)
- This article is not a debate on the history of computers. This article statement's cited Rojas reference distinguished the Z3 from a computer, so it cannot be used to claim the Z3 is a computer. The Rohas article also conceded that its view on what is and is not a computer differs from others. WP articles are not RS, and Rojas's website is not RS. It's your burden to justify the statement. You are also running up against a third opinion on precisely this issue. You need another editor to support your position; right now the statement is out on a third opinion. Glrx (talk) 18:19, 8 February 2011 (UTC)
- Here is the paper [2] that the website is a copy of. It is a reliable source. Rojas distinguished it from a 'universal' computer. Same as the distinctions from a 'stored-program' computer or a 'working' computer or an 'electronic' computer. The second reference from 2008 says 'first' working computer and is also a reliable source. Do you have some problem with talking to people who might know about something about the subject at History of computing hardware? Dmcq (talk) 18:57, 8 February 2011 (UTC)
- I have brought this issue up at Talk:History_of_computing_hardware#Argument_at_IEEE_754-1985. This is simply the wrong forum to decide whether saying the Z3 was the first working computer is reasonable or not. It is simply wrong to start saying another part of wikipedia is wrong in a place like this without notifying them. That article should be updated if it is wrong. Dmcq (talk) 19:19, 8 February 2011 (UTC)
The other Rojas article discusses an admittedly impractical avenue to a Turing machine. Earlier, you stated that you were uncomfortable with the notion. Pointing somewhere else doesn't solve the additional editor problem. Furthermore, the current IEEE FP article is not vested in making any statement about early computers. Since you keep saying that this talk page is not the appropriate forum to discuss the computer identification issue, then why should the article mention Z3 at all? It's irrelevant here. Moreover, the Z3 is not about the IEEE format; it's a tangential reference about early floating point computation. It's an isolated, off topic, sentence about a 1940's machine that arguably had no influence on the IEEE format at all. Glrx (talk) 19:40, 8 February 2011 (UTC)
- The Z3 bit describes the main extra part of the standard over and above previous floating point formats and quickly outlines the history of such facilities. It is the same as describing how it derived from the VAX and CDC formats but they lacked these features. Leaving that would would leave the totally wrong impression that the VAX and CDX included such features. Would you object to the Wikipedia:WikiProject Computing/Early computers task force to resolve the difference or do you consider asking them about the history in a history section of a computing article to be canvassing? As to that accusation of canvassing for raising the question in the talk page of their main article I consider it a personal attack and in response consider your refusal to consider asking advice from people versed in the area as POV pushing and indication your disinterest in improving the encyclopaedia. If you really were interested you would try to fix this so called fact in the main article rather than warring over trying to say something different in an article like this. Dmcq (talk) 00:07, 9 February 2011 (UTC)
- There seem to be a lot of tangents here. Another editor objected to the unqualified reference to the Z3 as the world's first computer. I looked at the Rojas article that was cited, and that article contradicted the claim. Where are the reliable secondary sources that say Z3 is the world's first computer? WP:UNDUE.
- My edit of the article just put down what Rojas said in the cited article. The Z3 is unquestionably a programmed calculator.
- The article's reliable references clearly support that Kahan was influenced by the VAX and CDC formats. They are silent about any influence of the Z3. Consequently, the Z3 may have not had any impact on the IEEE format. Certainly the Z3 belongs in a general description of FP. Frankly, I do not have any trouble with a passing reference to the Z3 in this article because NaN and inf are relevant, and there is no dispute that the Z3 had such features. But I don't see any reason to state a position about the Z3 being the world's first computer when cited sources dispute the claim.
- There is further trouble with Rojas. He's a primary (not a secondary) source. He's gone both ways, and the later work is taking a lot of liberties. Yes, somebody can create a definition of "computer" s.t. the Z3 is the world's first. But this article about IEEE FP does not need to get into such subtle/controversial distinctions and should not go there. How does any mention of computer priority improve the explanation of IEEE FP?
- Provide some reliable secondary sources that back the world's first computer moniker and the statement can go in. But right now such a statement is clouded by an unclear definition of a computer and a contorted argument about branches.
- My beliefs are out due to WP:NOR, but the Z3 seems to be a step backward from the tabulation machine int that the Z3 cannot read what it writes.
- My objections are connected to WP:NOR as well. Why do you go on about what you believe a computer should be like? I pointed out the major article on the history article supporting what I was saying and there's lots of others. For instance the original objector used the Wikipedia page Manchester Small-Scale Experimental Machine (Baby) to back up that it was the first instead - whereas the article said it was the first stored-program computer. In fact the article later on in the second paragraph of the background section said "Konrad Zuse's Z3 was the world's first working programmable, fully automatic computer, with binary digital arithmetic logic, but it lacked the conditional branching of a Turing machine."
- The second reference I put in 'Gerard O'Regan (2008), A Brief History of Computing, Springer, p. 69, ISBN 971-1-84800-083-4' says 'His greatest achievement was the completion of the first functional tape-stored program-controlled computer'. So if I get it right you're saying that the first reference says its not a computer because he described it as computing machinery and you think this contradicts it being called a computer, and the second Rojas paper would be a primary source and so not able to qualify his first. And this reference from 2008, it isn't a reliable source because of...?
- I'm not sure what you're going on about not being able to read its output. I haven't heard this being a requirement for a computer and I doubt anyone would be interested because unit record equipment could do that.
- As to history there is nothing there saying the Z3 influenced Kahan, it is just describing the timeline. I pretty sure I've seen something linking the business about the special values so I'll go and try and find it again. I've seen references also saying the hidden bit in the IEEE format was first used by Zuse but considered that too distant as it had been used in between since.
- There is no point going on about my beliefs about the matter. Yes I wouldn't consider it a proper universal computer despite the proof by Rojas it is one, but I wasn't saying it was a universal compute, I was quoting that it was the first working computer.. It was you that seemed to think that being a universal computer was necessary for a computer and the citation showed it was one. Our own article computer just says "A computer is a programmable machine that receives input, stores and automatically manipulates data, and provides output in a useful format".
- There are lots of qualifications for different types of early computers, for instance that the Colossus was the first electronic one or the ENIAC was the first universal one or that the Baby was the first stored program one. And for instance even though the Baby is considered a universal machine it wouldn't have been able to do the work the Z3 did as it's memory was far too small.
- Since there has been no response at the history article I'll raise this at the computing project pages. This is really the wrong venue to go on about the Z3 and it is not canvassing to get people who know more about the subject involved. Just saying a computing machine built in 1941 implies others were built before that did comparable sorts of things but missing these features. Dmcq (talk) 13:02, 10 February 2011 (UTC)
- I have raised this at Wikipedia_talk:WikiProject_Computing#Z3_first_working_computer_dispute. Dmcq (talk) 13:18, 10 February 2011 (UTC)
- Response to Dmcq inserted before SteveBaker's edits so as to directly address Dmcq's comments.
- I think we are close to understanding each other. Clearly, the Z3 is an accomplishment, and it appears that you want to make a strong statement about that accomplishment in this article. I think the cited Rojas article can be used to make a strong statement such as the Z3 was the world's first binary FP unit/automaton/calculator/computing machine. Just find where Rojas (or some other) actually makes the statement.
- Compare that narrow statement with the orignal reverts and my edit. In the first paragraph, Rojas doesn't say the Z3 is the worlds first computer. He says some people claim the Z1 is the world's first computer, and then he states that several others would make the same claim about different machines. The first reverted edits were inserting the qualification that Rojas made -- that some people believe the Z3 was the world's first computer. In the article, Rojas goes on to say that Rojas doesn't believe the Z3 is a computer because it doesn't have a conditional branch and doesn't have indirect addressing. Consequently, he makes some clear statements why the Z3 isn't a computer, but, for the purpose of WP, we need not evaluate those statements or consider subsequent backtracks. For WP, the article simply does not support the world's first computer claim, and, in fact, argues that the Z3 is not a computer. In fact, the Rojas article states that which machine is the world's first computer is debatable.
- There's a WP:RS/WP:UNDUE issue is more subtle. Both of Rojas articles are primary references, so neither has a lot of weight. It's clear that the articles are relevant to the history of computing; even if the articles are wrong, they are still appropriate articles to publish in journals. WP can quote primary sources, but WP wants statements that have broad support to avoid getting a minority viewpoint. To that end, WP looks to secondary sources that have evaluated primary sources and passed judgment on the various positions. WP editors don't have the authority to say this primary got it right and that primary got it wrong.
- Furthermore, WP articles are not reliable sources. Consequently, what any other WP article says carries no weight. I'm not swayed by claims that a WP article says Z3 is the worlds first computer. It's OK to crib RS from other articles, but the article itself is not reliable and therefore not a source. The WP history article also has much more context about what a computer is, and it makes a lot of qualifications. This IEEE FP article isn't interested in such subtlety about the term.
- On top of that, if I say "computer" to an average WP reader, they are going to think of something like a PC.
- As I pointed out above the second reference by Gerard O'Regan (2008), A Brief History of Computing, Springer, p. 69, ISBN 971-1-84800-083-4' says 'His greatest achievement was the completion of the first functional tape-stored program-controlled computer' when referring to the Z3. It is a secondary reference and a reliable source and it is straightforward in what it says.
- I am not interested in making a strong statement, I just don't see the point of trying to determine history here when there are lots of articles about the history that have come to a straightforward conclusion. And I definitely think there is something wrong with changing conclusions in peripheral articles without trying to fix the main articles, the main article should be fixed first is my way of doing things. Dmcq (talk) 00:20, 11 February 2011 (UTC)
- I would strongly argue that "Turing completeness" is the modern definition of what constitutes a "computer". We have to be careful because older definitions have the word meaning anything from "a human being who does arithmetic" through something that we'd nowadays describe as a "calculator" (things like the Babbage Difference engine and the Antikythera mechanism) - or things that obey instructions (like a Jaquard loom) that clearly aren't "computers". Turing completeness is a nice 'bright line' test - and I think it accurately matches our modern concept of the term.
- So - we know that Z3 didn't have conditional branches or modifyable program storage - and many people here are using that to claim that it's not turing complete - and therefore not a computer...is that the correct summary of this debate? So if I can prove to you that the Z3 can SIMULATE a conditional jump and SIMULATE writeable program storage - then the argument is over...right? OK - well here goes - hold onto your seat! SteveBaker (talk) 14:42, 10 February 2011 (UTC)
- Interspersed reply to SteveBaker.
- Your comments are not a correct summary of the debate. The debate is about what the sources say and what statements about the Z3 are appropriate in the current article about IEEE FP.
- There are not "many people here" claiming that the Z3 is not Turing complete because it lacks conditional branches or a R/W program store. Rojas's article made the observation that he believed a "computer" must have conditional branches and indirect addressing; the article also stated that the Z3 did not have those features. Those statements negate using that article to support the claim that Z3 is an unqualified "computer".
- The argument about Turing completeness is not on point. Neither Dmcq nor I doubt that the Z3 can simulate certain computational features, so proofs below are not needed and do not resolve the differences. Neither Dmcq nor I dispute Rojas' subsequent claim that the Z3 could simulate the features.
Does the lack of a conditional jump automatically prevent a machine from being Turing complete?
No - it does not.
Actually if you look at the "computers" inside a 'last-but-one-generation' graphics card, the "GPU" does not have true conditional branching in hardware (because it uses a SIMD architecture). Instead, what they do is to use the result of a boolean calculation to either enable or disable writing to memory/registers. Hence, if you write this (in GLSL, HLSL or Cg programming languages):
if ( x > y ) a = b ; else a = c ;
...the compiler converts it to something like:
dataWriteEnableFlag = (x > y) ; a = b ; // "then" clause dataWriteEnableFlag = ! dataWriteEnableFlag ; a = c ; // "else" clause dataWriteEnableFlag = true ;
This provides a kind of "simulated" conditional execution, even without a conditional jump. The GPU steps through both the "then" and the "else" part of the code - but cleverly arranges that when the test condition is "false", the "then" part of the code has no effect, and when the test condition is "true", the "then" part works and the "else" part has no effect. This is horribly inefficient - but "turing complete" doesn't say anything whatever about efficiency.
However, the Z3 probably didn't have a "dataWriteEnableFlag" either (I don't know - I'm not an expert on that particular machine). So are we still saying "not turing complete"? Well, no - we're not done yet. You can actually go one step further by simulating the "dataWriteEnableFlag" too:
dwef = ( x > y ) ; // True is 1, false is zero. a = b * dwef + a * (1-dwef) ; // "then" clause dwef = ! dwef ; a = c * dwef + a * (1-dwef) ; // "else" clause dwef = 1 ;
Now, when the condition is "true", we multiply 'a' by zero and 'b' by one and assign it to 'a' - which is the same as saying "a=b" - and then we flip the state of 'dwef' and multiply 'a' by one and 'c' by zero - which is the same as saying "a=a"...which has no effect. If the conditional is "false" then the opposite happens. This permits a machine that doesn't have conditional execution to simulate it (albeit incredibly painfully!).
Hence, we may NOT conclude that Z3 was not turing complete just because it lacked conditional jumps. So long as it has basic arithmetic and an unconditional jump, it can still emulate a turing machine - and that makes it a computer.
The 'church-turing' theorum says that anything that's turing complete can (with sufficient memory and time) simulate any other turing complete machine...so with that caveat, the Z3 could be made to run Windows 7...and nobody can deny it the status of being a "computer".
QED. Case closed! SteveBaker (talk) 14:36, 10 February 2011 (UTC)
Why is a Jaquard loom not Turing complete?
Because it has no data storage whatever. It's "output" (woven cloth) is write-only and its "input" (punched cards) is read-only. With no read/write memory, it can't perform even the most basic logic. With no arithmetic unit, it's not even a calculator. It's an example of a "stored program device" - but it's not a computer. SteveBaker (talk) 14:53, 10 February 2011 (UTC)
Does the lack of programmable program storage deny turing-completeness?
No - it does not.
Providing you have writable 'data' memory - then (in principle) you can write (in read-only memory...tape...punched cards...whatever) a program that interprets data that's stored in writeable memory as code. For example, you could write a BASIC interpreter on paper tape and use it to interpret BASIC code that's stored in "data" memory. Even though the interpreter is not modifiable - the program that it's interpreting IS modifiable.
As case-in-point, most modern complex-instruction-set computers (eg the x86 family) are "microcoded" machines. Which is to say that a teeny-tiny microcomputer executes microcode instructions (which are essentially unmodifiable) and interprets the instructions in data memory that are written in x86 machine code. Hence, if you insist that writeable program store is an obstacle to being turing complete - then you're denying that the computer that's sitting in front of you right now is turing-complete!
Hence lack of modifiable program storage is no obstacle to turing-completeness.
QED. Case closed! SteveBaker (talk) 14:40, 10 February 2011 (UTC)
CDC Series had infinity and NaN
The business about Zuse is moot anyway as I was checking for sources and I found the CDC 6600 implemented infinity and NaN. I'm sure I looked at the CDC format before because it was used in setting up the IEEE so I don't know why I didn't spot this before, - anyway the article can note the handling of special values as derived from the CDC as it certainly isn't in the VAX format which was the other source. Sorry about any trouble caused. Dmcq (talk) 02:08, 12 February 2011 (UTC)
- Anyway I've removed the Zuse bit and will have a look at the history section in Floating point before doing anything further here if anything as that other article has the wider scope and is a bit sparse in references. By the way that one refers to the Z1 as 'the first mechanical binary programmable computer'. Dmcq (talk) 11:16, 12 February 2011 (UTC)
Mantissa
Does the actual standard (someone who has bought one?) use the word Mantissa?
I personally prefer Significand, and, if the standard doesn't say Mantissa will change it here. I am not a zealot about it, but do like to see it done right. Gah4 (talk) 21:50, 24 May 2011 (UTC)
- See discussions elsewhere:
- 'Mantissa' was used in this sense as early as 1946 concerning computer floating point. IEEE wants us to use significand but they are not really successful in taking over common usage. Anyway, read the links! It's too bad that 'fraction' didn't win. We'll need to keep fighting off the editors who will come to the article to correct 'significand' to 'significant.' EdJohnston (talk) 22:34, 24 May 2011 (UTC)
Yes, but I was wondering what is actually used in the IEEE 754-1985 document. Gah4 (talk) 02:47, 25 May 2011 (UTC)
- The standard says significand, they don't use the word mantissa. The word fraction is used for one interpretation of the significand. The word fraction is used. If the significand is considered as a digit and fraction then one version of exponent is used which corresponds more closely with the exponent after removing the bias. However the significand may also be regarded as an integer with a different exponent. I hope that hasn't confused things too much! Dmcq (talk) 08:03, 25 May 2011 (UTC)
Just to be sure, you do mean the 1985 version? Gah4 (talk) 21:11, 25 May 2011 (UTC)
- I was actually looking at the 2008 version but I don't believe anything has changed in that area. Dmcq (talk) 22:04, 25 May 2011 (UTC)
External links modified
Hello fellow Wikipedians,
I have just modified one external link on IEEE 754-1985. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
- Added archive https://web.archive.org/web/20070314154031/http://www.coprocessor.info/ to http://www.coprocessor.info/
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}}
(last update: 5 June 2024).
- If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
- If you found an error with any archives or the URLs themselves, you can fix them with this tool.
Cheers.—InternetArchiveBot (Report bug) 05:33, 23 March 2017 (UTC)
External links modified
Hello fellow Wikipedians,
I have just modified one external link on IEEE 754-1985. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
- Added archive https://web.archive.org/web/20101008203307/http://arith.stanford.edu/~hfahmy/webpages/arith_class/arith.pdf to http://arith.stanford.edu/~hfahmy/webpages/arith_class/arith.pdf
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
This message was posted before February 2018. After February 2018, "External links modified" talk page sections are no longer generated or monitored by InternetArchiveBot. No special action is required regarding these talk page notices, other than regular verification using the archive tool instructions below. Editors have permission to delete these "External links modified" talk page sections if they want to de-clutter talk pages, but see the RfC before doing mass systematic removals. This message is updated dynamically through the template {{source check}}
(last update: 5 June 2024).
- If you have discovered URLs which were erroneously considered dead by the bot, you can report them with this tool.
- If you found an error with any archives or the URLs themselves, you can fix them with this tool.
Cheers.—InternetArchiveBot (Report bug) 03:28, 10 November 2017 (UTC)