let's have the same amount of invmod tests than the other tests
This commit is contained in:
		
							parent
							
								
									a8b81498d0
								
							
						
					
					
						commit
						4617de4f7f
					
				@ -307,13 +307,13 @@ int main(int argc, char *argv[])
 | 
				
			|||||||
      printf("%s\n", buf);
 | 
					      printf("%s\n", buf);
 | 
				
			||||||
   } else if (n == 10) {
 | 
					   } else if (n == 10) {
 | 
				
			||||||
      /* invmod test */
 | 
					      /* invmod test */
 | 
				
			||||||
 | 
					      do {
 | 
				
			||||||
      rand_num2(&a);
 | 
					      rand_num2(&a);
 | 
				
			||||||
      rand_num2(&b);
 | 
					      rand_num2(&b);
 | 
				
			||||||
      b.sign = MP_ZPOS;
 | 
					      b.sign = MP_ZPOS;
 | 
				
			||||||
      a.sign = MP_ZPOS;
 | 
					      a.sign = MP_ZPOS;
 | 
				
			||||||
      mp_gcd(&a, &b, &c);
 | 
					      mp_gcd(&a, &b, &c);
 | 
				
			||||||
      if (mp_cmp_d(&c, 1) != 0) continue;
 | 
					      } while (mp_cmp_d(&c, 1) != 0 || mp_cmp_d(&b, 1) == 0);
 | 
				
			||||||
      if (mp_cmp_d(&b, 1) == 0) continue;
 | 
					 | 
				
			||||||
      mp_invmod(&a, &b, &c);
 | 
					      mp_invmod(&a, &b, &c);
 | 
				
			||||||
      printf("invmod\n");
 | 
					      printf("invmod\n");
 | 
				
			||||||
      mp_to64(&a, buf);
 | 
					      mp_to64(&a, buf);
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user