Re: Problem comparing double values

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Rick Rothstein" <rickNOSPAMnews@xxxxxxxxxxxxxxxxx> wrote in message
news:%23JiSoBjgFHA.1948@xxxxxxxxxxxxxxxxxxxx
> Yes, you could you this approach also. Actually, I like this approach
> better than the epsilon test even if it will probably be ever so
> slightly slower... two function calls instead of one(?). However, I
> wouldn't use the Round function as can produce transitivity problems
> of its own due to its use of Banker's Rounding. Consider this....
>
> Print Round(11.111115, 5), Round(11.111125, 5), Round(11.111135, 5)
>
> Use the Format function instead as that will produce the "correct"
> type of rounding.

If speed is of concern then converting to and from String like that is not
the best idea, especially when wrapping them up in Variants

--
Reply to the group so all can participate
VB.Net: "Fool me once..."

.



Relevant Pages

  • Re: Stop numbers from Rounding
    ... > How do you stop numbers from rounding to whole numbers in Access 2003. ... > NealJH ... I do not reply to personal e-mail ... Prev by Date: ...
    (microsoft.public.access.gettingstarted)
  • I am trying to round up to the nearest 25 cents
    ... I am trying to round a money value to the nearsest 25 cents and it keeps ... rounding to the nearest dollar HELP ... Prev by Date: ...
    (microsoft.public.excel.newusers)
  • Another rounding issue
    ... Here's another rounding issue I just discovered: ... Without preformatting cell D2 it defaults to GENERAL and unexpectedly ... Biff ... Prev by Date: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Voyager 1 8.7 billion miles from Sun
    ... >>> its called rounding off. ... I chose 100 AU's. ... is no dim bulb. ... Prev by Date: ...
    (sci.astro.amateur)
  • Re: How can formulas be used to create another formula?
    ... I have found out what it is, very simple - rounding! ... "JE McGimpsey" wrote: ... >> To be honest it's that simple I can't understand what i'm doing wrong! ... Prev by Date: ...
    (microsoft.public.excel.misc)