habr.com /1 month ago

Вес 0.7000000000000001 кг: откуда в JavaScript берутся такие числа

Вес роутера 0.7000000000000001 кг на М.Видео. Штемпель 0.30000000000000004×2.5 см на Wildberries. Эти числа никто не вводил руками: где-то значение посчитали и забыли округлить. Чи...

Read source
dev.to /1 month ago

Our displayed price is allowed to be wrong in one direction only, and Intl decides how many decimals it is wrong by

Notifio is a £20 one-time purchase. Not £20 in the UK and something else elsewhere: every Checkout Session is created in GBP pence, the webhook records GBP, the licence is GBP. The...

Read source
dev.to /1 day ago

Body temperature in JavaScript: F/ C conversion, rounding and the fever line

Health and baby apps keep showing temperatures in both scales, and the conversion is the easy part. The parts that go wrong are the display rounding and the labels ("is 99.5 a feve...

Read source

Turn fresh research into a full content calendar

Use SocialBu to discover ideas, generate post drafts, and schedule them across your social channels.