Skip to content

Instantly share code, notes, and snippets.

@ritalin
Last active June 30, 2022 17:21
Show Gist options
  • Save ritalin/9ae1e9d46280428f494bb1b1dd0c3949 to your computer and use it in GitHub Desktop.
Save ritalin/9ae1e9d46280428f494bb1b1dd0c3949 to your computer and use it in GitHub Desktop.
Have difference results, why?
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
}
}
@ritalin
Copy link
Author

ritalin commented Jun 30, 2022

Mono (mcs) has not supported digit separator
mono/mono#16648

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment