// 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 MainClass { public static void Main(string[] args) { for(int i = 0; i < 25; i++) { double x = 2*Math.PI*Math.Pow(10,i); double y = 0; long t1 = DateTime.Now.Ticks; for(int j = 0; j < 1000000; j++) { y = Math.Cos(x); } long t2 = DateTime.Now.Ticks; Console.WriteLine(i + " " + y + " " + (t2 - t1)/10000000.0); } Console.ReadLine(); } } }