#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)
-
🥴 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 #хранение_данных #платежные_системы