Click here to Skip to main content
15,889,838 members
Home / Discussions / C#
   

C#

 
QuestionFloating Point Calculations - c# vs. c++ Pin
User 1106097922-May-19 6:50
User 1106097922-May-19 6:50 
GeneralRe: Floating Point Calculations - c# vs. c++ PinPopular
harold aptroot22-May-19 7:00
harold aptroot22-May-19 7:00 
GeneralRe: Floating Point Calculations - c# vs. c++ Pin
User 1106097922-May-19 7:24
User 1106097922-May-19 7:24 
GeneralRe: Floating Point Calculations - c# vs. c++ Pin
CPallini22-May-19 23:01
mveCPallini22-May-19 23:01 
GeneralRe: Floating Point Calculations - c# vs. c++ Pin
User 1106097923-May-19 8:38
User 1106097923-May-19 8:38 
GeneralRe: Floating Point Calculations - c# vs. c++ Pin
kalberts29-May-19 5:21
kalberts29-May-19 5:21 
GeneralRe: Floating Point Calculations - c# vs. c++ Pin
User 1106097929-May-19 5:42
User 1106097929-May-19 5:42 
AnswerRe: Floating Point Calculations - c# vs. c++ Pin
#realJSOP24-May-19 0:07
mve#realJSOP24-May-19 0:07 
Back in the day, I wrote a method called AlmostEqual to compare floating point values to a specified precision. I've found that as long as you don't do math on the value, it will remain as it was set, so given the following:

C#
double x = 0.01d;
double y = 0.01d;
The expression if (x == y) will always evaluate to true.

However, if you to this:
C#
x = x * 1.0d
the expression above will evaluate to false.
".45 ACP - because shooting twice is just silly" - JSOP, 2010
-----
You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010
-----
When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013

GeneralRe: Floating Point Calculations - c# vs. c++ Pin
User 1106097924-May-19 5:40
User 1106097924-May-19 5:40 
QuestionPython str.extract to c# (regex?) Pin
Member 1441807322-May-19 2:15
Member 1441807322-May-19 2:15 
AnswerRe: Python str.extract to c# (regex?) Pin
Nathan Minier22-May-19 2:40
professionalNathan Minier22-May-19 2:40 
GeneralRe: Python str.extract to c# (regex?) Pin
Member 1441807323-May-19 3:56
Member 1441807323-May-19 3:56 
QuestionComboBox not refreshing error. Pin
Khandkar Asif Hossain21-May-19 9:20
Khandkar Asif Hossain21-May-19 9:20 
AnswerRe: ComboBox not refreshing error. Pin
Richard Deeming21-May-19 9:28
mveRichard Deeming21-May-19 9:28 
GeneralRe: ComboBox not refreshing error. Pin
Khandkar Asif Hossain22-May-19 7:40
Khandkar Asif Hossain22-May-19 7:40 
AnswerRe: ComboBox not refreshing error. Pin
Luc Pattyn21-May-19 9:36
sitebuilderLuc Pattyn21-May-19 9:36 
QuestionResize all controls on a user control or form automatically with changing of user control or form Pin
Member 1332584617-May-19 16:47
Member 1332584617-May-19 16:47 
AnswerRe: Resize all controls on a user control or form automatically with changing of user control or form Pin
OriginalGriff17-May-19 19:26
mveOriginalGriff17-May-19 19:26 
GeneralRe: Resize all controls on a user control or form automatically with changing of user control or form Pin
Member 1332584618-May-19 4:43
Member 1332584618-May-19 4:43 
GeneralRe: Resize all controls on a user control or form automatically with changing of user control or form Pin
OriginalGriff18-May-19 4:58
mveOriginalGriff18-May-19 4:58 
GeneralRe: Resize all controls on a user control or form automatically with changing of user control or form Pin
Member 1332584618-May-19 11:06
Member 1332584618-May-19 11:06 
GeneralRe: Resize all controls on a user control or form automatically with changing of user control or form Pin
OriginalGriff18-May-19 20:57
mveOriginalGriff18-May-19 20:57 
GeneralRe: Resize all controls on a user control or form automatically with changing of user control or form Pin
Member 1332584619-May-19 17:09
Member 1332584619-May-19 17:09 
GeneralRe: Resize all controls on a user control or form automatically with changing of user control or form Pin
Dave Kreskowiak20-May-19 2:37
mveDave Kreskowiak20-May-19 2:37 
AnswerRe: Resize all controls on a user control or form automatically with changing of user control or form Pin
#realJSOP18-May-19 1:06
mve#realJSOP18-May-19 1:06 

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.