#region Millisecond
//
double limit = 6.283185307179586476925286766559d,
h = 0.0000001d,
sum = 0d,
d = 0d;
System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Abs(d);
sum -= System.Math.Abs(d);
}
watch.Stop();
Console.WriteLine(" Abs\t: {0}\t sum : {1}", watch.ElapsedMilliseconds, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Abs(d);
sum -= System.Math.Abs(d);
}
watch.Stop();
Console.WriteLine(" Abs\t: {0}\t sum : {1}", watch.ElapsedMilliseconds, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Exp(d);
sum -= System.Math.Exp(d);
}
watch.Stop();
Console.WriteLine(" Exp\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Sin(d);
sum -= System.Math.Sin(d);
}
watch.Stop();
Console.WriteLine(" Sin\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Cos(d);
sum -= System.Math.Cos(d);
}
watch.Stop();
Console.WriteLine(" Cos\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Tan(d);
sum -= System.Math.Tan(d);
}
watch.Stop();
Console.WriteLine(" Tan\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Sinh(d);
sum -= System.Math.Sinh(d);
}
watch.Stop();
Console.WriteLine(" Sinh\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Cosh(d);
sum -= System.Math.Cosh(d);
}
watch.Stop();
Console.WriteLine(" Cosh\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Tanh(d);
sum -= System.Math.Tanh(d);
}
watch.Stop();
Console.WriteLine(" Tanh\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Sqrt(d);
sum -= System.Math.Sqrt(d);
}
watch.Stop();
Console.WriteLine(" Sqrt\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Exp(d);
sum -= System.Math.Exp(d);
}
watch.Stop();
Console.WriteLine(" Exp\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Sin(d);
sum -= System.Math.Sin(d);
}
watch.Stop();
Console.WriteLine(" Sin\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Cos(d);
sum -= System.Math.Cos(d);
}
watch.Stop();
Console.WriteLine(" Cos\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Tan(d);
sum -= System.Math.Tan(d);
}
watch.Stop();
Console.WriteLine(" Tan\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Sinh(d);
sum -= System.Math.Sinh(d);
}
watch.Stop();
Console.WriteLine(" Sinh\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Cosh(d);
sum -= System.Math.Cosh(d);
}
watch.Stop();
Console.WriteLine(" Cosh\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Tanh(d);
sum -= System.Math.Tanh(d);
}
watch.Stop();
Console.WriteLine(" Tanh\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Sqrt(d);
sum -= System.Math.Sqrt(d);
}
watch.Stop();
Console.WriteLine(" Sqrt\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Exp(d);
sum -= System.Math.Exp(d);
}
watch.Stop();
Console.WriteLine(" Exp\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Sin(d);
sum -= System.Math.Sin(d);
}
watch.Stop();
Console.WriteLine(" Sin\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Cos(d);
sum -= System.Math.Cos(d);
}
watch.Stop();
Console.WriteLine(" Cos\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Tan(d);
sum -= System.Math.Tan(d);
}
watch.Stop();
Console.WriteLine(" Tan\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Sinh(d);
sum -= System.Math.Sinh(d);
}
watch.Stop();
Console.WriteLine(" Sinh\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Cosh(d);
sum -= System.Math.Cosh(d);
}
watch.Stop();
Console.WriteLine(" Cosh\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Tanh(d);
sum -= System.Math.Tanh(d);
}
watch.Stop();
Console.WriteLine(" Tanh\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//
sum = 0d;
watch = new System.Diagnostics.Stopwatch();
watch.Start();
for(d = 0d; d < limit; d += h)
{
sum += System.Math.Sqrt(d);
sum -= System.Math.Sqrt(d);
}
watch.Stop();
Console.WriteLine(" Sqrt\t: {0}\t sum : {1}", watch.ElapsedMilliseconds - 1300, sum);
//*/
#endregion // Millisecond