Skip to content
dineshtavva23Public

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

23 Commits

Folders and files

Repository files navigation

ArbitraryArithmetic

Overview

ArbitraryArithmetic is a Java-based library and CLI tool for performing arithmetic operations on integers and floating-point numbers with infinite precision. It bypasses the limitations of Java's native numeric types by using string-based arithmetic.


Features

  • Infinite-precision support for:
    • Integers (AInteger.java)
    • Floating-point numbers (AFloat.java)
  • Operations:
    • Addition (add)
    • Subtraction (sub)
    • Multiplication (mul)
    • Division (div)
  • Java CLI runner: MyInfArith.java
  • Apache Ant-based build automation
  • Docker support
  • Python helper script for compiling, JAR creation, and CLI execution

Build & Run

Option 1: Using Apache Ant

Compile & Package

ant compile

Run the Program

ant run -Dtype=<int|float> -Dop=<add|sub|mul|div> -Darg1=<num1> -Darg2=<num2>

Clean Build

ant clean

Option 2: Using the Python Script (script.py)

This script compiles source files, creates the JAR, and optionally runs the program if arguments are passed.

Run Without Execution

python3 script.py

Run with Arguments

python3 script.py int mul 123456789 987654321

Automatically compiles and creates the JAR at build/aarithmetic.jar before running.


Option 3: Using Docker

Build Docker Image

docker build -t java_project .

Run Program

docker run --rm java_project float div 244727.15202 75964.3891

Example CLI Usage

java -cp build MyInfArith int add 1234567891234567898883 9876543219876388854321

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages