Mathematical Functions 2145 LOG( B , X )  is equivalent to  LOG( X ) / LOG( B ) . Returns the base-2 logarithm of  X . If  X  is less than or equal to 0.0E0, the function returns  NULL  and a warning “Invalid argument for logarithm”  is reported. LOG2()  is useful for finding out how many bits a number requires for storage. This function is equivalent to the expression  LOG( X ) / LOG(2) . Returns the base-10 logarithm of  X . If  X  is less than or equal to 0.0E0, the function returns  NULL  and a warning “Invalid argument for logarithm”  is reported. LOG10( X )  is equivalent to  LOG(10, X ) . Modulo operation. Returns the remainder of  N  divided by  M . This function is safe to use with  BIGINT  values. MOD()  also works on values that have a fractional part and returns the exact remainder after division: MOD( N ,0)  returns  NULL . Returns the value of  π  (pi). The default number of decimal places displayed is seven, but MySQL uses the full double-precision value internally. mysql>  SELECT PI(); mysql>  SELECT MOD(34.5,3); -> 1.5 mysql>  SELECT MOD(234, 10); -> 4 mysql>  SELECT 253 % 7; -> 1 mysql>  SELECT MOD(29,9); -> 2 mysql>  SELECT 29 MOD 9; -> 2 mysql>  SELECT LOG10(2); -> 0.30102999566398 mysql>  SELECT LOG10(100); -> 2 mysql>  SELECT LOG10(-100); -> NULL mysql>  SELECT LOG2(65536); -> 16 mysql>  SELECT LOG2(-100); -> NULL -> 16 mysql>  SELECT LOG(10,100); -> 2 mysql>  SELECT LOG(1,100); -> NULL • LOG2( X ) • LOG10( X ) • MOD( N , M ) ,  N  %  M ,  N  MOD  M • PI()