Shorten the long ass `unsigned long long int' to ulli.
This commit is contained in:
parent
cb9e1648e9
commit
3c8b9922fb
@ -2,13 +2,15 @@
|
||||
#include <gmp.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
#include "types.h"
|
||||
|
||||
/**
|
||||
* @brief An infinitely expanding list type.
|
||||
*/
|
||||
typedef struct {
|
||||
mpz_t *list; //!< The list of elements
|
||||
unsigned long long int size; //!< How many elements are in the list
|
||||
unsigned long long int end; //!< The last element of the list (in use)
|
||||
ulli size; //!< How many elements are in the list
|
||||
ulli end; //!< The last element of the list (in use)
|
||||
} List;
|
||||
|
||||
/**
|
||||
|
@ -5,6 +5,7 @@
|
||||
#include <gmp.h>
|
||||
|
||||
#include "list.h"
|
||||
#include "types.h"
|
||||
#include "optimizers.h"
|
||||
|
||||
static bool run;
|
||||
@ -37,7 +38,7 @@ int main(void) {
|
||||
|
||||
do {
|
||||
// Loop through found primes
|
||||
for(unsigned long long int i = 0; i < primes.size; ++i) {
|
||||
for(ulli i = 0; i < primes.size; ++i) {
|
||||
// If `num' is divisible by a prime then go to the next number
|
||||
if(mpz_divisible_p(num, primes.list[i]) != 0) goto nextPrime;
|
||||
}
|
||||
|
2
src/types.h
Normal file
2
src/types.h
Normal file
@ -0,0 +1,2 @@
|
||||
#pragma once
|
||||
typedef unsigned long long int ulli;
|
Loading…
Reference in New Issue
Block a user