C Functions

C fdim() Function

The fdim() function in C is a standard library function that computes the positive difference between two floating-point numbers. It is part of the C standard library (math.h). This function is useful for performing mathematical operations where the non-negative difference between two values is required.

C copysign() Function

The copysign() function in C is a standard library function that returns a value with the magnitude of the first argument and the sign of the second argument. It is part of the C standard library (math.h). This function is useful for manipulating the sign of a number based on another number’s sign.

C rint() Function

The rint() function in C is a standard library function that rounds a given floating-point number to the nearest integer value, but returns the result as a floating-point number. It is part of the C standard library (math.h). This function is useful for performing mathematical rounding operations while preserving the floating-point data type.

C round() Function

The round() function in C is a standard library function that rounds a given floating-point number to the nearest integer. It is part of the C standard library (math.h). This function is useful for performing mathematical rounding operations where the value is rounded to the nearest whole number.

C trunc() Function

The trunc() function in C is a standard library function that truncates a given floating-point number to its integer part, effectively removing any fractional part. It is part of the C standard library (math.h). This function is useful for performing mathematical operations where only the integer part of a number is needed.

C fmod() Function

The fmod() function in C is a standard library function that computes the remainder of the division of two floating-point numbers. It is part of the C standard library (math.h). This function is useful for performing modular arithmetic operations with floating-point numbers.

C floor() Function

The floor() function in C is a standard library function that rounds down a given floating-point number to the nearest integer. It is part of the C standard library (math.h). This function is useful for performing mathematical rounding operations.

C ceil() Function

The ceil() function in C is a standard library function that rounds up a given floating-point number to the nearest integer. It is part of the C standard library (math.h). This function is useful for performing mathematical rounding operations.

C erfc() Function

The erfc() function in C is a standard library function that computes the complementary error function of a given number. It is part of the C standard library (math.h). The complementary error function is used in various fields, such as probability, statistics, and partial differential equations.

C erf() Function

The erf() function in C is a standard library function that computes the error function of a given number. It is part of the C standard library (math.h). The error function is a mathematical function widely used in probability, statistics, and partial differential equations.

C hypot() Function

The hypot() function in C is a standard library function that computes the hypotenuse of a right-angled triangle given the lengths of the other two sides. It is part of the C standard library (math.h). This function is useful for performing calculations involving the Pythagorean theorem.

C scalbn() Function

The scalbn() function in C is a standard library function that scales a floating-point number (the significand) by an integral power of two (the exponent). It is part of the C standard library (math.h). This function is useful for efficiently computing values of the form ( x \times 2^n ).

C logb() Function

The logb() function in C is a standard library function that computes the exponent of the floating-point representation of a given number. It is part of the C standard library (math.h). This function is useful for obtaining the exponent in the representation of a floating-point number in base 2.

C log2() Function

The log2() function in C is a standard library function that computes the binary logarithm (base 2) of a given number. It is part of the C standard library (math.h). This function is useful for performing logarithmic calculations with base 2.

C log1p() Function

The log1p() function in C is a standard library function that computes the natural logarithm of (1 + x). It is part of the C standard library (math.h). This function is useful for performing logarithmic calculations where ( x ) is close to zero, providing more precision than using log(1 + x) directly.

C ilogb() Function

The ilogb() function in C is a standard library function that computes the integer binary logarithm of a given floating-point number. It is part of the C standard library (math.h). This function is useful for determining the exponent of the floating-point number when represented in binary form.

C exp2() Function

The exp2() function in C is a standard library function that computes the base-2 exponential (binary exponential) of a given number. It is part of the C standard library (math.h). This function is useful for performing exponential calculations with base 2.

Scroll to Top