Git Product home page Git Product logo

nim-nint128's People

Contributors

rockcavera avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

foxoman

nim-nint128's Issues

Incorrect integer returned

playground.zip
The attached file demonstrates this chunk of code:
var a: Int128
a = i128("1231231298371293217931712312312983712932179317")
echo(a)

Returns this number:
30447654189836100383415788052960652661

Here were the release flags used:
nimble build --mm:orc --threads:on -r -d:release

It appears there is a discrepancy.

Add support for JS backend

Hey there, I've made a library (NULID) and I wanted to implement support for the JS backend, but it seems like nint128 doesn't support the JS backend, but it does support the NimVM, so I'm wondering if it'd be possible to also support JS at the same time?

Consider placement into the Nim std library?

I'm halfway through writing a 128-bit decimal library for the Nim standard library (see nim-lang/RFCs#308) based on IEEE 754-2008's 128-bit specification.

Internally, it uses a 113-bit uint decimal base. So I've been working on a bad hack to make the core arithmetic work as I concentrate more on the serialization and conformance to spec.

But, looking at your code, I'd much prefer to use the work you have already done here for the arithmetic. Unfortunately, that wouldn't work if nim-nint128 is an external library.

So, I selfishly ask: would you be interested in migrating your work to Nim's internal std library?

Disclaimer: I've been on a 6+ month hiatus on my decimal project. I won't be picking it back up till 2Q2022 as I've got too many customers at the moment.

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.