Skip to content

Conversation

@asensi
Copy link
Contributor

@asensi asensi commented Oct 7, 2025

No description provided.

@cppalliance-bot
Copy link

An automated preview of the documentation is available at https://1097.decimal.prtest3.cppalliance.org/libs/decimal/doc/html/index.html

If more commits are pushed to the pull request, the docs will rebuild at the same URL.

2025-10-07 19:56:57 UTC

Copy link
Member

@mborland mborland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure this is a top line use case. Float-equal warns/errors on this, and clang-tidy gives: "Clang-Tidy: Loop induction expression should not have floating-point type"

@ckormanyos
Copy link
Collaborator

ckormanyos commented Nov 6, 2025

I'm not sure this is a top line use case. Float-equal warns/errors on this, and clang-tidy gives: "Clang-Tidy: Loop induction expression should not have floating-point type

Agreed.

Hi @asensi I think what your expression is mentioning is the use of decimal floating point numbers to exactly represent powers of ten and fractional powers of ten, also added to each other, such as numbers like $101/10$. This number is exact for decimal floating point, but approximated in binary floating point.

Some of the very initial remarks in the documentation touch on this issue.

There might, however, be a benefit to re-iterate it or state more directly the words about powers of ten and combinations thereof.

I'll leave this one up to Matt, perhaps adding even more clarity might help, on the other hand it might be redundant with the already existing initial sections of the docs?

Cc: @mborland

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants