What is a fixed point integer?

断了今生、忘了曾经 提交于 2020-01-07 04:18:23

问题


In http://microformats.org/wiki/hreview-aggregate

it says:

rating. required. fixed point integer [1.0-5.0], with optional alternate worst (default:1.0) and/or best (default:5.0), also fixed point integers, and explicit average.

What is a fixed point integer? Maybe that means integer? Why is 1.0 or 2.5 or 5.0 also called a "fixed point integer"? Because integer has no decimal part.


回答1:


As cdhowie said, they likely mean fixed point number

To answer you question with that adjustment to the original statement, a fixed point number is one with a finite amount of decimal precision. This precision is guaranteed. If you may or may not be aware, floating point numbers used a complex approximation system to store the value which leads to the interesting results you sometimes see. 1.01 for example actually evaluating as 1.00999999999999998

A fixed point value has guaranteed accuracy to a specific number of digits after the decimal.

You can find more information on theory and implementation of fixed point values here: http://en.wikipedia.org/wiki/Fixed-point_arithmetic




回答2:


They have their terminology wrong. They meant fixed-point number, not integer.



来源:https://stackoverflow.com/questions/4231179/what-is-a-fixed-point-integer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!