GithubHelp home page GithubHelp logo

i-e-b / libposit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chrislomont/libposit

0.0 1.0 0.0 41.39 MB

A single file C# implementation of Posits, an alternative floating-point format

License: MIT License

C# 100.00%

libposit's Introduction

Posit library

Chris Lomont 2023

This is a single file, MIT licensed, C# implementation of the floating point type posit. I needed a good C# implementation for some numerical experiments, and could find none.

See https://en.wikipedia.org/wiki/Unum_(number_format)#Unum_III

This implements generic posits of the form posit(n,es) where n is bit length and es is the exponent size. Standard posits sizes are posit8 = Posit(8,0), Posit16 = Posit(16,1), and Posit32 = Posit(32,2).

It implements standard operations +,-,*,/, and sqrt, trig operations Cos,Sin,Tan,Acos,Asin,Atan, and the remaining exponential operations Pow,Exp,Log,Log10,Log2.

It currently passes all my tests (posit 8 checked for all values, others tested for millions of randomized expressions) to match the default library https://posithub.org/khub_community#softposit. While developing this lib, I found many other libs that disagree with the standard implementation.

The Papers directory holds many papers relevant to posit and related number systems.

History

v0.5 - Jan 24, 2023 - initial release

libposit's People

Contributors

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