decimal_for_cpp:C ++的十进制数据类型

时间:2021-04-29 05:32:04
【文件属性】:
文件名称:decimal_for_cpp:C ++的十进制数据类型
文件大小:25KB
文件格式:ZIP
更新时间:2021-04-29 05:32:04
currency money-library decimal-numbers C++ 关于 十进制数据类型支持,用于对货币/货币值进行类似于COBOL的定点运算。 作者:Piotr Likus 创建于:2011年3月1日 修改时间:20/04/18 许可证:BSD 版本:1.18 此数据类型旨在通过即时舍入进行计算并支持正确的比较功能(浮点比较不可靠)。 值使用64位整数在内部存储,因此最大位数为18。 精度是用户定义的,因此可以将此数据类型用于货币汇率。 要在文件中存储小数,可以使用“无偏”功能或使用流I / O。 例子 用法示例: # include " decimal.h " using namespace dec ; using namespace std ; // the following declares currency variable with 2 decimal points // initialized with integer v
【文件预览】:
decimal_for_cpp-master
----.github()
--------workflows()
----tests()
--------decimalTest.cpp(467B)
--------decimalTestIo.cpp(487B)
--------decimalTest.ipp(49KB)
--------runner.cpp(748B)
--------decimalTestIo.ipp(2KB)
----include()
--------decimal.h(57KB)
----doc()
--------license.txt(2KB)
----CMakeLists.txt(782B)
----README.md(5KB)
----build()
--------cb_win()

网友评论