home.social

#decimal — Public Fediverse posts

Live and recent posts from across the Fediverse tagged #decimal, aggregated by home.social.

fetched live
  1. Почему в БД на PostgreSQL популярен тип numeric?

    Документация PostgreSQL по numeric содержит два плохо согласующихся утверждения : «especially recommended for storing monetary amounts and other quantities where exactness is required» — и сразу же: «calculations on numeric values are very slow compared to the integer types, or to the floating-point types». То есть рекомендуют для хранения денежных величин и тут же признают, что это весьма дорого. Для меня, как разработчика СУБД это сигнал к действию. Если операции с типом заметно медленнее bigint , возникает соблазн: а нельзя ли хранить денежные величины целым числом копеек и округлять по стандартному правилу? Это бы прилично сэкономило вычислительные ресурсы наших серверов баз данных, разве нет? А что, если вообще использовать double precision ?

    habr.com/ru/articles/1070300/

    #numeric #decimal #деньги #точность_вычислений #SQLстандарт #bigint #финансовые_данные #округление #типы_данных

  2. @nycki @MOULE lovely! But what i don't understand is that with #decimal , every number is anyways represented by exactly one string as well?

  3. @nycki @MOULE lovely! But what i don't understand is that with #decimal , every number is anyways represented by exactly one string as well?

  4. DDD в Go без красивых схем: как один платеж получил три курса валют

    В какой-то момент у нас один платеж начал жить с тремя курсами валют: checkout показывал сумму из Redis, payment-service ходил в API, а ledger писал проводку по снапшоту из Postgres. Расхождения были 2-5 тенге, иногда до 180. Разбираю, как это дебажили, какие костыли ставили и где DDD реально помог, без красивых схем. Читать статью

    habr.com/ru/articles/1025226/

    #ddd #domaindriven_design #go #golang #архитектура #value_object #aggregate_root #платежи #курсывалют #decimal

  5. I just released decimal-java 2.0.1, github.com/FirebirdSQL/decimal. Decimal-java is a library to convert java.math.BigDecimal to and from IEEE-754r (IEEE-754-2008) decimal byte representations.

    Compared to decimal-java 2.0.0, this version adds JSpecify nullability annotations.

    #decimal #ieee754 #java

  6. I just released decimal-java 2.0.1, github.com/FirebirdSQL/decimal. Decimal-java is a library to convert java.math.BigDecimal to and from IEEE-754r (IEEE-754-2008) decimal byte representations.

    Compared to decimal-java 2.0.0, this version adds JSpecify nullability annotations.

    #decimal #ieee754 #java

  7. Decimal Precision Rounds Numbers?!

    DECIMAL precision ROUNDS values! Cast 1.999 to DECIMAL(5,2) and it becomes 2.00. This silent rounding will cause calculation errors!

    #sql #sqltricks #decimal #precision #rounding #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #datatypes #advancedsql

    youtube.com/watch?v=wNyhCqAhlb8

  8. Decimal Precision Rounds Numbers?!

    DECIMAL precision ROUNDS values! Cast 1.999 to DECIMAL(5,2) and it becomes 2.00. This silent rounding will cause calculation errors!

    #sql #sqltricks #decimal #precision #rounding #sqlweird #sqlquiz #codingchallenge #sqlshorts #sqlwtf #datatypes #advancedsql

    youtube.com/watch?v=wNyhCqAhlb8

  9. Happy 60th anniversary of Changeover Day (Australia). 🎵🎶In come the dollars and in come the cents
    to replace the pounds and the shillings and the pence.🎶🎵

    Here's a piece I wrote on one of the last Australian pennies, saved as a keyring: coinofnote.com/1963-australian

    Here's a blog Michelle J Morgan wrote on the song: michellejmorgan.com.au/blog/on

    And here's the Royal Australian Mint's article on today, with description of the coin design released this year to commemorate it: ramint.gov.au/about-us/whats-n

    #Numismatics #CoinCollecting #Currency #Changeover #Decimal #Coins #History #Histodons @numismatics @histodons

  10. Happy 60th anniversary of Changeover Day (Australia). 🎵🎶In come the dollars and in come the cents
    to replace the pounds and the shillings and the pence.🎶🎵

    Here's a piece I wrote on one of the last Australian pennies, saved as a keyring: coinofnote.com/1963-australian

    Here's a blog Michelle J Morgan wrote on the song: michellejmorgan.com.au/blog/on

    And here's the Royal Australian Mint's article on today, with description of the coin design released this year to commemorate it: ramint.gov.au/about-us/whats-n

    #Numismatics #CoinCollecting #Currency #Changeover #Decimal #Coins #History #Histodons @numismatics @histodons

  11. Learn about numeric data types (and the number 998,001) in Python

    The value 1 / 998,001 has an interesting property, but to see it in Python you need to learn about numeric data types.

    rodstephensbooks.com/many_digi

    #Python #FloatingPoint #Decimal #Precision

  12. Learn about numeric data types (and the number 998,001) in Python

    The value 1 / 998,001 has an interesting property, but to see it in Python you need to learn about numeric data types.

    rodstephensbooks.com/many_digi

    #Python #FloatingPoint #Decimal #Precision

  13. At www.unicode.org/charts a lot of symbols, characters and so on.
    How to insert them in a website? With &#CODE; in the html, where the "CODE" is the decimal translation of the hex in the unicode charts.
    A tool to convert from hex to decimal here binaryhexconverter.com/hex-to-

    #unicode #hex #decimal #character #typo #html #web #website #tool #webtool

  14. At www.unicode.org/charts a lot of symbols, characters and so on.
    How to insert them in a website? With &#CODE; in the html, where the "CODE" is the decimal translation of the hex in the unicode charts.
    A tool to convert from hex to decimal here binaryhexconverter.com/hex-to-

    #unicode #hex #decimal #character #typo #html #web #website #tool #webtool

  15. I bought this windup #stopwatch at a vintage shop (Weavers Way Mercantile). It seems to work perfectly, aside from the one time the hands got stuck for reasons I wasn't able to replicate.

    Strangely, while the minute hand is minutes as expected, the larger hand doesn't measure seconds, it counts hundredths of a minute. Does anyone know why you would want hundredths of a minute instead of seconds? I haven't been able to find a search term that turns up any info.

    #stopwatches #hundredths #decimal

  16. I bought this windup #stopwatch at a vintage shop (Weavers Way Mercantile). It seems to work perfectly, aside from the one time the hands got stuck for reasons I wasn't able to replicate.

    Strangely, while the minute hand is minutes as expected, the larger hand doesn't measure seconds, it counts hundredths of a minute. Does anyone know why you would want hundredths of a minute instead of seconds? I haven't been able to find a search term that turns up any info.

    #stopwatches #hundredths #decimal

  17. Dans l’#univers de l’#électronique #numérique et la #programmation, nous faisons parfois recours à un ou plusieurs #systèmes de #codage differents de celui des #systèmes les plus connus tels que le système #binaire, le système #décimal ou le système #hexadécimal! Avec #electro-robot, nous vous proposons de #découvrir tout cela tout en vivant une belle #experience #utilisateur à travers les #différents #exemples #proposés.

    electro-robot.com/electronique

  18. (Shh-) The stacks and glass room at Lincoln Center Library of the Performing Arts, second floor. The security guards rotate positions; sometimes I have to show my umbrella when I beep.
    #symmetry #proportion #public #library #Dewey #decimal #deep in the #stacks #folk #revival #songs #anthology #hunt #research #mimeograph #copy #machine #staff #paper #lead #sheets #chords #lyrics #extra #verses

  19. memo to self: never mess with MicroPython maintenance after too little sleep:

    micropython-decimal-number by scruss | mim — checkmim.com/packages/scruss+m

    #MicroPython #decimal

  20. memo to self: never mess with MicroPython maintenance after too little sleep:

    micropython-decimal-number by scruss | mim — checkmim.com/packages/scruss+m

    #MicroPython #decimal

  21. [Перевод] Как хранить деньги в базах данных и почему это не так просто, как кажется

    Хранение денежных сумм в базах данных и API: анализ подходов платежных систем Хранение денег — вещь только на первый взгляд простая, а на деле содержит множество подводных камней. Выбрав не тот тип данных, можно получить неточности в расчётах, возможна путаница при переводе суммы из одной валюты в другую. А если ещё и подключать внешние API, у каждого из которых своя точность для одних и тех же валют, уследить за совместимостью еще труднее. Разбираем, как решают эти проблемы Stripe, PayPal, Google Wallet и другие платежные системы. Сравниваем три основных подхода: Integer minor units, Decimal base units и String base units.

    habr.com/ru/articles/924838/

    #валюты #валюты_мира #финансовые_системы #decimal #bigint #типы_данных #float #double #хранение_данных #платежные_системы

  22. I'm rich beyond my wildest dreams.
    Perhaps not. Just found a batch of pristine condition half pence coins as issued in 1971.
    These were probably part of an usused (from issue) batch brought home by my late Dad when the UK went decimal in 1971.


    #UK #decimal #Decimalisation #1971 #coins
  23. I'm rich beyond my wildest dreams.
    Perhaps not. Just found a batch of pristine condition half pence coins as issued in 1971.
    These were probably part of an usused (from issue) batch brought home by my late Dad when the UK went decimal in 1971.


    #UK #decimal #Decimalisation #1971 #coins
  24. One day, one decomposition
    A257368: Numbers n such that the decimal expansions of both n and n^2 have 2 as smallest digit and 8 as largest digit

    3D graph, threejs - webGL ➡️ decompwlj.com/3Dgraph/A257368.
    3D graph Gen, threejs animation ➡️ decompwlj.com/3DgraphGen/A2573
    2D graph, first 500 terms ➡️ decompwlj.com/2Dgraph500terms/

    #decompwlj #math #mathematics #sequence #OEIS #javascript #php #3D #numbers #decimal #expansions #digit #graph #threejs #webGL

  25. One day, one decomposition
    A257368: Numbers n such that the decimal expansions of both n and n^2 have 2 as smallest digit and 8 as largest digit

    3D graph, threejs - webGL ➡️ decompwlj.com/3Dgraph/A257368.
    3D graph Gen, threejs animation ➡️ decompwlj.com/3DgraphGen/A2573
    2D graph, first 500 terms ➡️ decompwlj.com/2Dgraph500terms/

    #decompwlj #math #mathematics #sequence #OEIS #javascript #php #3D #numbers #decimal #expansions #digit #graph #threejs #webGL

  26. One day, one decomposition
    A257211: Numbers n such that the decimal expansions of both n and n^2 have 1 as smallest digit and 8 as largest digit

    3D graph, threejs - webGL ➡️ decompwlj.com/3Dgraph/A257211.
    3D graph Gen, threejs animation ➡️ decompwlj.com/3DgraphGen/A2572
    2D graph, first 500 terms ➡️ decompwlj.com/2Dgraph500terms/

    #decompwlj #math #mathematics #sequence #OEIS #javascript #php #3D #numbers #decimal #expansions #digit #graph #threejs #webGL

  27. One day, one decomposition
    A257211: Numbers n such that the decimal expansions of both n and n^2 have 1 as smallest digit and 8 as largest digit

    3D graph, threejs - webGL ➡️ decompwlj.com/3Dgraph/A257211.
    3D graph Gen, threejs animation ➡️ decompwlj.com/3DgraphGen/A2572
    2D graph, first 500 terms ➡️ decompwlj.com/2Dgraph500terms/

    #decompwlj #math #mathematics #sequence #OEIS #javascript #php #3D #numbers #decimal #expansions #digit #graph #threejs #webGL

  28. One day, one decomposition
    A257210: Numbers n such that the decimal expansions of both n and n^2 have 1 as smallest digit and 7 as largest digit

    3D graph, threejs - webGL ➡️ decompwlj.com/3Dgraph/A257210.
    3D graph Gen, threejs animation ➡️ decompwlj.com/3DgraphGen/A2572
    2D graph, first 500 terms ➡️ decompwlj.com/2Dgraph500terms/

    #decompwlj #math #mathematics #sequence #OEIS #javascript #php #3D #numbers #decimal #expansions #digit #graph #threejs #webGL

  29. One day, one decomposition
    A257210: Numbers n such that the decimal expansions of both n and n^2 have 1 as smallest digit and 7 as largest digit

    3D graph, threejs - webGL ➡️ decompwlj.com/3Dgraph/A257210.
    3D graph Gen, threejs animation ➡️ decompwlj.com/3DgraphGen/A2572
    2D graph, first 500 terms ➡️ decompwlj.com/2Dgraph500terms/

    #decompwlj #math #mathematics #sequence #OEIS #javascript #php #3D #numbers #decimal #expansions #digit #graph #threejs #webGL

  30. One day, one decomposition
    A256786: Numbers which are divisible by prime(d) for all digits d in their decimal representation

    3D graph, threejs - webGL ➡️ decompwlj.com/3Dgraph/A256786.
    3D graph Gen, threejs animation ➡️ decompwlj.com/3DgraphGen/A2567
    2D graph, first 500 terms ➡️ decompwlj.com/2Dgraph500terms/

    #decompwlj #math #mathematics #sequence #OEIS #javascript #php #3D #numbers #primes #PrimeNumbers #decimal #representation #graph #threejs #webGL

  31. One day, one decomposition
    A256786: Numbers which are divisible by prime(d) for all digits d in their decimal representation

    3D graph, threejs - webGL ➡️ decompwlj.com/3Dgraph/A256786.
    3D graph Gen, threejs animation ➡️ decompwlj.com/3DgraphGen/A2567
    2D graph, first 500 terms ➡️ decompwlj.com/2Dgraph500terms/

    #decompwlj #math #mathematics #sequence #OEIS #javascript #php #3D #numbers #primes #PrimeNumbers #decimal #representation #graph #threejs #webGL

  32. One day, one decomposition
    A256634: Numbers n such that the decimal expansions of both n and n^2 have 0 as smallest digit and 7 as largest digit

    3D graph, threejs - webGL ➡️ decompwlj.com/3Dgraph/A256634.
    3D graph Gen, threejs animation ➡️ decompwlj.com/3DgraphGen/A2566
    2D graph, first 500 terms ➡️ decompwlj.com/2Dgraph500terms/

    #decompwlj #math #mathematics #sequence #OEIS #javascript #php #3D #numbers #decimal #expansions #digit #graph #threejs #webGL

  33. One day, one decomposition
    A256601: Numbers n such that the decimal expansions of both n and n^2 have 1 as smallest digit and 9 as largest digit

    3D graph, threejs - webGL ➡️ decompwlj.com/3Dgraph/A256601.
    3D graph Gen, threejs animation ➡️ decompwlj.com/3DgraphGen/A2566
    2D graph, first 500 terms ➡️ decompwlj.com/2Dgraph500terms/

    #decompwlj #math #mathematics #sequence #OEIS #javascript #php #3D #numbers #decimal #expansions #digit #graph #threejs #webGL

  34. One day, one decomposition
    A215940: Difference between the n-th and the first (identity) permutation of (0,...,m-1), interpreted as a decimal number, divided by 9 (for any m for which 10! >= m! >= n)

    3D graph, threejs - webGL ➡️ decompwlj.com/3Dgraph/A215940.
    2D graph, first 500 terms ➡️ decompwlj.com/2Dgraph500terms/

    #decompwlj #math #mathematics #sequence #OEIS #javascript #php #3D #difference #decimal #numbers #permutation #graph #threejs #webGL

  35. Tout le monde se moque de "quatre-vingts", et "quatre-vingt-dix", mais le plus claqué au sous-sol c'est quand même "soixante-dix", pas foutu de choisir entre le système décimal et le vigésimal… #JeDénonce #Décimal #Vigésimal #Hashtag