Giter VIP home page Giter VIP logo

realnumbers's Introduction

RealNumbers

This is an open source c# library for representing Real numbers. In this library we used Real numbers to refer to the set of numbers which includes whole numbers (integers), rational numbers (fractions), decimal numbers

The library targets both .netstandard2.0 and .net 4.7.1

Current CI build status is: Build status

RealNumbers is covered under the terms of the MIT/X11 license. You may therefore link to it and use it in both opensource and proprietary software projects.

Installation Instructions

Eventually this will be published as a nuget package and that will be the recommended way to obtain this library.

To manually build the library from source you can use Visual Studio or using dotnet on the command line.

Using the library

There will be 4 types provided publically.

Real32, Real64, Real128 and Real256 and an interface IRealNumber (to allow generic code to perform arithmetic operations on arbitary types).

The Real types can be used in substitute for any native number type on the .net platform and can be easily converted between them.

Real numbers can be used to represent any rational number exactly and irrational numbers to a number of decimal points which depends on the width of the Real type chosen. Additionally Real numbers represent some irrational numbers as thier algebraic counterparts allowing final decimal conversion to be delayed.

When representing decimal numbers Real numbers, unlike the Decimal type, uses a variable precision range. This allows Real numbers to provide a balance between number range and precision in a given fixed data size.

For more information on Real numbers see the corresponding wiki page.

All typical arithmetic functions are supported along with a number of extended fuctions

Library Goals

  • Provide a set of fixed size types which can represent commonly used Real numbers
  • Fulfill that gap where for a given project float/double rounding errors hurt, decimal is too slow or doesn't fit the range and BigInteger/BigRational is overkill
  • Performance at the very least comparable to the Decimal type on direct arithmetic while providing extended functionality.

realnumbers's People

Contributors

jones-adam avatar

Watchers

 avatar  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.