#bigint — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #bigint, aggregated by home.social.
-
A few days ago I tried to build some perls with 32 bit ints and 128 bit floats. Cue test failures. Today I tried again, and this time I read my notes from last time on how to do it, and it Just Works.
Yay past me!
(the #BigInt modules bundled with some versions of perl don't like that combination of data sizes; the solution is to ignore their test failures, install anyway, and then upgrade to the latest versions from the #CPAN)
-
A few days ago I tried to build some perls with 32 bit ints and 128 bit floats. Cue test failures. Today I tried again, and this time I read my notes from last time on how to do it, and it Just Works.
Yay past me!
(the #BigInt modules bundled with some versions of perl don't like that combination of data sizes; the solution is to ignore their test failures, install anyway, and then upgrade to the latest versions from the #CPAN)
-
A few days ago I tried to build some perls with 32 bit ints and 128 bit floats. Cue test failures. Today I tried again, and this time I read my notes from last time on how to do it, and it Just Works.
Yay past me!
(the #BigInt modules bundled with some versions of perl don't like that combination of data sizes; the solution is to ignore their test failures, install anyway, and then upgrade to the latest versions from the #CPAN)
-
A few days ago I tried to build some perls with 32 bit ints and 128 bit floats. Cue test failures. Today I tried again, and this time I read my notes from last time on how to do it, and it Just Works.
Yay past me!
(the #BigInt modules bundled with some versions of perl don't like that combination of data sizes; the solution is to ignore their test failures, install anyway, and then upgrade to the latest versions from the #CPAN)
-
A few days ago I tried to build some perls with 32 bit ints and 128 bit floats. Cue test failures. Today I tried again, and this time I read my notes from last time on how to do it, and it Just Works.
Yay past me!
(the #BigInt modules bundled with some versions of perl don't like that combination of data sizes; the solution is to ignore their test failures, install anyway, and then upgrade to the latest versions from the #CPAN)
-
🥴 Ah, yes, the age-old challenge: cramming infinite data into finite space using #JavaScript Bigints. Because who doesn't love turning their codebase into a monument of inefficiency just to realize, "Oh wait, maybe this wasn't such a genius move after all?" 🤦♂️
https://jonathan-frere.com/posts/bigints-are-cool/ #BigInt #DataManagement #CodeInefficiency #DeveloperHumor #TechChallenges #HackerNews #ngated -
[Перевод] Как хранить деньги в базах данных и почему это не так просто, как кажется
Хранение денежных сумм в базах данных и API: анализ подходов платежных систем Хранение денег — вещь только на первый взгляд простая, а на деле содержит множество подводных камней. Выбрав не тот тип данных, можно получить неточности в расчётах, возможна путаница при переводе суммы из одной валюты в другую. А если ещё и подключать внешние API, у каждого из которых своя точность для одних и тех же валют, уследить за совместимостью еще труднее. Разбираем, как решают эти проблемы Stripe, PayPal, Google Wallet и другие платежные системы. Сравниваем три основных подхода: Integer minor units, Decimal base units и String base units.
https://habr.com/ru/articles/924838/
#валюты #валюты_мира #финансовые_системы #decimal #bigint #типы_данных #float #double #хранение_данных #платежные_системы
-
Automated testing disrupted by dog.
-
Automated testing disrupted by dog.
-
Automated testing disrupted by dog.
-
Automated testing disrupted by dog.
-
Automated testing disrupted by dog.
-
Is it just me, or is supporting the full range of 8-byte integer IDs in web applications a pain in the butt?
https://www.postgresql.org/docs/15/datatype-numeric.html
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MIN_SAFE_INTEGER
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/MAX_SAFE_INTEGER
https://stackoverflow.com/questions/59456390/using-bigint-in-typescript
https://stackoverflow.com/questions/18755125/node-js-is-there-any-proper-way-to-parse-json-with-large-numbers-long-biginSooo much easier to handle them as strings and do type conversions in backend code
--
#JavaScript #TypeScript #PostgreSQL #numbers #BigInt -
svg8.svg — Code is numbers.
Edition of 10
(Final version)Each character of the source code is remapped to a hexadecimal digit (0-F) with an added offset over time. Each line of code will be visited once.
Project page
↓
http://ertdfgcvb.ch/+/svgRealtime version
↓
https://objkt.com/asset/hicetnunc/815103 -
I completed #Day11 of #AdventOfCode2022. It was the hardest of the #AdventOfCode problems, for now: almost 5 hours to solve!
Difficulty: #Medium.
Part 1 was easy-to-medium: code to the specs, take care of the always-mutating array lengths during the loops.
When, at part 2, numbers started overflowing, the difficulty shot up right to Medium: I had to use #BigInt. Then, even it overflowed!
(Spoiler in the reply...)