Atry / protoc-gen-as3

Automatically exported from code.google.com/p/protoc-gen-as3
BSD 2-Clause "Simplified" License
55 stars 18 forks source link

浮点数bug #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
在学习您的类库的时候发现传给服务器的浮点数 和 
接收到的浮点数最后几位不一样。100%出现。

Original issue reported on code.google.com by starlizhi on 23 Jan 2013 at 1:47

GoogleCodeExporter commented 9 years ago
你用的浮点是float还是double?

Original comment by pop.atry@gmail.com on 23 Jan 2013 at 3:02

GoogleCodeExporter commented 9 years ago
float.

Original comment by starlizhi on 25 Jan 2013 at 2:08

GoogleCodeExporter commented 9 years ago
通过cpp的protobuff 中转

Original comment by starlizhi on 25 Jan 2013 at 2:08

GoogleCodeExporter commented 9 years ago
大约只能精确到浮点数的第5位。浮点数貌似和整数一样,都�
��内存中的数据而已,怎么会出现精度问题呢?

Original comment by starlizhi on 25 Jan 2013 at 2:16

GoogleCodeExporter commented 9 years ago
不是Bug,浮点数就这样。

Original comment by pop.atry@gmail.com on 25 Jan 2013 at 9:55