GithubHelp home page GithubHelp logo

jesserussell411 / jesserussell.numerics Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 226 KB

Collection of useful number types. NuGet package: https://www.nuget.org/packages/JesseRussell.Numerics/

C# 100.00%

jesserussell.numerics's Introduction

JesseRussell.Numerics

A collection of useful number types. Uploaded as a NuGet package: https://www.nuget.org/packages/JesseRussell.Numerics/ All of these types are readonly structs with out-of-place operations. They have been designed with precision and safety taking priority over speed.

UBigInteger: Unsigned wrapper for BigInteger.

Fraction: A fraction using BigInteger for the numerator and denominator

FractionOperation: Middle-man type to allow automatic simplification in operations like addition without simlplifying after every operation in a string of operations like 1/2 + 1/3 + 1/4. When performing operations using the overloaded operators (+ - * / etc) a FractionOperation is returned instead of a Fraction. This type can be implicitly cast back to a Fraction and is simplified when this happens. If the user prefers to handle simplification manually, they can use the instance methods instead (.Add, .Subtract, .Multiply, etc.), calling .Simplify() to simplify.

Doudec: Combination double and decimal. Always tries to store as a decimal if possible.

IntFloat: Combination BigInteger and Doudec. Always tries to store as a BigInteger if possible.

IntFloatFrac: Combination IntFloat and Fraction. Always tries to store as a BigInteger or Fraction if possible.

jesserussell.numerics's People

Contributors

jesserussell411 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.