Re: Fuzzy comparison
- From: William Elliot <marsh@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 6 Jul 2006 03:20:04 -0700
On Thu, 6 Jul 2006, Abstract Dissonance wrote:
I'm trying to come up with a simple function that will allow me to compare
two real numbers in a "fuzzy" way. That is, I don't if a < b or b < a as
What do you mean when you say
I don't if .. or .. as ...
long as they are within some tolerance but I also want the function to "act"
like the normal comparison in most respects(i.e., g(x) = x).
Actually, for my purposes I want a function f(x) to have the properties for
two real numbers a and b,
if |b - a| < e then 0 <= f(b - a)
If |x| < e =~ 2.718..., then 0 <= f(x).
if a <(>) b then f(a-b) <=(>=) f(b-a)
Bah, the <(>) is redundant
if a < b, then f(a-b) <= f(b-a)
if 0 < x, then f(-x) <= f(x)
if 0 > x, then 0 < -x, f(--x) <= f(-x)
f(-x) >= f(x), same as the (>).
if a > b, then f(a-b) >= f(b-a)
if 0 > x, then f(-x) >= f(x)
f'(x) >= 0 for all x
f(x) ~= x for large x.
I'd also like to have f'(0) = 0 or ~= 0.
f(x) = x if e <= |x|
f(x) = 0 if |x| < e
.
- Follow-Ups:
- Re: Fuzzy comparison
- From: Abstract Dissonance
- Re: Fuzzy comparison
- References:
- Fuzzy comparison
- From: Abstract Dissonance
- Fuzzy comparison
- Prev by Date: Re: An uncountable countable set
- Next by Date: life data: Heywood, Lawley, Young
- Previous by thread: Re: Fuzzy comparison
- Next by thread: Re: Fuzzy comparison
- Index(es):