![]() |
|
|
#1 |
|
Dec 2008
72·17 Posts |
I was wondering what the residue number representation of -1 was? (Or for negative numbers in general)
Last fiddled with by flouran on 2009-11-22 at 18:47 |
|
|
|
|
|
#2 |
|
Account Deleted
"Tim Sorbera"
Aug 2006
San Antonio, TX USA
17·251 Posts |
I'm guessing you mean Prime95's residue thing at the end of an LL test?
I believe it would loop around to 2^p-2, (as the mod is 2^p-1) which would be (in binary) 111...111110, which would be (in hex) [some number 1-F]...FFFE, which would make a residue of 0xFFFFFFFFFFFFFFFE (think that's the right length). So in general: for negative numbers x, it's the residue for 2^p-1+x. Last fiddled with by Mini-Geek on 2009-11-22 at 19:05 |
|
|
|
|
|
#3 |
|
"William"
May 2003
New Haven
2×7×132 Posts |
"-1" means that number which, when added to 1, results in zero. For example, in base 12 "clock arithmetic", "-1" is another name for 11. In "modulo p" arithmetic, it is another name for p-1.
|
|
|
|
|
|
#4 |
|
Dec 2008
11010000012 Posts |
No. Not what I was asking.
Last fiddled with by flouran on 2009-11-22 at 23:30 |
|
|
|
|
|
#5 | |
|
Dec 2008
15018 Posts |
Quote:
Wikipedia gives a somewhat decent account of what RNS is: http://en.wikipedia.org/wiki/Residue_number_system Thus, for example, 0 in RNS would be (0,0,0). 1 in RNS is (1,1,1). 2 in RNS is (0,2,2). 3 in RNS is (1,0,3). 41 in RNS is (1,2,6). I think perhaps -1 would be (-1,-1,-1). But that seems wrong
Last fiddled with by flouran on 2009-11-22 at 22:44 |
|
|
|
|
|
|
#6 |
|
Jun 2008
4816 Posts |
How do you figure that this is wrong? (-1,-1,-1) corresponds to (1,2,6) mod (2,3,7).
|
|
|
|
|
|
#7 | |
|
Dec 2008
72×17 Posts |
Quote:
Nice to see that I was correct
Last fiddled with by flouran on 2009-11-22 at 23:30 |
|
|
|
|
![]() |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| A Bigfoot number system | blistervol | Miscellaneous Math | 35 | 2012-08-18 20:17 |
| Quadratic residue mod 2^p-1 | alpertron | Miscellaneous Math | 17 | 2012-04-30 15:28 |
| Residue classes | CRGreathouse | Math | 4 | 2009-03-12 16:00 |
| Can LL residue hit zero before the last iteration? | JuanTutors | Math | 3 | 2004-08-01 19:07 |
| Masked residue | schneelocke | PrimeNet | 6 | 2003-11-22 01:26 |