Talk:Binary-coded decimal

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Rounding[edit]

The "Advantages" section says:

  • Addition and subtraction in decimal do not require rounding.

I am not sure what this is supposed to mean. If you're adding or subtracting two fixed-point numbers of the same precision, no rounding is required in any base. Though of course there's the possibility of overflow. If on the other hand you're adding or subtracting two floating-point numbers of the same precision, you need to round. For example, 2.3e0 + 5.1e-2 in decimal floating point should yield the rounded result 2.4e0. I will tag this point with dubious to encourage discussion. --Macrakis (talk) 19:02, 7 November 2021 (UTC)[reply]

I'm wondering if the original writer's intent was to say that "addition and subtraction in fixed-point as opposed to floating-point does not require rounding". If that's the case this bullet in the list should probably be removed. Like @Macrakis pointed out, that's a general statement about fixed-point vs floating-point and not specific to binary-coded decimal. Inquisitive Dev (talk) 06:56, 21 June 2022 (UTC)[reply]
It is a strange way to say it, and I wouldn't mind removing it. Note that many exact decimal fractions are repeating fractions in other bases. 0.1 is nice in decimal, but is rounded to the nearest value in a finite number of bits, in binary. Gah4 (talk) 19:49, 21 June 2022 (UTC)[reply]

this phrase at the start of the article makes no sense[edit]

"However, decimal fixed-point and floating-point formats are still important and continue to be used in financial, commercial, and industrial computing, where the subtle conversion and fractional rounding errors that are inherent in floating point binary representations cannot be tolerated."

floating point format is still used... where its its rounding errors cannot be tolerated? — Preceding unsigned comment added by 189.6.25.85 (talk) 13:05, 12 January 2022 (UTC)[reply]

IEEE 754 now supports float decimal formats, and IBM (at least) has implemented them in hardware. There is some suggestion that they are there for financial reasons, but I don't believe that is true. Fixed decimal, yes. According to Donald Knuth finance and typesetting should be done in fixed point. And yes some finance calculations depend on decimal rounding, though not hard to do in binary. Gah4 (talk) 22:27, 12 January 2022 (UTC)[reply]
I agree that sentence *sounds* like a self-contradition. It also *seems* to imply that "formats" are somehow different from "representations", although they are synonyms in this article.
I think this sentence was intended to distinguish between (as Gah4 points out) "decimal floating-point formats" vs. "binary floating-point formats", so I tried to clarify it to say something more like
"decimal floating-point formats are still ... used ... where ... errors that are inherent in binary floating point formats cannot be tolerated."
Other places in this article still seem to imply that "binary representations", "decimal representations", "decimal formats", "binary formats" are four different things. Would it make this article easier to understand if it (a) explicitly said "representation" is a synonym for "format" in this article, or (b) avoided ever using "representation", using "format" instead, or (c) avoid ever using "format", using "representation" instead? --DavidCary (talk) 19:36, 11 June 2022 (UTC)[reply]
I suppose that there is a small difference between format and representation, but maybe small enough not to notice. Gah4 (talk) 21:56, 11 June 2022 (UTC)[reply]

Editing for tone and clarity[edit]

The current state of the article has been flagged by Wikipedia as a C-Class. (Wikipedia:Content assessment) I will be working on this article for the next few weeks to raise these standards.

My focus will be to make bold and frequent edits to close gaps in content and solve cleanup problems through structure and reorganization of information. BMarie 212 (talk) 22:26, 16 March 2024 (UTC)[reply]