[英]Is there a built in way to do non floating point decimal operations in c++?
I think the title describes what I want well enough, but is there a way to do arithmetic on numbers with decimals without using floats?我认为标题很好地描述了我想要的东西,但是有没有办法在不使用浮点数的情况下对带小数的数字进行算术运算?
Is there a built in way to do non floating point decimal operations in c++?
在 c++ 中是否有内置方法来执行非浮点十进制运算?
No, there are no fixed point arithmetic types built in C++.不,C++ 中没有内置定点算术类型。 Only built in arithmetic types are integers, and floating point.
只有内置的算术类型是整数和浮点数。 There are no classes for representing fixed point types in the standard library either.
标准库中也没有表示定点类型的类。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.