Click here to Skip to main content
15,886,963 members
Home / Discussions / C#
   

C#

 
AnswerRe: Backgroundworker Thread Issue Pin
Ian Shlasko20-Jul-12 7:39
Ian Shlasko20-Jul-12 7:39 
AnswerMessage Closed PinPopular
20-Jul-12 7:56
WebMaster20-Jul-12 7:56 
GeneralRe: Backgroundworker Thread Issue Pin
munishk21-Jul-12 3:50
munishk21-Jul-12 3:50 
AnswerRe: Backgroundworker Thread Issue Pin
DaveyM6920-Jul-12 7:56
professionalDaveyM6920-Jul-12 7:56 
AnswerRe: Backgroundworker Thread Issue Pin
Sunil P V20-Jul-12 20:33
Sunil P V20-Jul-12 20:33 
GeneralRe: Backgroundworker Thread Issue Pin
munishk21-Jul-12 3:50
munishk21-Jul-12 3:50 
GeneralRe: Backgroundworker Thread Issue Pin
Sunil P V21-Jul-12 18:51
Sunil P V21-Jul-12 18:51 
QuestionProblem with Math.Tan Function Pin
computerpublic20-Jul-12 6:12
computerpublic20-Jul-12 6:12 
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Testing_Trig
{
    class Program
    {
        static void Main(string[] args)
        {
            Double Radian = (Math.PI / 180);
            Double count = 0;
            int[] array = {1,0};
            for (int i = 0; i < 2; i++)
            {
                if (array[i] == 1) count += Math.Tan(Radian);//POSITIVE COUNT = 0.0174550649282176
                if (array[i] == 0) count += Math.Tan(-Radian);//NEGATIVE COUNT = -0.0174550649282176
            }
            //EXPECTING POSITVE AND NEGATIVE TO CANCELL EACH OTHER AND COUNT = 0, BUT GOT THE FOLLOWING:
            Console.WriteLine("count = {0}", count);//I DON'T UNDERSTAND WHY = -4.06575814682064E-20
            //I REALLY NEED TO UNDERSTAND WHAT HAPPEN. CAN SOMEONE PLEASE EXPLAIN?
        }
    }
}

AnswerRe: Problem with Math.Tan Function Pin
BobJanova20-Jul-12 6:20
BobJanova20-Jul-12 6:20 
GeneralRe: Problem with Math.Tan Function Pin
computerpublic20-Jul-12 6:22
computerpublic20-Jul-12 6:22 
GeneralRe: Problem with Math.Tan Function Pin
computerpublic20-Jul-12 6:30
computerpublic20-Jul-12 6:30 
GeneralRe: Problem with Math.Tan Function Pin
BobJanova22-Jul-12 22:56
BobJanova22-Jul-12 22:56 
GeneralRe: Problem with Math.Tan Function Pin
lewax0020-Jul-12 7:11
lewax0020-Jul-12 7:11 
GeneralRe: Problem with Math.Tan Function Pin
computerpublic20-Jul-12 7:33
computerpublic20-Jul-12 7:33 
GeneralRe: Problem with Math.Tan Function Pin
lewax0020-Jul-12 7:57
lewax0020-Jul-12 7:57 
GeneralRe: Problem with Math.Tan Function Pin
djdanlib20-Jul-12 10:48
djdanlib20-Jul-12 10:48 
GeneralRe: Problem with Math.Tan Function Pin
Dave Kreskowiak20-Jul-12 13:17
mveDave Kreskowiak20-Jul-12 13:17 
GeneralMessage Closed Pin
20-Jul-12 6:28
WebMaster20-Jul-12 6:28 
GeneralRe: Problem with Math.Tan Function Pin
lewax0020-Jul-12 6:55
lewax0020-Jul-12 6:55 
AnswerRe: Problem with Math.Tan Function Pin
SledgeHammer0120-Jul-12 8:16
SledgeHammer0120-Jul-12 8:16 
QuestionReturning Huge XML data from procedure Pin
AB777120-Jul-12 0:03
AB777120-Jul-12 0:03 
AnswerRe: Returning Huge XML data from procedure Pin
Bernhard Hiller20-Jul-12 1:07
Bernhard Hiller20-Jul-12 1:07 
GeneralRe: Returning Huge XML data from procedure Pin
AB777120-Jul-12 4:19
AB777120-Jul-12 4:19 
GeneralRe: Returning Huge XML data from procedure Pin
jschell20-Jul-12 7:38
jschell20-Jul-12 7:38 
Questiondisplay both in console and text file Pin
Member 916988719-Jul-12 21:07
Member 916988719-Jul-12 21:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.