Joel Purra: Developer and more

jqnpm logotype, a Penrose triangle

jq-bigint

A big integer library for working with possibly-signed arbitrarily long decimal strings. Written by Peter Koppstein (@pkoppstein) and released under the MIT license.

This is a package for the command-line JSON processor jq. Install the package in your jq project/package directory with jqnpm:

jqnpm install joelpurra/jq-bigint

Usage

import "joelpurra/jq-bigint" as BigInt;

# BigInt::negate:                # . * -1
# BigInt::lessOrEqual(x; y):     # x <= y
# BigInt::long_add(x;y):         # x+y
# BigInt::long_minus(x;y):       # x-y
# BigInt::long_power(i):         # .^i
# BigInt::long_multiply(x;y):    # x*y
# BigInt::long_divide(x;y):      # x/y => [q,r]
# BigInt::long_div(x;y):         # integer division
# BigInt::long_mod(x;y):         # %

# In all cases, x and y must be strings; . and i should be an integer or a string.

License

Copyright (c) 2014, 2015 Peter Koppstein https://github.com/pkoppstein and Joel Purra http://joelpurra.com/ All rights reserved.

When using jq-bigint, comply to the MIT license. Please see the LICENSE file for details.

Background animations by hexagonif.