def pipe_hoop_stress(P, D, t):
    """Calculate the hoop (circumferential) stress in a pipe 
    using Barlow's formula.

    Refs: https://en.wikipedia.org/wiki/Barlow%27s_formula
    https://en.wikipedia.org/wiki/Cylinder_stress

    :param P: the internal pressure in the pipe.
    :type P: float
    :param D: the outer diameter of the pipe.
    :type D: float
    :param t: the pipe wall thickness.
    :type t: float
    :returns: the hoop stress in the pipe.
    :rtype: float    
    """
    return P * D / 2 / t