ATM/lib/BigNumber/README.md
2022-01-06 16:33:37 +01:00

1.2 KiB

BigNumber

BigNumber library for Arduino devices.

Use 256-bit numbers on tiny platforms.

ported from https://github.com/nickgammon/BigNumber

Requirements

Usage

Initialize the BigNumber library

  BigNumber.begin();

create your BigNumber

  BigNumber bigNum;
  bigNum = "67411411944031530524562029520200239450929984281572279077458355238873731477537";
  BigNumber bigNum = "67411411944031530524562029520200239450929984281572279077458355238873731477537";

modify your BigNumber

  BigNumber bigNum = "67411411944031530524562029520200239450929984281572279077458355238873731477537";
  BigNumber base = 16;
  BigNumber multiplier = base.pow(8);
  bigNum *= multiplier;

Serial.print your BigNumber

  BigNumber bigNum = "67411411944031530524562029520200239450929984281572279077458355238873731477537";
  Serial.println(bigNum);

67411411944031530524562029520200239450929984281572279077458355238873731477537

More documentation and examples:

http://www.gammon.com.au/forum/?id=11519