https://github.com/hughparsonage/sillybiggies
https://github.com/hughparsonage/sillybiggies
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/hughparsonage/sillybiggies
- Owner: HughParsonage
- Created: 2019-11-02T05:34:55.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-02T06:43:26.000Z (over 6 years ago)
- Last Synced: 2025-02-17T01:46:06.711Z (over 1 year ago)
- Language: R
- Size: 1.95 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# sillybiggies
The goal of sillybiggies is to perform arithmetic very large integers without a loss of precision.
It achieves this in a silly way: each digit is allocated to an integer vector and arithmetic
is performed in the schoolboy way. (i.e. carrying the ten for addition)
## Installation
You can install sillybiggies using devtools:
```r
# install.packages("devtools")
devtools::install_github("hughparsonage/sillybiggies")
```
## Example
This is a basic example:
``` r
library(sillybiggies)
add_int(555, 555)
```
Because of the R parser, you can just enter large numbers directly as they will
be intercepted with a loss of precision immediately. You can either enter them
as strings
```r
add_int("235972350923095820938523095", "2039529035709235905231")
```
or by separating any digits with pipes
```r
add_int(235972350923|095820938523095, 20395290|35709235|905231)
```