3 * Copyright (c) 2001 - 2020 Steffen (Daode) Nurpmeso <steffen@sdaoden.eu>.
4 * SPDX-License-Identifier: ISC
6 * Permission to use, copy, modify, and/or distribute this software for any
7 * purpose with or without fee is hereby granted, provided that the above
8 * copyright notice and this permission notice appear in all copies.
10 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
11 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
12 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
13 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
14 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
15 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
22 #include <su/code-in.h>
24 #define su_PRIME_LOOKUP_MIN 0x2u
25 #define su_PRIME_LOOKUP_MAX 0x18000005u
26 EXPORT boole
su_prime_is_prime(u64 no
, boole allowpseudo
);
27 EXPORT u64
su_prime_get_former(u64 no
, boole allowpseudo
);
28 EXPORT u64
su_prime_get_next(u64 no
, boole allowpseudo
);
29 EXPORT u32
su_prime_lookup_former(u32 no
);
30 EXPORT u32
su_prime_lookup_next(u32 no
);
32 #include <su/code-ou.h>
33 #endif /* su_PRIME_H */