Skip to content

nunntom/elm-bigrational

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BigRational

A rational number is any number that can be represented as a ratio, or fraction of two integers.

With rational numbers you can express non-integer values with exact precision, and perform arithmetic without the pitfalls of floating point errors.

Elm's native integer type uses raw JavaScript integers which are limited in size. BigRational uses cmditch/elm-bigint under the hood for unlimited size numbers. This and the precision of rational numbers makes the module suitable for safely representing and manipulating things like monetary values, albeit at the cost of some performance.

Contributing

Contributions are always welcome!

Acknowledgements

  • Thanks to Coury Ditch for elm-bigint which BigRational depends on.

About

Big rational numbers for Elm

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages