Click here to Skip to main content
15,910,471 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionUser Control as a Form Container? Pin
JerryTanski12-Feb-04 10:14
JerryTanski12-Feb-04 10:14 
AnswerRe: User Control as a Form Container? Pin
John Kuhn12-Feb-04 17:56
John Kuhn12-Feb-04 17:56 
GeneralFloatToInt32Bits and Int32BitsToFloat Pin
Paul Selormey11-Feb-04 17:06
Paul Selormey11-Feb-04 17:06 
Generaldata Binding Pin
CSharpDavid11-Feb-04 10:17
CSharpDavid11-Feb-04 10:17 
GeneralRe: data Binding Pin
John Kuhn11-Feb-04 17:00
John Kuhn11-Feb-04 17:00 
GeneralControling the sort of datetimes in a DataGrid Pin
KC@CodeProject11-Feb-04 5:15
KC@CodeProject11-Feb-04 5:15 
GeneralFloating point error in .NET Pin
eparkes10-Feb-04 6:25
eparkes10-Feb-04 6:25 
GeneralRe: Floating point error in .NET Pin
Colin Angus Mackay10-Feb-04 6:46
Colin Angus Mackay10-Feb-04 6:46 
I was going to suggest that you should use
Console.WriteLine(a.ToString("r"));

As this would get the round trip value which should display more accurately. But I see the same problem.

Thinking back to my lectures at Uni' (10 years ago now) I recall a C/C++ lecturer suggesting the best way to check for equality in floating point numbers is along these lines (in C#):

public class DoubleEquality
{
    private const MAX_ERROR = 0.0001;
    public static Equals(double a, double b)
    {
        if (Math.abs(a-b) < MAX_ERROR)
            return true;
        return false;
    }
}


You can set MAX_ERROR to be what ever level of precision you need.


EuroCPian Spring 2004 Get Together[^]
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"Get in touch with your Inner Capitalist - I wish you much success!" -- Christopher Duncan, Lounge 9-Feb-2004


GeneralRe: Floating point error in .NET Pin
Nick Parker10-Feb-04 8:35
protectorNick Parker10-Feb-04 8:35 
GeneralRe: Floating point error in .NET Pin
Colin Angus Mackay10-Feb-04 12:47
Colin Angus Mackay10-Feb-04 12:47 
GeneralRe: Floating point error in .NET Pin
Nick Parker10-Feb-04 8:33
protectorNick Parker10-Feb-04 8:33 
GeneralDatabase connectivity for J# browser Controls Pin
8-Feb-04 23:08
suss8-Feb-04 23:08 
GeneralReal Time Loops in Managed C++ .NET Pin
Tank_Aviator8-Feb-04 11:49
Tank_Aviator8-Feb-04 11:49 
GeneralProblems with a text box & changing alignment in the leave event. Pin
adarobwpg7-Feb-04 21:03
adarobwpg7-Feb-04 21:03 
GeneralRe: Problems with a text box &amp; changing alignment in the leave event. Pin
Gerald Leslie Jones10-Feb-04 1:32
Gerald Leslie Jones10-Feb-04 1:32 
GeneralRe: Problems with a text box &amp; changing alignment in the leave event. Pin
Steve S10-Feb-04 1:40
Steve S10-Feb-04 1:40 
GeneralProblem setting enum field value using Remoting Pin
claughlin6-Feb-04 6:16
claughlin6-Feb-04 6:16 
GeneralRe: Problem setting enum field value using Remoting Pin
Gerald Leslie Jones10-Feb-04 1:23
Gerald Leslie Jones10-Feb-04 1:23 
GeneralRe: Problem setting enum field value using Remoting Pin
ClarkLaughlin10-Feb-04 5:15
ClarkLaughlin10-Feb-04 5:15 
GeneralProblems with the .Net forms designer Pin
Christian Skovdal Andersen6-Feb-04 1:55
Christian Skovdal Andersen6-Feb-04 1:55 
Generalmaking a slow progam run faster Pin
Tank_Aviator5-Feb-04 19:31
Tank_Aviator5-Feb-04 19:31 
GeneralRe: making a slow progam run faster Pin
Corinna John8-Feb-04 21:27
Corinna John8-Feb-04 21:27 
GeneralRaw Sockets with TCP in C# Pin
Andy *M*5-Feb-04 13:00
Andy *M*5-Feb-04 13:00 
GeneralGUID_NULL identifier not found error... Pin
adonisv5-Feb-04 9:51
adonisv5-Feb-04 9:51 
GeneralWhy no more CDaoRecordset Class Wizard Pin
harwanegg4-Feb-04 22:37
harwanegg4-Feb-04 22:37 

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.