Last active
June 30, 2022 17:21
-
-
Save ritalin/9ae1e9d46280428f494bb1b1dd0c3949 to your computer and use it in GitHub Desktop.
Have difference results, why?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Linq; | |
using System; | |
/* | |
In Mono JIT compiler version 6.8.0.105 (Debian 6.8.0.105+dfsg-2 Wed Feb 26 23:23:50 UTC 2020), | |
following expressions have difference results. | |
why? | |
*/ | |
static class Program { | |
static void Main() { | |
long x1 = 33076206526426037; | |
long m1 = 1_000_000_007; | |
long x2 = 33076206526426037; | |
long m2 = 1000000007; | |
Console.WriteLine(x1 % m1); // 206526194505 | |
Console.WriteLine(x2 % m2); // 294892595 | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Mono (mcs) has not supported
digit separator
mono/mono#16648