
1 liuxurong 2012-10-23 18:52:01 +08:00 round? |
2 paloalto 2012-10-23 18:58:26 +08:00 循环得到的结果,然后用正则匹配出符合你要求位数的那个结果。 ps:round是用来限定位数的吧? round(1/3.0,2) --->0.33000000002 print round(1/3.0,2) --->0.33 |
3 rexren 2012-10-24 13:24:57 +08:00 用round限定你需要的位数 然后和原数作比较。 |