import math


def std(values_array: list[float]) -> float:
    """
    Compute standard deviation.

    Parameters
    ----------
    values_array : array like of numerical values.
        Represents the set of values to compute the operation.

    Returns
    -------
    float
        Represents the value of standard deviation.

    References
    ----------
    squaring with * is over 3 times as fast as with **2
    http://stackoverflow.com/questions/29046346/comparison-of-power-to-multiplication-in-python

    Example
    -------
    >>> from pymove.utils.math import std
    >>> list = [7.8, 9.7, 6.4, 5.6, 10]
    >>> print(std(list), type(std(list)))
    1.7435595774162693 <class 'float'>
    """
    size = len(values_array)
    mean = sum(values_array) / size
    sum_sq = sum((i - mean) * (i - mean) for i in values_array)

    return math.sqrt(sum_sq / size)