Max function

Warning

This documentation refers to the Classic QDK, which has been replaced by the Modern QDK.

Please see https://aka.ms/qdk.api for the API documentation for the Modern QDK.

Namespace: Microsoft.Quantum.Math

Package: Microsoft.Quantum.Standard

Given an array of integers, returns the largest element.

function Max (values : Int[]) : Int

Input

values : Int[]

An array to take the maximum of.

Output : Int

The largest element of values.