-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
Implement Add Function
Description
Create the core add function that performs addition of two real numbers as specified in the requirements.
Acceptance Criteria
- Implement
add(a, b)function that returns the sum of two real numbers - Function should handle integers, floats, and other numeric types
- Function should be importable from the main arithmetic module
- Include proper type hints and docstring documentation
- Handle edge cases appropriately (infinity, NaN, etc.)
Dependencies
Depends on #2
Files to Create/Modify
arithmetic/core.pyor similar module- Update
arithmetic/__init__.pyto export the function
Unit Tests Required
- Test addition of two positive integers
- Test addition of two negative integers
- Test addition of positive and negative integers
- Test addition of two floats
- Test addition of integer and float
- Test addition with zero
- Test addition with very large numbers
- Test edge cases (infinity, NaN)
- Test type validation and error handling
- Test that function is properly importable
Metadata
Metadata
Assignees
Labels
No labels