--- title: "system.math.min" description: "Given a sequence of numerical values, returns the minimum value, also known as the \"min\" value." --- # system.math.min > Given a sequence of numerical values, returns the minimum value, also known as the "min" value. This function is used in **Python Scripting**. ## Description Returns NaN (Not a Number) if passed an empty sequence. ## Client Permission Restrictions This scripting function has no [Client Permission](../../../ignition-modules/vision/vision-project-properties/vision-project-properties.md#vision-permissions-properties) restrictions. ## Syntax `system.math.min(values)` ### Parameters Type | Parameter | Description ------- | ------- | ------ List[Float] | `values` | A sequence of numerical values. Accepts both integers and floats. The sequence may not contain None type values. However, passing a None type object instead of a sequence of numerical values will return NaN. ### Returns **Float** - The minimum value contained within the 'values' parameter, or NaN if the input was empty or null. ### Scope Gateway, Vision Client, Perspective Session ## Code Examples ```python title="Example #1 - Getting the Min Value from List" # Create a list of values. values = [3.5, 5.6, 7.8, 7.4, 3.8] # Prints the resulting value. print system.math.min(values) ``` ```python title="Example #2 - Getting the Min Value from Tag Values" # Create a List of Tag Paths to read paths = ["[Sample_Tags]/ReadOnly/ReadOnlyInteger1","[Sample_Tags]/ReadOnly/ReadOnlyInteger2","[Sample_Tags]/ReadOnly/ReadOnlyInteger3","[Sample_Tags]/ReadOnly/ReadOnlyInteger4","[Sample_Tags]/ReadOnly/ReadOnlyInteger5"] # Read the Tags, and store the complex results in a variable values = system.tag.readBlocking(paths) # Declare an empty list to append to later tagValuesList = [] # For each Tag Path, iterate through our results... for index in range(len(paths)): # ...grab the Tag values... tagValue = values[index].value # ...and append them to the empty list from earlier tagValuesList.append(tagValue) # Print out the maximum value in the list print system.math.min(tagValuesList) ```