Using big numbers in an Extension
- From: Per <pmknutsen gmail com>
- To: gnome-shell-list gnome org
- Subject: Using big numbers in an Extension
- Date: Tue, 5 Jan 2016 11:50:11 -0800
I'm working on an extension that require me to process very large integers (> 50 digits).
First, does there already exist methods I can use, aka BigNumber.js/BigDecimal.js, for processing large numbers in an extension?
If not, how do I use a library like bignumber.js in my extension?
I have tried this:
/* Include the library */
const ExtensionUtils = imports.misc.extensionUtils;
const Extension = ExtensionUtils.getCurrentExtension();
const BigNumber = Extension.imports.bignumbers;
/* Initialize */
let num = new BigNumber(0);
The last command throws this error:
TypeError: BigNumber is not a constructor
bleh...
Thanks in advance for any insights!
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]