Sqrt function malfunctioning

Revision en2, by NeverMa573r, 2023-09-10 08:08:20

What is the difference between the prewritten sqrt function that I used here : https://mirror.codeforces.com/contest/1737/submission/222667221 and my own written sqrt function that I wrote here : https://mirror.codeforces.com/contest/1737/submission/222667916?

I understand stuff about precision and things like that, but I'm just rounding down, so even if something is like 2.0000067 it should still yield the correct answer. Please explain! I feel like this just happens over and over again: everytime I use sqrt(x) it always fails to get AC and I have to write my own sqrt function, even if my algo is correct.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English NeverMa573r 2023-09-10 08:08:20 0 (published)
en1 English NeverMa573r 2023-09-10 08:08:09 633 Initial revision (saved to drafts)