egg-polynomial-alejandrolf

1.0.2 • Public • Published

EGG Polynomial

Extends EGG with a Polynomial class and overloads '+','-','*' and '/' operators to be able to directly use them with Polynomials. Polynomial objects can be evaluated on certain values and printed on an understandable format.

It also extends '+' and '-' operators for Arrays.

Its use is recommended with IGG syntax as it ensures that operators take arguments in pairs. Everything can still work with EGG syntax but Polynomials shouldn't directly use operators with multiple arguments. For example:

:=(x, Pol(2, 3)),
:=(y, *(3, x, 4))

Should be written as:

:=(x, Pol(2, 3)),
:=(y, *(*(3, x), 4))

In IGG:

var x = Pol(2, 3);
var y = 3 * x * 4

Would work just fine

Installation

npm install egg-polynomial-alejandrolf

Or add it as a dependency to your project

It includes EGG and IGG functionalities. A simple use:

let run = require("egg-polynomial-alejandrolf").igg.runFromFile;
run("your-IGG-program-file");

Readme

Keywords

Package Sidebar

Install

npm i egg-polynomial-alejandrolf

Weekly Downloads

0

Version

1.0.2

License

ISC

Unpacked Size

11.2 kB

Total Files

14

Last publish

Collaborators

  • alejandrolf