Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/KaisenAmin/c_std
/ functions
Functions
2,651 in github.com/KaisenAmin/c_std
⨍
Functions
2,651
◇
Types & classes
138
Function
bigfloat_to_string
* @brief Converts a BigFloat to a string representation. * @param a Pointer to the BigFloat. * @return A dynamically allocated string representing t
bigfloat/bigfloat.c:408
Function
bigfloat_trig_cos
* @brief Computes the cosine of a BigFloat. * @param a Pointer to the BigFloat. * @return Pointer to a new BigFloat representing cos(a), or NULL on
bigfloat/bigfloat.c:305
Function
bigfloat_trig_sin
* @brief Computes the sine of a BigFloat. * @param a Pointer to the BigFloat. * @return Pointer to a new BigFloat representing sin(a), or NULL on er
bigfloat/bigfloat.c:283
Function
bigfloat_trig_tan
* @brief Computes the tangent of a BigFloat. * @param a Pointer to the BigFloat. * @return Pointer to a new BigFloat representing tan(a), or NULL on
bigfloat/bigfloat.c:327
Function
bigfloat_trunc
* @brief Truncates the decimal part of a BigFloat (rounds towards zero). * @param a Pointer to the BigFloat. * @return A new BigFloat representing t
bigfloat/bigfloat.c:555
Function
bigint_abs
* @brief Returns the absolute value of a BigInt. * * Allocates and returns a new BigInt representing the absolute value of the input. * * @param a
bigint/bigint.c:558
Function
bigint_add
* @brief Adds two BigInts. * * Computes the sum of two BigInts and returns the result as a new BigInt. * * @param a Pointer to the first BigInt.
bigint/bigint.c:164
Function
bigint_and
* @brief Computes the bitwise AND of two BigInts. * * @param a Pointer to the first BigInt. * @param b Pointer to the second BigInt. * @return Poi
bigint/bigint.c:1235
Function
bigint_bit_length
* @brief Returns the bit-length of a BigInt. * * Computes the number of bits required to represent the BigInt in binary. * * @param a Pointer to t
bigint/bigint.c:915
Function
bigint_cmp_abs
* @brief Compares the absolute values of two BigInts. * * Compares |a| and |b| and returns: * - -1 if |a| is less than |b| * - 0 if |a| is equal t
bigint/bigint.c:1176
Function
bigint_compare
* @brief Compares two BigInts. * * Compares the values of two BigInts. * * @param a Pointer to the first BigInt. * @param b Pointer to the second
bigint/bigint.c:320
Function
bigint_dec
* @brief Decrements a BigInt by 1. * * Allocates and returns a new BigInt that is equal to (a - 1). * * @param a Pointer to the BigInt to decremen
bigint/bigint.c:884
Function
bigint_divide
* @brief Divides one BigInt by another. * * Performs integer division of BigInt a by BigInt b and returns the quotient. * Optionally, the remainder
bigint/bigint.c:266
Function
bigint_factorial
* @brief Computes the factorial of n. * * Computes n! (n factorial) iteratively and returns the result as a BigInt. * * @param n The unsigned long
bigint/bigint.c:822
Function
bigint_from_int
* @brief Creates a BigInt from a native signed long. * * The native-integer counterpart to bigint_from_string — no decimal * formatting round-trip
bigint/bigint.c:1310
Function
bigint_from_string
* @brief Creates a BigInt from a decimal string. * * Parses a null-terminated decimal string and converts it into a BigInt. * * @param str A point
bigint/bigint.c:46
Function
bigint_gcd
* @brief Computes the greatest common divisor (GCD) of two BigInts. * * Allocates and returns a new BigInt that is the GCD of the two input BigInts.
bigint/bigint.c:590
Function
bigint_inc
* @brief Increments a BigInt by 1. * * Allocates and returns a new BigInt that is equal to (a + 1). * * @param a Pointer to the BigInt to incremen
bigint/bigint.c:853
Function
bigint_is_even
* @brief Checks whether a BigInt is even. * * Determines if the BigInt is even. * * @param a Pointer to the BigInt. * @return true if the BigInt
bigint/bigint.c:940
Function
bigint_is_prime
* @brief Checks whether a BigInt is prime. * * Uses GMP's probabilistic primality test (mpz_probab_prime_p) with the given number * of repetitions
bigint/bigint.c:655
Function
bigint_lcm
* @brief Computes the least common multiple (LCM) of two BigInts. * * Allocates and returns a new BigInt that is the LCM of the two input BigInts.
bigint/bigint.c:622
Function
bigint_log2
* @brief Computes the floor of the base-2 logarithm of a BigInt. * * Computes the largest integer L such that 2^L is less than or equal to the absol
bigint/bigint.c:1212
Function
bigint_mod
* @brief Computes the modulus of one BigInt by another. * * Returns the remainder of dividing BigInt a by BigInt b. * * @param a Pointer to the di
bigint/bigint.c:444
Function
bigint_modinv
* @brief Computes the modular inverse of a BigInt. * * Computes the inverse of a modulo modulus such that (a * a_inv) mod modulus = 1. * * @param
bigint/bigint.c:969
Function
bigint_multiply
* @brief Multiplies two BigInts. * * Computes the product of two BigInts and returns the result as a new BigInt. * * @param a Pointer to the first
bigint/bigint.c:230
Function
bigint_negate
* @brief Returns the negation of a BigInt. * * Allocates and returns a new BigInt which is the negative of the input. * * @param a Pointer to the
bigint/bigint.c:527
Function
bigint_next_prime
* @brief Computes the next prime number greater than a given BigInt. * * Uses GMP's mpz_nextprime function to compute the next prime. * * @param a
bigint/bigint.c:677
Function
bigint_normalize
* @brief Normalizes the BigInt. * * Reallocates the internal storage of the BigInt to the minimal number of bits required * to represent its value.
bigint/bigint.c:346
Function
bigint_num_digits
* @brief Returns the number of decimal digits of a BigInt. * * Computes the number of digits required to represent the BigInt in base 10. * * @par
bigint/bigint.c:1097
Function
bigint_or
* @brief Computes the bitwise OR of two BigInts. * * @param a Pointer to the first BigInt. * @param b Pointer to the second BigInt. * @return Poin
bigint/bigint.c:1259
Function
bigint_pow
* @brief Raises a BigInt to a power. * * Computes the result of raising the base BigInt to the exponent BigInt. * Note: The exponent is assumed to
bigint/bigint.c:394
Function
bigint_powmod
* @brief Computes the modular exponentiation. * * Computes (base^exponent) mod modulus and returns the result as a new BigInt. * * @param base Poi
bigint/bigint.c:487
Function
bigint_random
bigint/bigint.c:786
Function
bigint_shift_left
* @brief Shifts a BigInt left by @p bits (multiply by 2^bits). * * @param a Pointer to the BigInt. * @param bits Number of bit positions to shif
bigint/bigint.c:1368
Function
bigint_shift_right
* @brief Shifts a BigInt right by @p bits (arithmetic, floor toward -inf). * * Equivalent to dividing by 2^bits and flooring, so it matches the usua
bigint/bigint.c:1394
Function
bigint_sign
* @brief Returns the sign of a BigInt. * * @param a Pointer to the BigInt. * @return -1 if @p a is negative, 0 if zero (or @p a is NULL), +1 if pos
bigint/bigint.c:1353
Function
bigint_sqrt
* @brief Computes the integer square root of a BigInt. * * Computes the integer square root (the floor of the true square root) of a BigInt, * opti
bigint/bigint.c:711
Function
bigint_sqrt_exact
* @brief Computes the exact square root of a BigInt if it is a perfect square. * * Checks if the given BigInt is a perfect square. If it is, compute
bigint/bigint.c:1021
Function
bigint_subtract
* @brief Subtracts one BigInt from another. * * Computes the difference between two BigInts (a - b) and returns the result as a new BigInt. * * @p
bigint/bigint.c:197
Function
bigint_sum_digits
* @brief Computes the sum of the decimal digits of a BigInt. * * Converts the BigInt to its decimal string representation and sums up all numeric di
bigint/bigint.c:1134
Function
bigint_to_hex
* @brief Converts a BigInt to its hexadecimal string representation. * * Converts the internal GMP value of the BigInt to a null-terminated hexadeci
bigint/bigint.c:1065
Function
bigint_to_long
* @brief Extracts a BigInt into a native signed long, if it fits. * * The inverse of bigint_from_int. Writes the value to @p out only when it * fit
bigint/bigint.c:1333
Function
bigint_xor
* @brief Computes the bitwise XOR of two BigInts. * * @param a Pointer to the first BigInt. * @param b Pointer to the second BigInt. * @return Poi
bigint/bigint.c:1283
Function
bitset_all
* @brief Checks if all bits in the Bitset are set. * * Returns true if all bits in the Bitset are set to 1. * * @param bs Pointer to the Bitset.
bitset/bitset.c:322
Function
bitset_and
* @brief Performs bitwise AND operation on two Bitsets. * * Takes two Bitsets and returns a new Bitset that is the result of the AND operation. * T
bitset/bitset.c:541
Function
bitset_at
* @brief Returns the value of the bit at the given position. * * This function returns the value of the bit at the specified position. * It mimics
bitset/bitset.c:830
Function
bitset_at_ref
* @brief Returns a pointer to the underlying byte that contains the bit at the given position. * * The returned pointer points to a byte; the caller
bitset/bitset.c:845
Function
bitset_copy
* @brief Creates a deep copy of a Bitset. * * Allocates a new Bitset of the same size and copies every bit. The result is * fully independent — mut
bitset/bitset.c:876
Function
bitset_count
* @brief Counts the number of set bits in the Bitset. * * Returns the total number of bits in the Bitset that are set to 1. * * @param bs Pointer
bitset/bitset.c:398
Function
bitset_deallocate
* @brief Deallocates memory associated with a Bitset. * * Frees the memory allocated for the Bitset structure and its internal bit array. * * @par
bitset/bitset.c:76
Function
bitset_find_first
* @brief Returns the index of the first (lowest-indexed) set bit. * * Scans byte by byte (skipping all-zero bytes) so it is efficient even on * lar
bitset/bitset.c:916
Function
bitset_find_next
* @brief Returns the index of the first set bit strictly after @p pos. * * Like `bitset_find_first`, but starts the search at @p pos + 1. Skips all-
bitset/bitset.c:950
Function
bitset_flip
* @brief Flips a specific bit in the Bitset. * * Inverts the bit at the specified position in the Bitset, turning a 1 to 0 or a 0 to 1. * The posit
bitset/bitset.c:292
Function
bitset_flip_all
* @brief Flips all bits in the Bitset. * * Inverts every bit in the Bitset, turning 1s to 0s and 0s to 1s. * * @param bs Pointer to the Bitset. *
bitset/bitset.c:261
Function
bitset_is_not_equal
* @brief Compares two Bitsets for inequality. * * This function checks if two Bitsets are different in size or bit values. * It returns true if the
bitset/bitset.c:815
Function
bitset_none
* @brief Checks if none of the bits in the Bitset are set. * * Returns true if none of the bits in the Bitset are set to 1. * * @param bs Pointer
bitset/bitset.c:379
Function
bitset_not
* @brief Performs bitwise NOT operation on a Bitset. * * Creates a new Bitset that is the result of flipping all bits in the given Bitset. * Bits b
bitset/bitset.c:648
Function
bitset_or
* @brief Performs bitwise OR operation on two Bitsets. * * Takes two Bitsets and returns a new Bitset that is the result of the OR operation. * The
bitset/bitset.c:577
Function
bitset_print
* @brief Prints the Bitset to the standard output. * * Outputs the bits in the Bitset in a human-readable format, with the most significant bit on t
bitset/bitset.c:96
Function
bitset_reset
* @brief Clears the bit at the specified position in the Bitset. * * Sets the bit at the specified position in the Bitset to 0. * * @param bs Poin
bitset/bitset.c:230
Function
bitset_set
* @brief Sets or clears a specific bit in the Bitset. * * Modifies the bit at the specified position in the Bitset, setting it to the specified valu
bitset/bitset.c:193
Function
bitset_set_from_string
* @brief Sets the Bitset's bits from a string representation. * * Converts a string of '0's and '1's into corresponding bits in the Bitset. The left
bitset/bitset.c:122
Function
bitset_shift_left
* @brief Shifts the bits in the Bitset to the left by the specified number of positions. * * In MSB-on-left convention this moves bits toward higher
bitset/bitset.c:682
Function
bitset_shift_right
* @brief Shifts the bits in the Bitset to the right by the specified number of positions. * * In MSB-on-left convention this moves bits toward lower
bitset/bitset.c:725
Function
bitset_size
* @brief Returns the size of the Bitset. * * Gets the number of bits contained in the Bitset. * * @param bs Pointer to the Bitset. * @return The
bitset/bitset.c:425
Function
bitset_to_string
* @brief Converts the Bitset to a string representation. * * Creates a string representation of the Bitset, with '1' representing set bits and '0' r
bitset/bitset.c:508
Function
bitset_to_ullong
* @brief Converts the Bitset to an unsigned long long. * * Converts the Bitset's bits to an unsigned long long, with the least significant bit at po
bitset/bitset.c:478
Function
bitset_to_ulong
* @brief Converts the Bitset to an unsigned long. * * Converts the Bitset's bits to an unsigned long, with the least significant bit at position 0.
bitset/bitset.c:447
Function
bitset_xor
* @brief Performs bitwise XOR operation on two Bitsets. * * Takes two Bitsets and returns a new Bitset that is the result of the XOR operation. * T
bitset/bitset.c:613
Function
cli_add_option_alias
* @brief Adds an alias for an existing option in the CLI parser. * * This function allows you to define an alternative name (alias) for an existing
cli/cli.c:1711
Function
cli_add_option_group
* @brief Adds a new group of options to the CLI parser. * * This function registers a group of related options under a specified group name * in th
cli/cli.c:1161
Function
cli_display_error
* @brief Displays an error message using the CLI parser's error handler. * * This function outputs an error message using the parser's configured er
cli/cli.c:551
Function
cli_enable_strict_mode
* @brief Enables or disables strict mode for the CLI parser. * * Strict mode, when enabled, causes the parser to treat unrecognized options as error
cli/cli.c:260
Function
cli_enter_interactive_mode
* @brief Enters an interactive mode where the user can input and execute commands repeatedly. * * This function prompts the user for commands in a l
cli/cli.c:1276
Function
cli_find_option
* @brief Finds and returns a pointer to an option by its long or short name. * * This function searches for an option in the CLI parser by its long
cli/cli.c:662
Function
cli_get_last_error
* @brief Retrieves the last error that occurred in the CLI parser. * * This function returns the last error information that occurred in the parser,
cli/cli.c:874
Function
cli_parse_args_with_delimiter
* @brief Parses command-line arguments using a specified delimiter for argument splitting. * * This function processes the command-line arguments, s
cli/cli.c:1085
Function
cli_parse_bool
* @brief Parse a string into a bool, accepting the common spellings. * * Recognises (case-insensitively) `true`/`false`, `yes`/`no`, `on`/`off`, and
cli/cli.c:2018
Function
cli_parse_double
* @brief Parse a string into a double, with full validation. * * Accepts decimal and scientific notation (e.g. "3.14", "-2.5", "1e9"). * Rejects an
cli/cli.c:1988
Function
cli_parse_int
* @brief Parse a string into an int, with full validation. * * Accepts an optional leading sign and decimal digits (leading whitespace is * tolerat
cli/cli.c:1929
Function
cli_parse_long
* @brief Parse a string into a long, with full validation. * * Same rules as `cli_parse_int`, but for the wider `long` range — useful for * sizes,
cli/cli.c:1958
Function
cli_parser_create
* @brief Creates a new CLI parser instance. * * This function allocates and initializes a new `CliParser` structure, which can be used * to manage
cli/cli.c:54
Function
cli_parser_deallocate
* @brief Deallocates a CLI parser and all associated resources. * * This function frees all memory associated with the given `CliParser` instance, i
cli/cli.c:117
Function
cli_print_help
* @brief Prints the help message for the CLI parser. * * This function outputs the usage message, followed by the list of available options and comm
cli/cli.c:414
Function
cli_print_version
* @brief Prints the version information for the application. * * This function outputs the version information of the application, using the program
cli/cli.c:595
Function
cli_process_option_group
* @brief Processes a specific group of options within the CLI parser. * * This function processes the command line arguments for a specific option g
cli/cli.c:1630
Function
cli_prompt_confirmation
* @brief Prompts the user for confirmation with a customizable message. * * This function displays a prompt message asking the user for a yes/no con
cli/cli.c:1577
Function
cli_register_command
Function to register a command with the CLI parser
cli/cli.c:332
Function
cli_register_command_alias
* @brief Registers an alias for an existing command in the CLI parser. * * This function allows you to define an alternative name (alias) for an exi
cli/cli.c:1531
Function
cli_remove_option_group
* @brief Removes an option group from the CLI parser by its name. * * This function searches for an option group by name and removes it from the CLI
cli/cli.c:1214
Function
cli_set_custom_usage
* @brief Sets a custom usage message for the CLI parser. * * This function allows the user to set a custom usage message that will be displayed * w
cli/cli.c:218
Function
cli_set_default_command_handler
* @brief Sets the default command handler for the parser. * * This function allows setting a default command handler that will be invoked * when no
cli/cli.c:900
Function
cli_set_error_handler
* @brief Sets a custom error handler for the CLI parser. * * This function allows the user to specify a custom error handler function that will be c
cli/cli.c:297
Function
cli_set_option_dependencies
* @brief Sets a dependency between two options in the CLI parser. * * This function establishes a dependency where the presence of one option * (id
cli/cli.c:1830
Function
cli_set_option_error_message
* @brief Sets a custom error message for a specific option when its validation fails. * * This function assigns a custom error message to a specific
cli/cli.c:1331
Function
cli_set_post_execution_hook
* @brief Sets a hook function to be executed after any command execution. * * This function allows the user to specify a hook that will be called au
cli/cli.c:1493
Function
cli_set_pre_execution_hook
* @brief Sets a hook function to be executed before any command execution. * * This function allows the user to specify a hook that will be called a
cli/cli.c:1458
Function
cli_unregister_command
* @brief Unregisters a previously registered command from the parser. * * This function removes a command from the parser by its name. It also handl
cli/cli.c:1019
Function
cli_unregister_option
* @brief Unregisters a previously registered option from the parser. * * This function removes an option from the parser by either its long or short
cli/cli.c:940
Function
cli_update_description
* @brief Updates the description of a command or option. * * This function updates the description of a command or option in the CLI parser. The des
cli/cli.c:696
← previous
next →
1,001–1,100 of 2,651, ranked by callers