def pi_using_float(precision):
    """Get value of pi via BBP formula to specified precision using floats.
    See: https://en.wikipedia.org/wiki/Bailey%E2%80%93Borwein%E2%80%93Plouffe_formula

    :param precision: Precision to retrieve.
    :return: Pi value with specified precision.
    """
    value = 0
    for k in range(precision):
        # Dot suffix converts value to a Float.
        value += 1. / 16. ** k * (
            4. / (8. * k + 1.) -
            2. / (8. * k + 4.) -
            1. / (8. * k + 5.) -
            1. / (8. * k + 6.)
        )
    return value