# Path: brew/constants.py
# FC_DIFF_TWO_ROW = 0.017
# 
# Path: brew/constants.py
# LITERS_OF_WORT_AT_SG = 386.0
# 
# Path: brew/constants.py
# MOISTURE_CORRECTION = 0.0
# 
# Path: brew/constants.py
# MOISTURE_FINISHED_MALT = 0.04
# 
# Path: brew/constants.py
# PPG_TO_HWE_CONVERSION = LITER_PER_GAL * POUND_PER_KG
# 
# Path: brew/constants.py
# SUCROSE_PLATO = 11.486
# 
# Path: brew/constants.py
# SUCROSE_PPG = 46.214
# 
# Path: brew/validators.py
# def validate_percentage(percent):
#     """
#     Validate decimal percentage
# 
#     :param float percent: Percentage between 0.0 and 1.0
#     :return: percentage
#     :rtype: float
#     :raises ValidatorException: If decimal percentage not between 0.0 and 1.0
#     """
#     if 0.0 <= percent <= 1.0:
#         return percent
#     raise ValidatorException(u"Percentage values should be in decimal format")
# 
# Path: brew/utilities/sugar.py
# def gu_to_sg(gu):
#     """
#     Gravity Units to Specific Gravity
# 
#     :param float gu: Gravity Units
#     :return: Specific Gravity
#     :rtype: float
#     """
#     return 1 + (gu / 1000.0)


from ..constants import FC_DIFF_TWO_ROW
from ..constants import LITERS_OF_WORT_AT_SG
from ..constants import MOISTURE_CORRECTION
from ..constants import MOISTURE_FINISHED_MALT
from ..constants import PPG_TO_HWE_CONVERSION
from ..constants import SUCROSE_PLATO
from ..constants import SUCROSE_PPG
from ..validators import validate_percentage
from .sugar import gu_to_sg
    :rtype: float
    """
    return grain * 0.89


def liquid_malt_to_specialty_grain_weight(malt):
    """
    LME to Specialty Grain Weight

    :param float grain: Weight of LME
    :return: Specialty Grain Weight
    :rtype: float
    """
    return malt / 0.89


def fine_grind_to_coarse_grind(fine_grind, fc_diff=FC_DIFF_TWO_ROW):
    """
    Fine Grind to Coarse Grind Percentage

    :param float fine_grind: A percentage from the malt bill
    :param float fc_diff: The F/C difference percentage from the malt bill
    :return: Coarse Grind Percentage
    :rtype: float
    """
    validate_percentage(fine_grind)
    validate_percentage(fc_diff)
    return fine_grind - fc_diff



# Path: brew/constants.py
# FC_DIFF_TWO_ROW = 0.017
# 
# Path: brew/constants.py
# LITERS_OF_WORT_AT_SG = 386.0
# 
# Path: brew/constants.py
# MOISTURE_CORRECTION = 0.0
# 
# Path: brew/constants.py
# MOISTURE_FINISHED_MALT = 0.04
# 
# Path: brew/constants.py
# PPG_TO_HWE_CONVERSION = LITER_PER_GAL * POUND_PER_KG
# 
# Path: brew/constants.py
# SUCROSE_PLATO = 11.486
# 
# Path: brew/constants.py
# SUCROSE_PPG = 46.214
# 
# Path: brew/validators.py
# def validate_percentage(percent):
#     """
#     Validate decimal percentage
# 
#     :param float percent: Percentage between 0.0 and 1.0
#     :return: percentage
#     :rtype: float
#     :raises ValidatorException: If decimal percentage not between 0.0 and 1.0
#     """
#     if 0.0 <= percent <= 1.0:
#         return percent
#     raise ValidatorException(u"Percentage values should be in decimal format")
# 
# Path: brew/utilities/sugar.py
# def gu_to_sg(gu):
#     """
#     Gravity Units to Specific Gravity
# 
#     :param float gu: Gravity Units
#     :return: Specific Gravity
#     :rtype: float
#     """
#     return 1 + (gu / 1000.0)


# Path: brew/utilities/malt.py
from ..constants import FC_DIFF_TWO_ROW
from ..constants import LITERS_OF_WORT_AT_SG
from ..constants import MOISTURE_CORRECTION
from ..constants import MOISTURE_FINISHED_MALT
from ..constants import PPG_TO_HWE_CONVERSION
from ..constants import SUCROSE_PLATO
from ..constants import SUCROSE_PPG
from ..validators import validate_percentage
from .sugar import gu_to_sg

    :rtype: float
    """
    return grain * 0.89


def liquid_malt_to_specialty_grain_weight(malt):
    """
    LME to Specialty Grain Weight

    :param float grain: Weight of LME
    :return: Specialty Grain Weight
    :rtype: float
    """
    return malt / 0.89


def fine_grind_to_coarse_grind(fine_grind, fc_diff=FC_DIFF_TWO_ROW):
    """
    Fine Grind to Coarse Grind Percentage

    :param float fine_grind: A percentage from the malt bill
    :param float fc_diff: The F/C difference percentage from the malt bill
    :return: Coarse Grind Percentage
    :rtype: float
    """
    validate_percentage(fine_grind)
    validate_percentage(fc_diff)
    return fine_grind - fc_diff



def coarse_grind_to_fine_grind(coarse_grind, fc_diff=FC_DIFF_TWO_ROW):