Task Description: Implement Math Operations Functionality
You are required to create a module that implements basic mathematical operations: addition, subtraction, multiplication, and division. Your solution should be placed in the /app/ directory.
Specific Requirements:
Function Definitions:
Implement a function add(a: float, b: float) -> float that returns the sum of a and b.
Implement a function subtract(a: float, b: float) -> float that returns the difference when b is subtracted from a.
Implement a function multiply(a: float, b: float) -> float that returns the product of a and b.
Implement a function divide(a: float, b: float) -> float that returns the result of dividing a by b. Ensure to handle division by zero by returning None or raising a specific exception.
Input and Output:
Each function must accept two arguments, both of which will be floats, and return a float as a result.
Edge Cases:
Ensure that the divide function can handle cases where the divisor b is zero by implementing an appropriate error handling mechanism.
Documentation:
Each function should be properly documented with a docstring that describes its purpose, parameters, and return values.
Ensure that your implementation passes all provided unit tests, which will cover various cases for each function.