def calculate_bmi(weight: float, height: float) -> float:
    """BMI を計算する。

    Args:
        weight (float): 体重 (kg)
        height (float): 身長 (m)

    Returns:
        float: BMI 値

    Raises:
        ValueError: height が 0 以下の場合
    """
    if height <= 0:
        raise ValueError("height must be positive")
    return weight / (height ** 2)