Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

double的精度当然是非常低的呀,用BigDecimal吧(无限精度),再转换为string就好了

Posted by ecjtubaowp at 2008-01-12 10:49:02 on Problem 1001
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator