This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdint.h> | |
| uint16_t find_inv(uint16_t a) { | |
| uint16_t inv = 1; | |
| for (int i = 0; i < 16; i++) inv *= 2 - a * inv; | |
| return inv; | |
| } | |
| uint16_t mul_a,mul_a_inv; |