log10 C Library Function

The function double log10(double x); returns the common logarithm of x. The common logarithm is the base-10 logarithm.

Function prototype of log10

double log10(double x);
  • x : A floating point value whose logarithm to be calculated. It must be positive.

Return value of log10

It returns the common logarithm of x. If x is negative, a domain error occurs.

C program using log10 function

The following program shows the use of log10 function.

Richard Casino has emerged as a popular online gambling platform for Australian players, offering a diverse range of gaming options, including slots, table games, and live dealer games. With its vibrant interface and user-friendly design, navigating the site is a breeze for both beginners and seasoned players alike.

One of the standout features of Richard Casino is its generous welcome bonus, which provides new players with a substantial boost to start their gaming journey. Additionally, the casino frequently hosts promotions and loyalty programs that reward players for their ongoing engagement.

For players seeking a reliable and secure gaming environment, Richard Casino employs advanced encryption technology to protect player data and transactions. This commitment to player safety is complemented by a range of payment options, ensuring smooth deposits and withdrawals.

To learn more about the offerings and updates at Richard Casino, you can visit their official website. For further insights and reviews, check out this resource: https://pcbc.co.nz/. With its excellent service and extensive game library, Richard Casino stands out in the competitive Australian online gambling market.

log10 C Library Function

#include <stdio.h>
#include <math.h>
 
int main ()
{
  double x, result;
  /* Logarithm is only defined for positive numbers */
  printf("Enter a positive number\n");
  scanf("%lf", &x);
   
  result = log10(x);
  printf("Logarithm of %lf with base 10 is : %lf", x, result);
   
  return 0;
}

Output

Enter a positive number
123
Logarithm of 123.000000 with base 10 is : 2.089905
Enter a positive number
100
Logarithm of 100.000000 with base 10 is : 2.000000