Published
Edited
May 7, 2021
Fork of hello tally!
1 star
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
viewof tval3 = Textarea({placeholder: "Tally JS output.",value:"",rows: 3})
Insert cell
ta = new tally(9, 32)
Insert cell
tb = tally.fromString('cccc', 16)
Insert cell
tally.add(
tally.fromString('fffffffe0006a871000cc2f1eeb6f37ceeb6f37d00008df100082f1100008df1'),
tally.fromString('fffffffeffffffff00068db8eeb6f37feeb6f37f0000ffff00082f110000ffff'),
).size(36).toString(16)
Insert cell
tally.div(
new tally(new Uint16Array([55360, 35972, 15563, 22884, 59399, 3369, 60052, 54897, 36257, 46709, 14243, 47601, 26964, 49036, 49550, 10954])),
new tally(new Uint16Array([39812, 31953, 42221, 56359, 32457, 12702, 5843, 53003, 35824, 22224, 26000, 46261, 57133, 7443, 38385, 2]))
).size(32).toString(16)
Insert cell
tally.gcd(new tally(74636669191679, 32), new tally(74637628889628, 32)).size(32).toString(16)
Insert cell
tally.lcm(tally.fromString('43e1b42785ff', 16), tally.fromString('43e1ed5b5a1c', 16)).size(32).toString(16)
Insert cell
Insert cell
Insert cell
out = [
tally.add(a, b),
tally.sub(a, b),
tally.mul(a, b),
tally.div(a, b),
tally.mod(a, b),
tally.lt(a, b),
tally.gt(a, b),
tally.eq(a, b),
tally.and(tally.iszero(a), tally.isOne(b)),
tally.or(tally.isEven(a), tally.isOdd(b)),
tally.xor(a, b),
tally.not(a),
tally.shl(a, new tally(2, 32)),
tally.shr(a, new tally(2, 32)),
tally.neg(a),
tally.abs(a),
tally.gcd(a, b),
tally.lcm(a, b),
]
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
BN = require('https://bundle.run/bn.js@5.2.0')
Insert cell
Insert cell
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more