Content deleted Content added
MiszaBot I (talk | contribs) m Robot: Archiving 1 thread from Talk:Floating point. |
MiszaBot I (talk | contribs) m Robot: Archiving 2 threads from Talk:Floating point. |
||
Line 565:
:::It would stop FA status. Have a look at the articles about the individual formats. They describe in quite enough details the format. Any particular algorithm is up to the user, they are not interesting or discussed in secondary sources. [[User:Dmcq|Dmcq]] ([[User talk:Dmcq|talk]]) 10:01, 25 February 2012 (UTC)
:::The closest in Wikipedia for the sort of stuff you're talking about is if somebody wrote something for wikibooks. Have you had a look at the various external sites? Really to me what you're talking about sounds like some homework exercise and we shouldn't help with those except perhaps to give hints. [[User:Dmcq|Dmcq]] ([[User talk:Dmcq|talk]]) 10:20, 25 February 2012 (UTC)
== imho, "real numbers" is didactically misleading ==
I'd like to propose to change the beginning of the first sentence, because the limited amount of bits in the significand only allows for storing rational binary numbers. Because two is a prime factor of ten, this means only rational decimal numbers can be stored as well. Concluding, I'd like to propose to replace "real" by "rational" there.
[[User:Drgst|Drgst]] ([[User talk:Drgst|talk]]) 13:17, 25 February 2012 (UTC)
:Definitely not. That is a bad idea. They are approximations to real numbers. The concept of rational number just doesn't come into it. That they are rational is just a side effect. [[User:Dmcq|Dmcq]] ([[User talk:Dmcq|talk]]) 14:32, 25 February 2012 (UTC)
::In the section 'Some other computer representations for non-integral numbers' there are some systems that can represent some irrational numbers. for instance a logarithmic system does not necessarily represent rational numbers. [[User:Dmcq|Dmcq]] ([[User talk:Dmcq|talk]]) 14:36, 25 February 2012 (UTC)
:::Sorry for the delayed answer, Dmcq, it seems I forgot to tick the "watch page" checkbox... now for the content: IEEE FP numbers definitely are rational numbers. Even the most simple irrational number in the world, i.e. sqrt(2), cannot be represented, e.g. Any mathematical theorem that really depends on the existence of irrational numbers does not hold for the set of FP numbers. Nevertheless, you are right in stating that FP numbers are meant to approximate real numbers. Yet, as no non-rational number can be represented, transcendental numbers are far from being representable. Of course, this has serious consequences: for example, none of these nice trigonometric identities involving pi or pi/2 can be used naively without introducing large errors. This is just a simple example of why I think people should be warned of associating floating point numbers with real numbers.[[User:Drgst|Drgst]] ([[User talk:Drgst|talk]]) 21:14, 27 June 2012 (UTC)
::::"Irrational numbers are those real numbers that cannot be represented as terminating or repeating decimals." --[[Irrational number]] Therefore, irrational numbers ''cannot be exactly represented on any digital computer''. However, you can get arbitrarily close. It really doesn't take all that many bits to handle a Planck length (~10^-35m) and the estimated size of the universe (~10^26m) in the same calculation.
::::The key point here is that floating point really is a method of representing (not perfectly but arbitrarily close) real numbers. Yes, it just so happens that some of them are represented exactly and others are not, but that's not relevant to the fact that FP is a method of representing (imperfectly) real numbers. All of this is covered quite nicely in the "Representable numbers, conversion and rounding" section. No need to make the lead confusing and misleading. --[[User:Guy Macon|Guy Macon]] ([[User talk:Guy Macon|talk]]) 22:48, 27 June 2012 (UTC)
:::::I don't think this is correct "floating point really is a method of representing (not perfectly but arbitrarily close) real numbers". We talk about the "representable numbers" as those real numbers which can be represented exactly within the system. Other real numbers are rounded to some representable number. So I think we should either speak in terms of "working with real numbers" (which seems a little vague) or "representing approximations to real numbers" (as we do later in the article). --[[User:JakeVortex|Jake]] ([[User talk:JakeVortex|talk]]) 08:50, 22 October 2012 (UTC)
::::::You make a good point, but while "working with real numbers" is inexact and vague, "representing approximations to real numbers" is wordy and clumsy. Perhaps we can devise a third alternative? --[[User:Guy Macon|Guy Macon]] ([[User talk:Guy Macon|talk]]) 12:57, 22 October 2012 (UTC)
:::::::What about "approximating real numbers"? But IMHO, "real numbers" is slightly incorrect, because floating point can also be used for complex arithmetic (though a complex number is here seen as a pair of two real numbers). Moreover a floating-point arithmetic is not just about the representation, but also the behavior when doing an operation (e.g. how the result is rounded). So, I would prefer something like: "a method of doing numerical computations" [[User:Vincent Lefèvre|Vincent Lefèvre]] ([[User talk:Vincent Lefèvre|talk]]) 22:09, 22 October 2012 (UTC)
== Guard bits ==
Anybody know where the business of needing three extra bits comes from? For addition one only needs a guard/round digit plus a sticky bit as the sticky bit will always be zero if subtraction means you have to shift up. And for multiplication one needs the double length to cope with carry properly before rounding - but one can still cut that down to two bits before applying the particular rounding. The literaure talks about guard and round and sticky so I'm not disputig putting it in the text, just wondering why people got the idea in their heads in the first place. [[User:Dmcq|Dmcq]] ([[User talk:Dmcq|talk]]) 13:03, 8 March 2012 (UTC)
:Somewhat related: Take a look at "2 vs 3 guard bits" here:
:http://www.engineering.uiowa.edu/~carch/lectures07/55035-070404-prn.pdf
:Also interesting:
:http://www.google.com/patents/US4282582.pdf
:These two searches turn up some interesting pages:
:[http://www.google.com/search?q=%22floating+point%22+%2240+bits%22 <nowiki>http://www.google.com/search?q="floating+point"+"40+bits"</nowiki>]
:[http://www.google.com/search?q=%22floating+point%22+%22eight+guard+bits%22+%22DSP%22 <nowiki>http://www.google.com/search?q="floating+point"+"eight+guard+bits"+"DSP"</nowiki>]
:--[[User:Guy Macon|Guy Macon]] ([[User talk:Guy Macon|talk]]) 00:39, 9 March 2012 (UTC)
::Goldberg gives a discussion of the need for two guard digits in http://www.validlab.com/goldberg/paper.pdf (page 195). There is a very clear description with example cases in: Michael L. Overton (2001). Numerical Computing with IEEE Floating Point Arithmetic. SIAM. [[User:Brianbjparker|Brianbjparker]] ([[User talk:Brianbjparker|talk]]) 06:17, 9 March 2012 (UTC)
:::Very good reference. It should be noted that he not only covers base 10 and guard (decimal) digits but also base 2 and guard bits. --[[User:Guy Macon|Guy Macon]] ([[User talk:Guy Macon|talk]]) 07:02, 9 March 2012 (UTC)
:::I just looked at some implementation I did of the whole business I did ages ago and I did actually use three bits! Just me forgetting what I'd done, sorry. yes the subtraction does actually require them all. [[User:Dmcq|Dmcq]] ([[User talk:Dmcq|talk]]) 11:33, 9 March 2012 (UTC)
|