|
-
Senior Member
yes... I know they're circular... but is there ever more than one pair of whole integers described? I mean, could any two integers produce the same result as any other two integers, so that
[ f(x1,y1) , f(y1,x1) ] == [ f(x2,y2) , f(y2,x2) ] ?
If not... then this would satisfy to give a unique identifier of two ID's combined...
-
Senior Member
aah, integers - I kinda thought of any real numbers. it might work with integers, indeed, maybe run 100000x100000 check loop? if you have a couple of hours to waste
-
Senior Member
It works, at least to 1000 x 1000...and I don't see why it wouldn't work infinitely =)
It also works to produce unique identifiers for reversible combinations of more than two integers, like this:
[unique floating id from a set of three integers]
(a^2+b^2+c^2)+( sin(atan(a/b))*cos(atan(a/b))*sin(atan(a/c))*cos(atan(a/c))*sin(atan(b/c))*cos(atan(b/c)) )
Solved!
-
Senior Member
btw,

which means, SIN(ATAN(x/y)) * COS(ATAN(x/y)) = TAN (ATAN (x/y)) / (1 + TAN^2 (ATAN(x/y))) = (x/y) / (1 + (x/y)^2) = (x * y) / (x^2 + y^2), right?
Last edited by realMakc; 11-27-2009 at 03:51 PM.
-
Senior Member
Thanks! That's nifty...
feeling pretty good about solving this one =)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|