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 <stdint.h> | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #define MAX_PERIOD 1048575 | |
| void generateNums(int *); | |
| void checkDups(int *); | |
| int main(){ | |
| int genNums[MAX_PERIOD]; |
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 <time.h> | |
| #include <stdlib.h> | |
| int main(void) { | |
| double x, y, i; // variables | |
| double N0 = 0, Ntot = 100000000; // numbers that the numbers in the range and total numbers | |
| double A; // area var | |
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
| char checkTheBits(unsigned char hByte); | |
| char* hex_to_string(unsigned int n){ | |
| // output hexadecimal chars | |
| unsigned char* location = &n; //get the location of the hex number | |
| char value[9] = {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; // init null byte array | |
| // array has 9 values, because last one reserved fur null terminator | |
| unsigned char temp_char_l, temp_char_h; // temporary vars | |
| int i = 0, j = 7; // start at 7, because tested on little endian machine |