Click here to Skip to main content
15,921,646 members
Home / Discussions / C#
   

C#

 
GeneralRe: Simple calculator using ASP.NET Pin
coolgoose1331-Jan-07 5:01
coolgoose1331-Jan-07 5:01 
QuestionDiagramming Component Pin
Ranjan Banerji29-Jan-07 13:19
Ranjan Banerji29-Jan-07 13:19 
QuestionInherited default values Pin
Chris_McGrath29-Jan-07 13:15
Chris_McGrath29-Jan-07 13:15 
AnswerRe: Inherited default values Pin
Martin#29-Jan-07 22:19
Martin#29-Jan-07 22:19 
GeneralRe: Inherited default values Pin
Chris_McGrath30-Jan-07 12:54
Chris_McGrath30-Jan-07 12:54 
GeneralRe: Inherited default values Pin
Martin#30-Jan-07 19:51
Martin#30-Jan-07 19:51 
QuestionAdding the Application Output to the Installer Package Pin
Eyungwah29-Jan-07 12:24
Eyungwah29-Jan-07 12:24 
Questionreplace strings in file Pin
netJP12L29-Jan-07 12:08
netJP12L29-Jan-07 12:08 
AnswerRe: replace strings in file Pin
Luc Pattyn29-Jan-07 13:30
sitebuilderLuc Pattyn29-Jan-07 13:30 
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 

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.