5

Why does ceil fail??

 2 years ago
source link: http://codeforces.com/blog/entry/96655
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

A few times while solving a problem where we need to compute ceil values, i have encoured WA when i use ceil(var1/double(var2)) type of expression, for example in this problem a submission of mine was failing on just 2 TCs because of using that expression, and soon as i used a different approach for calculating ceil, i got AC. I wanted to know, what is the fundamental issue behind this inaccuracy?


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK