This library provides support for performing arithmetic operations on arbitrarily large or small integers and floating-point numbers.
The project uses Apache Ant for build management. To compile the project
and generate a runnable JAR file:
a. Ensure Apache Ant is installed and set up.
b. Run the following command in the root directory (where build.xml is
located):
ant jar
c. This will generate a file aarithmetic.jar in the build/jar directory.
To run the program using the generated JAR file, use the command:
java -jar build/jar/aarithmetic.jar
Parameters:
• — int for integers or float for floating-point numbers
• — add, sub, mul, or div
• — the first number (as a string)
• — the second number (as a string)
Example:
java -jar build/jar/aarithmetic.jar float div 25.5 4.2
8
A helper Python script is provided to simplify execution:
python python_script.py <int/float> <add/sub/mul/div>
Make sure the Python script is placed in the correct directory and Java is
installed on your system. This python script also builds the jar file using the
ant file,
• Floating-point operations are computed up to a precision of 30 decimal
places.
• Inputs must be valid numbers in string format.
• Supported operations: add, sub, mul, div.