If you need to use some 3rd party lib you can use folowing technique.
Define map of js paths. You can use for example path of libraries provided here. Remove .js
from path it will be added automaticaly.
%%javascript
require.config({
paths: {
'big': '//cdnjs.cloudflare.com/ajax/libs/big.js/5.2.2/big'
}
});
%%javascript
require(['big'], function(Big) {
window.Big = Big;
});
%%javascript
var a = 0.3;
var b = 0.1;
var c = new Big(a);
beakerx.displayHTML(this, `
using floats: ${a-b}<br>
using big.js: ${c.minus(b)}
`);