When I input this in wolfram I get false
-347 mod 6 = 5
When I input this I get true
-347 mod 6 = 1
And yet I know
$-5 \equiv 1$
And additionally
$-6*57 - 5 = -347$
but
$-6*57 - 1 \neq -347$
So it's strange that Wolfram's answer is true for +1
Why does Wolfram answer it that way?