• C data types (redirect from Stdint.h)
    All new types are defined in <inttypes.h> header (cinttypes header in C++) and also are available at <stdint.h> header (cstdint header in C++). The types...
    34 KB (3,301 words) - 13:34, 14 March 2025
  • Thumbnail for Xorshift
    use three shifts and three or four exclusive-or operations: #include <stdint.h> struct xorshift32_state { uint32_t a; }; /* The state must be initialized...
    28 KB (3,526 words) - 14:02, 26 April 2025
  • C standard library (redirect from Stdlib.h)
    ratified in 1995. Six more header files (complex.h, fenv.h, inttypes.h, stdbool.h, stdint.h, and tgmath.h) were added with C99, a revision to the C Standard...
    37 KB (3,694 words) - 11:18, 26 January 2025
  • Both give a maximum-length sequence. An example in C is below: #include <stdint.h> unsigned lfsr_fib(void) { uint16_t start_state = 0xACE1u; /* Any nonzero...
    38 KB (4,725 words) - 06:11, 9 May 2025
  • to the standard math.h functions for use on Q16.16 fixed-point numbers. libfixmath has no external dependencies other than stdint.h and a compiler which...
    5 KB (211 words) - 10:11, 20 September 2024
  • 64-bit pointers and 32-bit integers. This issue is resolved by C99 in stdint.h in the form of intptr_t. The bitness of a program may refer to the word...
    33 KB (2,648 words) - 13:24, 11 May 2025
  • Rijndael S-box). The following C code calculates the S-box: #include <stdint.h> #define ROTL8(x,shift) ((uint8_t) ((x) << (shift)) | ((x) >> (8 - (shift))))...
    11 KB (1,256 words) - 18:12, 5 November 2024
  • "PRBS-7" sequence can be expressed in C as #include <stdio.h> #include <stdint.h> #include <stdlib.h> int main(int argc, char* argv[]) { uint8_t start = 0x02;...
    8 KB (1,064 words) - 16:26, 5 February 2024
  • In the C and C++ programming languages, unistd.h is the name of the header file that provides access to the POSIX operating system API. It is defined...
    13 KB (302 words) - 16:27, 5 February 2025
  • Thumbnail for Salsa20
    13, 14) // row 4 An implementation in C/C++ appears below. #include <stdint.h> #define ROTL(a,b) (((a) << (b)) | ((a) >> (32 - (b)))) #define QR(a, b...
    31 KB (3,577 words) - 20:06, 24 October 2024
  • a period of (2607 -1) × 263 #define R (607) #define S (273) #include <stdint.h> uint64_t X[R]; uint64_t gen_rand() { static int j = S - 1, k = R - 1;...
    7 KB (974 words) - 03:03, 28 February 2025
  • instead. An example of both modulo and masking in C: #include <stdint.h> #include <string.h> int main(void) { const uint32_t NUM_BUCKETS = 0xFFFFFFFF; //...
    12 KB (1,741 words) - 16:28, 10 February 2025
  • such as <regex> rather than <regex.h>, <thread> rather than <pthread.h>, or <semaphore> rather than <semaphore.h>. POSIX C standard library C++ standard...
    10 KB (181 words) - 12:16, 23 April 2025
  • restrict keyword Several new library headers, including stdint.h, <tgmath.h>, fenv.h, <complex.h> Improved compatibility with several C++ features, including...
    18 KB (1,817 words) - 01:20, 16 April 2025
  • Thumbnail for Rule 30
    bits within one (or more) computer words. Here shown in C++: #include <stdint.h> #include <iostream> int main() { uint64_t state = 1u << 31; for (int i...
    14 KB (1,619 words) - 22:29, 22 April 2024
  • Thumbnail for Circular shift
    unsigned int. */ #include <stdint.h> // for uint32_t, to get 32-bit-wide rotates, regardless of the size of int. #include <limits.h> // for CHAR_BIT uint32_t...
    9 KB (972 words) - 05:28, 2 November 2024
  • also incorporates most headers of the ISO C standard library ending with ".h", but their use was deprecated (reverted the deprecation since C++23). C++23...
    35 KB (1,526 words) - 16:57, 25 April 2025
  • decoder in the C programming language: #include <stddef.h> #include <stdint.h> #include <assert.h> /** COBS encode data to buffer @param data Pointer to...
    12 KB (1,513 words) - 19:35, 7 September 2024
  • C99 standard and later, it is available as the SIZE_MAX constant from <stdint.h>. Although not guaranteed by ISO C, it is usually 2^(CHAR_BIT * sizeof(size_t))...
    36 KB (4,138 words) - 02:05, 1 May 2025
  • Thumbnail for Fast inverse square root
    bit level view of the contents of the floating point value. # include <stdint.h> // uint32_t float Q_rsqrt(float number) { union { float f; uint32_t i;...
    34 KB (4,653 words) - 20:58, 11 May 2025
  • with 64-bit state and 32-bit output. It can be implemented as: #include <stdint.h> static uint64_t state = 0x4d595df4d0f33173; // Or something seed-dependent...
    13 KB (1,678 words) - 14:24, 15 March 2025
  • 1812433253. The value for f for MT19937-64 is 6364136223846793005. #include <stdint.h> #define n 624 #define m 397 #define w 32 #define r 31 #define UMASK (0xffffffffUL...
    32 KB (3,995 words) - 12:02, 29 April 2025
  • first but not the second optimization: #include <stdlib.h> /* for size_t */ #include <stdint.h> /* for uint8_t, uint16_t & uint32_t */ uint16_t fletcher16(const...
    18 KB (2,590 words) - 12:57, 20 October 2023
  • Thumbnail for Pointer (computer programming)
    be large enough, C99 specifies the uintptr_t typedef name defined in <stdint.h>, but an implementation need not provide it. C++ fully supports C pointers...
    72 KB (9,678 words) - 04:54, 20 March 2025
  • Thumbnail for Computation of cyclic redundancy checks
    xor 0xFFFFFFFF return crc32 In C, the algorithm looks like: #include <stdint.h> // uint32_t, uint8_t static uint32_t CRCTable[256]; // Initialization...
    58 KB (5,698 words) - 00:39, 10 January 2025
  • of the function it is in. Headers: cstdbool (stdbool.h), cstdint (stdint.h), cinttypes (inttypes.h). Heading for a separate TR: Modules Decimal types Math...
    102 KB (13,170 words) - 21:17, 23 April 2025
  • Thumbnail for Tiny Encryption Algorithm
    released into the public domain by David Wheeler and Roger Needham: #include <stdint.h> void encrypt (uint32_t v[2], const uint32_t k[4]) { uint32_t v0=v[0],...
    13 KB (1,189 words) - 03:44, 16 March 2025
  • Thumbnail for XTEA
    Wheeler and Roger Needham, encrypts and decrypts using XTEA: #include <stdint.h> /* take 64 bits of data in v[0] and v[1] and 128 bits of key[0] - key[3]...
    9 KB (969 words) - 14:09, 19 April 2025
  • required for the higher multiples. This would be the routine in C: #include <stdint.h> uint64_t multiply(uint64_t ab, uint64_t cd) { /* These shifts and masks...
    12 KB (1,517 words) - 13:50, 11 April 2025
  • is in the IEEE 754 single precision floating point format */ #include <stdint.h> float sqrt_approx(float z) { union { float f; uint32_t i; } val = {z};...
    71 KB (12,354 words) - 04:28, 27 April 2025