Re: Paranoic about real number imprecisions
From: Nicholas Paldino [.NET/C# MVP] (mvp_at_spam.guard.caspershouse.com)
Date: 08/27/04
- Next message: John Smith: "Using Null in DateTimePickers"
- Previous message: Nicholas Paldino [.NET/C# MVP]: "Re: Why there is no option to set the source (local) address for HttpWebRequest?"
- In reply to: Zürcher See: "Re: Paranoic about real number imprecisions"
- Next in thread: Jon Skeet [C# MVP]: "Re: Paranoic about real number imprecisions"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 27 Aug 2004 09:00:18 -0400
You can not count on double, as it has the same problem that a float
has.
You should use the Decimal type. It will store numbers with a large
amount of decimal places accurately.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
"Zürcher See" <aquila@cannabismail.com> wrote in message
news:%23Tq2P9CjEHA.3536@TK2MSFTNGP12.phx.gbl...
> Once I had the same problem, I have to calculate some value and compare
> them,
> with float I have always precision errors, with double never.
>
>
> "Pavils Jurjans" <pavils@mailbox.riga.lv> schrieb im Newsbeitrag
> news:OKK5QmCjEHA.3944@tk2msftngp13.phx.gbl...
>> > Why you don't use double?
>>
>> Using double type will not save from this problem.
>>
>> Pavils
>>
>>
>
>
- Next message: John Smith: "Using Null in DateTimePickers"
- Previous message: Nicholas Paldino [.NET/C# MVP]: "Re: Why there is no option to set the source (local) address for HttpWebRequest?"
- In reply to: Zürcher See: "Re: Paranoic about real number imprecisions"
- Next in thread: Jon Skeet [C# MVP]: "Re: Paranoic about real number imprecisions"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|