Re: Defining "<" for the rationals
- From: Rainer Rosenthal <r.rosenthal@xxxxxx>
- Date: Sat, 26 Nov 2005 23:08:41 +0100
Bill Dubuque schrieb:
Michael Stemper <mstemper@xxxxxxxxxxxxxxxx> wrote:
I've been looking at the rational numbers as an equivalence relation. I've been able to show that the definitions of multiplication and addition give the same answer, regardless of which member of an equivalance set is chosen. I wanted to also define the "<" relation, but hit a stumbling block. Most of the time, you can say (a,b)<(c,d) iff ad<bc. However, this falls apart if b or d is negative.
You may use a/b < c/d <-> ad bd < bc bd
Oh well, I always like your fine comments.
My signum function solution was correct
but cumbersome. bd = |bd| * signum(bd)
and |bd| > 0 allow the simplification of
my suggestion
[(a,b)] < [(c,d)] <-> signum(bd)*ad < signum(bd)*bc
by multiplying both sides of the inequality with factor |bd|, yielding your elegant solution.
My best regards to you, Rainer Rosenthal r.rosenthal@xxxxxx .
- References:
- Defining "<" for the rationals
- From: Michael Stemper
- Re: Defining "<" for the rationals
- From: Bill Dubuque
- Defining "<" for the rationals
- Prev by Date: Re: Proving that a number is irrational
- Next by Date: Re: Square root algorithms and complexity
- Previous by thread: Re: Defining "<" for the rationals
- Next by thread: Re: Defining "<" for the rationals
- Index(es):
Relevant Pages
|