有没有内置的方法在 C++ 中进行非浮点小数运算?
Is there a built in way to do non floating point decimal operations in c++?
我认为标题描述得足够好,但是有没有一种方法可以在不使用浮点数的情况下对带小数的数字进行算术运算?
Is there a built in way to do non floating point decimal operations in c++?
不,C++ 中没有内置定点算术类型。只有内置算术类型是整数和浮点数。标准库中也没有 类 表示定点类型。
我认为标题描述得足够好,但是有没有一种方法可以在不使用浮点数的情况下对带小数的数字进行算术运算?
Is there a built in way to do non floating point decimal operations in c++?
不,C++ 中没有内置定点算术类型。只有内置算术类型是整数和浮点数。标准库中也没有 类 表示定点类型。