// Collection of code snippets by Arne Vajhøj // (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) using System; namespace E { public class Program { public static void Main(string[] args) { double x = 1; double y = x/1000000+1; double z = 1000000*y-1000000; Console.WriteLine(z); Console.WriteLine(z % 1); Console.WriteLine(z % 1 == 0); Console.WriteLine(Math.Abs(z - Math.Round(z)) < 0.0000001); } } }