proposal-decimal icon indicating copy to clipboard operation
proposal-decimal copied to clipboard

Task: add concrete use cases to the readme

Open nicolo-ribaudo opened this issue 9 months ago • 1 comments

There are multiple use cases in https://github.com/tc39/proposal-decimal/issues/3, which should be added to the readme or a separate docs page.

The temporal cookbook has been helpful for this, showing concrete use cases and concrete solutions.

nicolo-ribaudo avatar Mar 13 '25 16:03 nicolo-ribaudo

I did some work on this in a previous iteration of the proposal and came up with these cookbook recipes. They'll certainly need to be adjusted to work with the proposal as it is now.

  • https://github.com/Igalia/decimal-playground/blob/main/src/examples/scientific.js - printing physics constants in scientific notation
  • https://github.com/Igalia/decimal-playground/pull/1 - React calculator app
  • https://gist.github.com/ptomato/6acf6b2eb8fe0a52ead93baeeedb02f6 - naive Bayes classifier

ptomato avatar Mar 13 '25 17:03 ptomato

I found when building my window splitter I needed really precise math to get the right result

https://react-window-splitter-six.vercel.app/

For this I turned to big.js

hipstersmoothie avatar Apr 26 '25 19:04 hipstersmoothie

I've finally managed to get around to making a little cookbook, something we've wanted for a long time. It's not as cool as Temporal's but I think it's a good start.

jessealama avatar Jul 03 '25 14:07 jessealama