rockcavera / nim-nint128 Goto Github PK
View Code? Open in Web Editor NEW128-bit integers
Home Page: https://rockcavera.github.io/nim-nint128/nint128.html
License: MIT License
128-bit integers
Home Page: https://rockcavera.github.io/nim-nint128/nint128.html
License: MIT License
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.
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?
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.