Representing integers using doubles in C++

Revision en1, by DCSekhara, 2022-07-07 19:13:57

Suppose we are working in a setting where we only have integers and the operations that we are doing on them are multiply, add, subtract and comparisons between them

In such a scenario is it safe to replace all integers with doubles? (Safe in the sense of precision issues)

Tags c++, precision


  Rev. Lang. By When Δ Comment
en1 English DCSekhara 2022-07-07 19:13:57 322 Initial revision (published)