

Because a is not specified, the number is rounded to the integer. You cannot specify a negative number for the precision.īasic examples Specifying a value without precision

The precision is optional, and if omitted the round function rounds to an integer. This function returns a number rounded to the decimal places specified by the precision.

This function returns a number to the power of the exponent. The following example calculates the area of a circle, which is pi() multiplied by the radius to the power of 2. This function takes no arguments and returns the constant ' pi to 11 digits of precision. The following example returns the logarithm of the numeric literal 100000, using base 10. The following example returns the logarithm of the values of the number field, using base 2. The base is optional, and if omitted the log function uses base 10. This function returns the logarithm of a number using a base. The following example returns the natural logarithm of the values in the bytes field. This function returns the natural logarithm of a number. This function rounds a number down to the nearest whole integer. This function returns the exponential function e X of a number. This function returns the result of a numeric eval calculation with a larger amount of precision in the formatted output.Ĭalculates the circumference of a set of circles by multiplying pi by the values in the diameter field.
#SPLUNK EVAL MAX FULL#
You can use the abbreviation ceil() instead of the full name of the function. This function rounds a number up to the next highest integer. WHERE mydata>abs(-10.95) ceiling() or ceil() In this example, the values in the mydata field are greater than the absolute value of the numeric literal -10.95. The following example uses the abs function in a WHERE clause. The following example creates a field called absnum, whose values are the absolute values of the numeric field number. You can use this function with the eval and where commands, in the WHERE clause of the from command, and as part of evaluation expressions with other commands. The argument can be the name of a numeric field or a numeric literal. This function returns the absolute value of a number. For the list of mathematical operators you can use with these functions, see the "Operators" section in eval command usage.For information about using string and numeric fields in functions, and nesting functions, see Overview of SPL2 eval functions.The following list contains the functions that you can use to perform mathematical calculations.
