Click here to Skip to main content
15,904,024 members
Home / Discussions / C#
   

C#

 
AnswerRe: replace strings in file Pin
Guffa29-Jan-07 13:30
Guffa29-Jan-07 13:30 
QuestionListView windows forms Question Urgant Pin
Mustafa Magdy29-Jan-07 11:53
Mustafa Magdy29-Jan-07 11:53 
AnswerRe: ListView windows forms Question Urgant [modified] Pin
Alaric_29-Jan-07 12:03
professionalAlaric_29-Jan-07 12:03 
Questionparsing file Pin
picasso229-Jan-07 11:36
picasso229-Jan-07 11:36 
AnswerRe: parsing file Pin
Stefan Troschuetz29-Jan-07 11:44
Stefan Troschuetz29-Jan-07 11:44 
AnswerRe: parsing file Pin
Luc Pattyn29-Jan-07 11:44
sitebuilderLuc Pattyn29-Jan-07 11:44 
Question(float) problem? Pin
johnacton29-Jan-07 9:45
johnacton29-Jan-07 9:45 
AnswerRe: (float) problem? Pin
Luc Pattyn29-Jan-07 9:59
sitebuilderLuc Pattyn29-Jan-07 9:59 
No this is normal behavior for floats; their size is 32-bit, of which they use about 24 bits
for their mantissa, which amounts to about 7 decimal digits.

If you want more precision, use double; their size is 64-bit, the mantissa uses about 56 bits,
they can hold about 16 decimal digits.

If memory efficiency is important, you may want to store floats, but do intermediate calculations
with doubles.

If your application is financial (or anything else with a limited maximum value, that
requires accurate fractional digits) consider the decimal type.

BTW similar considerations exist in whatever programming language you choose...

Smile | :)


Luc Pattyn

GeneralRe: (float) problem? Pin
johnacton29-Jan-07 10:31
johnacton29-Jan-07 10:31 
AnswerRe: (float) problem? Pin
led mike29-Jan-07 10:00
led mike29-Jan-07 10:00 
AnswerRe: (float) problem? Pin
Dan Neely29-Jan-07 10:50
Dan Neely29-Jan-07 10:50 
QuestionIs there an easy way to check if a column from one table exists in another ? Pin
csharpguyfromde29-Jan-07 9:17
csharpguyfromde29-Jan-07 9:17 
AnswerRe: Is there an easy way to check if a column from one table exists in another ? Pin
Christian Graus29-Jan-07 9:36
protectorChristian Graus29-Jan-07 9:36 
GeneralRe: Is there an easy way to check if a column from one table exists in another ? Pin
csharpguyfromde29-Jan-07 10:04
csharpguyfromde29-Jan-07 10:04 
GeneralRe: Is there an easy way to check if a column from one table exists in another ? Pin
csharpguyfromde31-Jan-07 2:28
csharpguyfromde31-Jan-07 2:28 
Question#import (C# equivelant) Pin
teejayem29-Jan-07 9:02
teejayem29-Jan-07 9:02 
AnswerRe: #import (C# equivelant) Pin
Christian Graus29-Jan-07 9:07
protectorChristian Graus29-Jan-07 9:07 
GeneralRe: #import (C# equivelant) Pin
teejayem29-Jan-07 9:35
teejayem29-Jan-07 9:35 
GeneralRe: #import (C# equivelant) Pin
Christian Graus29-Jan-07 13:30
protectorChristian Graus29-Jan-07 13:30 
AnswerRe: #import (C# equivelant) Pin
Pete O'Hanlon29-Jan-07 9:39
mvePete O'Hanlon29-Jan-07 9:39 
GeneralRe: #import (C# equivelant) Pin
teejayem29-Jan-07 10:02
teejayem29-Jan-07 10:02 
GeneralRe: #import (C# equivelant) Pin
Alaric_29-Jan-07 12:18
professionalAlaric_29-Jan-07 12:18 
GeneralRe: #import (C# equivelant) Pin
Dave Doknjas29-Jan-07 13:07
Dave Doknjas29-Jan-07 13:07 
GeneralRe: #import (C# equivelant) Pin
Christian Graus29-Jan-07 13:30
protectorChristian Graus29-Jan-07 13:30 
GeneralRe: #import (C# equivelant) Pin
Luc Pattyn29-Jan-07 14:17
sitebuilderLuc Pattyn29-Jan-07 14:17 

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.