# Path: systemVariables.py
# def     fuzzyInteger(B):
#     """
#     B but, if B is within comparison toleranace of an integer, the integer
#     """
#     if isinstance(B, int):
#         return B
# 
#     if B > 0:
#         I = int(B+0.5)
#     elif B < 0:
#         I = int(B-0.5)
#     else:
#         I = 0
# 
#     if fuzzyEquals(I, B):
#         return I
# 
#     return B
# 
# Path: aplError.py
# def     assertError(message):
#     """
#     raise an exception so aborting the current operation
#     """
#     raise aplException(message)


import operator
import math
import random
import mpmath
from systemVariables import fuzzyInteger
from aplError import assertError
    """
    | B
    """
    return math.fabs(B)

# ------------------------------

def     exp(B):
    """
    * B
    """
    return math.exp(B)

# --------------

def     log(B):
    """
    ⍟ B
    """
    try:
        return math.log(B)
    except ValueError:
        assertError("DOMAIN ERROR")

# --------------

def     factorial(B):
    """
    ! B
    """

# Path: systemVariables.py
# def     fuzzyInteger(B):
#     """
#     B but, if B is within comparison toleranace of an integer, the integer
#     """
#     if isinstance(B, int):
#         return B
# 
#     if B > 0:
#         I = int(B+0.5)
#     elif B < 0:
#         I = int(B-0.5)
#     else:
#         I = 0
# 
#     if fuzzyEquals(I, B):
#         return I
# 
#     return B
# 
# Path: aplError.py
# def     assertError(message):
#     """
#     raise an exception so aborting the current operation
#     """
#     raise aplException(message)


# Path: monadicFunctions.py
import operator
import math
import random
import mpmath
from systemVariables import fuzzyInteger
from aplError import assertError

    """
    | B
    """
    return math.fabs(B)

# ------------------------------

def     exp(B):
    """
    * B
    """
    return math.exp(B)

# --------------

def     log(B):
    """
    ⍟ B
    """
    try:
        return math.log(B)
    except ValueError:
        assertError("DOMAIN ERROR")

# --------------

def     factorial(B):
    """
    ! B
    """

    B = fuzzyInteger(B)