Talk:Generalised floating point addition: Difference between revisions

Content added Content deleted
Line 62: Line 62:


: I am currently not doing BCD at all -- I do not see any point in using BCD -- I have explained this, and I am asking why because I do not see the point. I could change from multiplication to repeated addition, and it still would not be testing BCD carry. I also do not know what "template" means -- I might already be doing that, or it might be trivial. Anyways, if the task is going to require BCD shouldn't it include something that demonstrates that BCD is in use? (Though, honestly, I cannot imagine anything that actually requires the use of BCD.) Maybe if you ask for intermediate results on the addition though? --[[User:Rdm|Rdm]] 00:53, 31 October 2011 (UTC)
: I am currently not doing BCD at all -- I do not see any point in using BCD -- I have explained this, and I am asking why because I do not see the point. I could change from multiplication to repeated addition, and it still would not be testing BCD carry. I also do not know what "template" means -- I might already be doing that, or it might be trivial. Anyways, if the task is going to require BCD shouldn't it include something that demonstrates that BCD is in use? (Though, honestly, I cannot imagine anything that actually requires the use of BCD.) Maybe if you ask for intermediate results on the addition though? --[[User:Rdm|Rdm]] 00:53, 31 October 2011 (UTC)

I confess that I cannot think of much used for BCD, hence it is on the '''test case'''. I was even surprised to find that [[wp:IEEE_754-2008#Basic_formats|IEEE_754 Basic_formats]] has [[wp:Decimal128_floating-point_format|Decimal128 floating-point format]].
From wikipedia: http://en.wikipedia.org/wiki/Binary-coded_decimal
: BCD's main virtue is ease of conversion between machine- and human-readable formats, as well as a more precise machine-format representation of decimal quantities. As compared to typical binary formats, BCD's principal drawbacks are a small increase in the complexity of the circuits needed to implement basic mathematical operations and less efficient usage of storage facilities.

: BCD was used in many early decimal computers. Although BCD is not as widely used as in the past, decimal fixed-point and floating-point formats are still important and continue to be used in financial, commercial, and industrial computing, where subtle conversion and rounding errors that are inherent to floating point binary representations cannot be tolerated.

¢ On bit of a tangent, here is an interesting link: [http://articles.cnn.com/1999-09-30/tech/9909_30_mars.metric_1_mars-orbiter-climate-orbiter-spacecraft-team?_s=PM:TECH NASAs metric confusion caused Mars orbiter loss]. The problem wasn't because they used BCD (which I very much doubt they did). More it is an example of where ''"subtle conversion and rounding errors"'' can do more then rob bank customers of a cent of two at the end of each month. ¢

My interest lies more in "Binary Coded Billions", also manipulation of polynomials, vectors etc. All of these include patterns for addition and manipulation of arrays of overlapping terms. But the same general code should also work for the more mundane BCD. This makes BCD a good test case.

Your point about "shouldn't it include something that demonstrates that BCD is in use?" is well taken. I have found an example in wikipedia's [[wp:Long division|Long division]] , eg [[wp:Image:LongDivisionAnimated.gif | LongDivisionAnimated.gif]]. Alas no such animated gif for long addition. Maybe you could create an appropriate animated gif?

[[User:NevilleDNZ|NevilleDNZ]] 02:44, 31 October 2011 (UTC)