We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
有两个问题:
目前c/lua版本的实现不正确:现在定点数的内部实现,是用double,还是会丢失精度,并没有正确实现定点数。c23 会增加 Decimal floating-point types (https://en.cppreference.com/w/c/23) ,真有定点数的需求,可以考虑用decimal重新实现。
与double类型功能重合了。sproto目前已经支持double,可以取代定点数。当移植到go这种强类型语言时,很纠结到底用double还是decimal(第三方类型)表示定点数。如果使用double表示定点数,和c/lua版本一致,但本质上和double其实也没区别了。
The text was updated successfully, but these errors were encountered:
double 表示定点数并不丢失精度。
Sorry, something went wrong.
No branches or pull requests
有两个问题:
目前c/lua版本的实现不正确:现在定点数的内部实现,是用double,还是会丢失精度,并没有正确实现定点数。c23 会增加 Decimal floating-point types (https://en.cppreference.com/w/c/23) ,真有定点数的需求,可以考虑用decimal重新实现。
与double类型功能重合了。sproto目前已经支持double,可以取代定点数。当移植到go这种强类型语言时,很纠结到底用double还是decimal(第三方类型)表示定点数。如果使用double表示定点数,和c/lua版本一致,但本质上和double其实也没区别了。
The text was updated successfully, but these errors were encountered: