Re: On the complexity of determining whether n numbers are distinct



"eKo1" <berndlosert@xxxxxxxxxxxx> writes:

OH!? That's interesting. Is it because

It's because we don't know when to stop comparing.

How about floating point numbers?

There are only finitely many floating point numbers in any
implementation; enumerate them to reduce to the integer case.

Best wishes,

Markus Triska
.



Relevant Pages

  • Re: Comparission cause problem
    ... > Now my concern about my code is that In some palces I am comparing the ... It is a principal problem in how floating point works in computers. ... Always take an epsilon value into account. ... due to different ranges (such as adding or subtracting values whos range ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Problem with floating point numbers.
    ... you are comparing to 4.5 and hoping that magically all the round off ... The floating point problem is not unique to SKILL. ... One good way of comparing floating point numbers in SKILL is to compare ... their printed representations because that is most often what you ...
    (comp.cad.cadence)
  • Re: Comparission cause problem
    ... >> It's true that comparing for equality is usually wrong ... >> when using floating point numbers, ... and it's in defining the appropriate concept ... When for example you want to jump out of a block when var is 0 or smaller, ...
    (alt.comp.lang.learn.c-cpp)
  • Re: Violation of Conversion rule of C99.
    ... warnings for comparing with 0.0. ... I have enough faith in implementors ... floating-point representations. ... binary floating point representation, that goes without saying. ...
    (comp.lang.c)
  • Re: Double comparisons for equality
    ... number(a tolerance level), just as "Comparing floating point numbers" ... comparing binary floating point numbers for equality directly. ...
    (microsoft.public.dotnet.framework.clr)