Talk:Convert decimal number to rational: Difference between revisions

Content added Content deleted
(→‎inaccuracies: added human-centric vs. machine-centric comments, CBLF arithmetic. -- ~~~~)
(details...)
Line 53: Line 53:


:: No, not all floating point is represented in powers of two; Intel (and others) have floating point decimal instructions (but hardly anybody uses it as far as I know, PL/I may be the exception as far as languages, and I haven't looked at what PL/I uses on non-IBM hardware). I believe '''C''' has a mention of it in the language definition, but I don't believe any '''C''' language implemented it (I'm not a '''C''' expert, --- hell's bells, I'm not even a novice, but I can spell it). The REXX language uses base ten floating-point numbers, no matter what the underlying hardware can or does use. The mantissa is only limited (in REXX) by how large one wishes to make it. There is no hardware constrained limits of 16, 32, 64, 128, 256, ... 4096 ... The REXX language for the most part in regards to expressing numbers and performing arithmetic, endeavors to be human-centric, not machine-centric. It does arithmatic very much like a sentient CBLF would (that has ten fingers). (er, ... carbon-based life form.) -- [[User:Gerard Schildberger|Gerard Schildberger]] 20:51, 13 August 2012 (UTC)
:: No, not all floating point is represented in powers of two; Intel (and others) have floating point decimal instructions (but hardly anybody uses it as far as I know, PL/I may be the exception as far as languages, and I haven't looked at what PL/I uses on non-IBM hardware). I believe '''C''' has a mention of it in the language definition, but I don't believe any '''C''' language implemented it (I'm not a '''C''' expert, --- hell's bells, I'm not even a novice, but I can spell it). The REXX language uses base ten floating-point numbers, no matter what the underlying hardware can or does use. The mantissa is only limited (in REXX) by how large one wishes to make it. There is no hardware constrained limits of 16, 32, 64, 128, 256, ... 4096 ... The REXX language for the most part in regards to expressing numbers and performing arithmetic, endeavors to be human-centric, not machine-centric. It does arithmatic very much like a sentient CBLF would (that has ten fingers). (er, ... carbon-based life form.) -- [[User:Gerard Schildberger|Gerard Schildberger]] 20:51, 13 August 2012 (UTC)

::: Sorry, yes -- I assumed IEEE-754 floating point, as opposed to some other variation. And, yes, the term is general enough to cover all sorts of implementations. Still, that doesn't change the fundamental issue here -- which is that floating point is an approximation unless explicitly declared otherwise. If anything, it reinforces that conclusion (since it requires that the details of the floating point implementation be fixed before we can have a case where floating point is not an approximation). --[[User:Rdm|Rdm]] 21:08, 13 August 2012 (UTC)