I was writing a problem on polygon and I came across a problem with the std::rcmp9 checker.

Whenever the output doesn't fit in a double variable it gives AC verdict even if the relative error is greater than 1e-9

I tried making my own version and reading the numbers as strings and then casting them as ld and making ld variations of the check functions but the same thing happens and I can't get correct verdicts, could anyone suggest any solutions?

In the example you gave, the checker works correctly. It checks whether

Here, $$$\left| a - b \right| = 0.0000019074 \le 2 \cdot 10^{-6}$$$ while $$$b \ge 10^{10}$$$, so

thank you for clarifying, I thought the error would be calculated as just the difference so this should be considered different if the max error is $$$10^{-6}$$$, but it seems I was wrong. However shouldn't it at least show the difference between them as the error?

Edit:

I get now that it's showing the relative error $$$2.10^{-16}$$$ which is small and it only shows first 9 digits from but what should I do for the cases with ld output

these are the numbers I'm comparingand it's clearly seeing them as wrong numbers