question: public void testPowPositiveNum ( ) { byte aBytes [ ] = { 50 , - 26 , 90 , 69 , 120 , 32 , 63 , - 103 , - 14 , 35 } ; int aSign = 1 ; int exp = 5 ; byte rBytes [ ] = { 20 , 93 , 41 , 14 , 126 , - 114 , 49 , 87 , - 116 , 34 , - 4 , - 60 , 91 , - 112 , 74 , - 104 , 41 , - 42 , - 35 , 113 , - 100 , 31 , - 106 , 58 , - 128 , - 46 , - 109 , - 75 , 92 , - 106 , - 34 , - 13 , 4 , 19 , - 18 , 20 , 118 , 126 , 114 , - 28 , 121 , - 27 , 66 , - 110 , 124 , - 17 , - 92 , 69 , - 109 } ; BigInteger aNumber = new BigInteger ( aSign , aBytes ) ; BigInteger result = aNumber . pow ( exp ) ; byte resBytes [ ] = new byte [ rBytes . length ] ; resBytes = result . toByteArray ( ) ; for ( int i = 0 ; i < resBytes . length ; i ++ ) { assertTrue ( resBytes [ i ] == rBytes [ i ] ) ; } assertEquals ( "incorrect sign" , 1 , result . signum ( ) ) ; }
target:  Exponentiation of a positive number.