Subversion Repositories distributed

Rev

Rev 7 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 7 Rev 13
Line 119... Line 119...
119
         * @throws CRTNotSolveableException
119
         * @throws CRTNotSolveableException
120
         * @throws RemainderNotSmallerThanModulusException
120
         * @throws RemainderNotSmallerThanModulusException
121
         * @see http://de.wikipedia.org/wiki/Chinesischer_Restsatz#Direktes_L.C3.B6sen_von_simultanen_Kongruenzen_ganzer_Zahlen
121
         * @see http://de.wikipedia.org/wiki/Chinesischer_Restsatz#Direktes_L.C3.B6sen_von_simultanen_Kongruenzen_ganzer_Zahlen
122
         */
122
         */
123
        public static BigInteger chineseRemainder(BigInteger a, BigInteger n,
123
        public static BigInteger chineseRemainder(BigInteger a, BigInteger n,
124
                        BigInteger b, BigInteger m) throws CRTNotSolveableException, RemainderNotSmallerThanModulusException {
124
                        BigInteger b, BigInteger m) throws CRTException {
125
               
125
               
126
                // Frage: Ist es notwendig, dass wir divRem() verwenden, das von a%0==0 ausgeht?
126
                // Frage: Ist es notwendig, dass wir divRem() verwenden, das von a%0==0 ausgeht?
127
               
127
               
128
                if (a.signum() == -1) {
128
                if (a.signum() == -1) {
129
                        a = a.negate();
129
                        a = a.negate();