on-internet
← Community

Exact decimal datatype for C++?

Stack Overflow ·

PHP has a decimal type, which doesn't have the "inaccuracy" of floats and doubles, so that 2.5 + 2.5 = 5 and not 4.999999999978325 or something like that. So I wonder if there is such a data type implementation for C or C++?

Comments

Sign in or sign up to comment and upvote.

No comments yet.