https://github.com/Ueaj-Kerman/Fractions
A good tm implementation of fractions in Java
https://github.com/Ueaj-Kerman/Fractions
Last synced: 8 months ago
JSON representation
A good tm implementation of fractions in Java
- Host: GitHub
- URL: https://github.com/Ueaj-Kerman/Fractions
- Owner: Devan-Kerman
- License: cc0-1.0
- Created: 2020-09-21T15:47:51.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-10-15T13:13:12.000Z (over 5 years ago)
- Last Synced: 2024-12-27T05:25:04.406Z (over 1 year ago)
- Language: Java
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fractions
Fractions for java
## Autoexpanding
When a LongFraction overflows, it first attempts to simplify itself, if that fails then the fraction is too large to fit in a long/long fraction, so instead it uses BigFraction, which is BigInteger/BigInteger
### Autoshrinking
When a BigFraction's value can be stored in a LongFraction, it does so
## Brrrr
Fractions lazily simplify, so it's performance is much faster than autosimplification, and there's a small cache of common numbers