Skip to content

A Gleam library for working with polynomials

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

mine-tech-oficial/poly

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

poly

Package Version Hex Docs

A library for working with polynomials. Provides an abstract module, at poly, for generic coefficients, and specific modules for integers and floats, at poly/int and poly/float, respectively.

Special thanks to yoshi for their beautiful docs at iv that were used as heavy inspiration.

gleam add polynomial@1
import poly

pub fn main() {
  let ops = poly.Operations(
    zero: 0,
    add: int.add,
    subtract: int.subtract,
    multiply: int.multiply,
    divide: int.divide
  )

  let a = poly.from_list([1, 2, 3])
  let b = poly.from_list([4, 5, 6])

  // Prints out [4, 13, 28, 27, 18]
  echo poly.coefficients(poly.multiply(a, b, with: ops))
}

Further documentation can be found at https://hexdocs.pm/poly.

Development

gleam run   # Run the project
gleam test  # Run the tests

About

A Gleam library for working with polynomials

Resources

License

Unknown and 2 other licenses found

Licenses found

Unknown
LICENSE
Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages