Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
double的精度当然是非常低的呀,用BigDecimal吧(无限精度),再转换为string就好了In Reply To:为什么用JAVA计算pow(a,b)得到的结果与 sample output 不一样啊 Posted by:duduniao85 at 2008-01-12 10:06:47 > 如题,例如: > input: > 6.7592 9 > 98.999 10 > 1.0100 12 > > output: > 2.944812676412102E7 > 9.042907274362949E19 > 1.1268250301319698 > > 虽然用的是科学记数法,但为什么'E'前面的数字相差已经这么大了? > 我用的是:a: double类型 b: int类型 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator