Click here to Skip to main content
15,885,244 members
Home / Discussions / C#
   

C#

 
GeneralRe: Listbox colours. Pin
Septimus Hedgehog26-Feb-13 22:59
Septimus Hedgehog26-Feb-13 22:59 
GeneralRe: Listbox colours. Pin
Dave Kreskowiak27-Feb-13 1:01
mveDave Kreskowiak27-Feb-13 1:01 
GeneralRe: Listbox colours. Pin
Septimus Hedgehog27-Feb-13 5:39
Septimus Hedgehog27-Feb-13 5:39 
Questioncan floats be multiplied and come up with a fraction? Pin
notahack26-Feb-13 6:01
notahack26-Feb-13 6:01 
AnswerRe: can floats be multiplied and come up with a fraction? Pin
Richard Deeming26-Feb-13 6:15
mveRichard Deeming26-Feb-13 6:15 
AnswerRe: can floats be multiplied and come up with a fraction? Pin
Richard MacCutchan26-Feb-13 6:26
mveRichard MacCutchan26-Feb-13 6:26 
AnswerRe: can floats be multiplied and come up with a fraction? Pin
notahack26-Feb-13 6:35
notahack26-Feb-13 6:35 
GeneralRe: can floats be multiplied and come up with a fraction? Pin
Richard Deeming26-Feb-13 7:39
mveRichard Deeming26-Feb-13 7:39 
notahack wrote:
microsoft says a float has a range of -3.4 × 10^38 to +3.4 × 10^38

Microsoft also says that float has a precision of seven digits.

Remember that a floating-point number can only approximate a decimal number, and that the precision of a floating-point number determines how accurately that number approximates a decimal number. By default, a Single value contains only 7 decimal digits of precision, although a maximum of 9 digits is maintained internally. The precision of a floating-point number has several consequences:
  • Two floating-point numbers that appear equal for a particular precision might not compare equal because their least significant digits are different.
  • A mathematical or comparison operation that uses a floating-point number might not yield the same result if a decimal number is used because the floating-point number might not exactly approximate the decimal number.
  • A value might not roundtrip if a floating-point number is involved. A value is said to roundtrip if an operation converts an original floating-point number to another form, an inverse operation transforms the converted form back to a floating-point number, and the final floating-point number is equal to the original floating-point number. The roundtrip might fail because one or more least significant digits are lost or changed in a conversion.




notahack wrote:
in vb6 20031010 * .86 returns 1.722667E+07

And in C#, 20031010f * .86f returns 1.722667E+07. What's the problem? Confused | :confused:



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer


GeneralRe: can floats be multiplied and come up with a fraction? Pin
notahack26-Feb-13 7:44
notahack26-Feb-13 7:44 
GeneralRe: can floats be multiplied and come up with a fraction? Pin
Richard Deeming26-Feb-13 8:03
mveRichard Deeming26-Feb-13 8:03 
GeneralRe: can floats be multiplied and come up with a fraction? Pin
notahack26-Feb-13 8:13
notahack26-Feb-13 8:13 
GeneralRe: can floats be multiplied and come up with a fraction? Pin
Dave Kreskowiak26-Feb-13 9:03
mveDave Kreskowiak26-Feb-13 9:03 
GeneralRe: can floats be multiplied and come up with a fraction? Pin
Dave Kreskowiak26-Feb-13 8:58
mveDave Kreskowiak26-Feb-13 8:58 
QuestionC# EF5 List<ENum> Persisting ? Pin
Khorne26-Feb-13 4:01
Khorne26-Feb-13 4:01 
AnswerRe: C# EF5 List<ENum> Persisting ? Pin
Ssyxz26-Feb-13 15:14
Ssyxz26-Feb-13 15:14 
GeneralRe: C# EF5 List<ENum> Persisting ? Pin
Khorne26-Feb-13 20:41
Khorne26-Feb-13 20:41 
AnswerRe: C# EF5 List<ENum> Persisting ? Pin
Jegan Thiyagesan27-Feb-13 6:42
Jegan Thiyagesan27-Feb-13 6:42 
QuestionNeed code Pin
jelintaric25-Feb-13 22:41
jelintaric25-Feb-13 22:41 
AnswerRe: Need code Pin
Manfred Rudolf Bihy25-Feb-13 23:06
professionalManfred Rudolf Bihy25-Feb-13 23:06 
AnswerRe: Need code Pin
Mycroft Holmes25-Feb-13 23:43
professionalMycroft Holmes25-Feb-13 23:43 
AnswerRe: Need code Pin
Amir Mohammad Nasrollahi29-Jul-13 21:33
professionalAmir Mohammad Nasrollahi29-Jul-13 21:33 
Questionformatting issue with iTextSharp Pin
krishnapnv25-Feb-13 19:10
krishnapnv25-Feb-13 19:10 
QuestionRe: formatting issue with iTextSharp Pin
Richard MacCutchan25-Feb-13 21:55
mveRichard MacCutchan25-Feb-13 21:55 
AnswerRe: formatting issue with iTextSharp Pin
krishnapnv28-Feb-13 18:03
krishnapnv28-Feb-13 18:03 
Questionexport or save as pdf format Pin
abhishek91111925-Feb-13 17:50
abhishek91111925-Feb-13 17:50 

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.