0.30000000000000004
proposal-decimal
0.30000000000000004 | proposal-decimal | |
---|---|---|
250 | 18 | |
1,465 | 525 | |
0.8% | 2.7% | |
2.0 | 7.7 | |
12 months ago | 2 months ago | |
CSS | HTML | |
GNU General Public License v3.0 only | - |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
0.30000000000000004
-
How to detect and fix flaky tests in Pytest
This is due to the way floating point numbers are represented in memory, certain numbers like 0.3 are stored as a number very close to the original value (0.30000000000000004), but not the exact same. This problem also exists in other languages like JavaScript and C++, but is much more likely to cause problems in common applications of Python like machine learning and data science.
- Floating Point Math
- 0.1 and 0.2 = 0.30000000000000004
- 0.30000000000000004
-
What even is a JSON number?
https://0.30000000000000004.com/
Although it would be good to move in the direction of using a BigDecimal equivalent by default when ingesting unknown data.
-
Working with Numpy floats and Forex financial instruments
There's no such thing as precision for floats. Floating-point calculations are always inaccurate: read this: https://0.30000000000000004.com/
- Just learned the difference between decimal and float
-
how do i make the decimals not fucked up
Edit: This specific example even has its own website: https://0.30000000000000004.com/
proposal-decimal
-
JavaScript Dates Are About to Be Fixed
> - Where are decimals, to avoid things like `parseInt(0.00000051) === 5`?
There is a draft proposal for this: https://github.com/tc39/proposal-decimal
Additionally, BigInt has been available for years: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
> - Why are inbuilt globals allowed to be modified?
> Error/null handling are still haphazard things.
How would you suggest addressing these in a way that is backwards compatible with all existing web content?
-
The many faces of undefined in JavaScript
The only mainstream language I'm aware of which supports high / arbitrary precision decimal numbers as a language feature is C#. Java, Python and Ruby have them as libraries included with the standard distribution, but to my knowledge they don't have any capabilities you couldn't implement yourself in a library.
Regardless, there is an active proposal to add a 128-bit decimal type to JS: https://github.com/tc39/proposal-decimal
-
Bloomberg invests in Node.js – Shouldn't you?
Bloomberg are currently sponsoring Igalia to work on adding native Decimal number support to JavaScript.
https://github.com/tc39/proposal-decimal
This is an active proposal and was last discussed in the September 2023 meeting.
- Rant - Javascript should be able to do simple f**king math by now
-
Wasmer takes WebAssembly libraries mainstream with WAI
would it be possible, for example, to access the standard decimal library of C# or Python via Javascript, thus not having to wait for the TC39 spec / implementation? [1]
[1] https://github.com/tc39/proposal-decimal
-
Speeding up the JavaScript ecosystem - one library at a time
There's a BigDecimal TC39 proposal to bring this kind of thing to the native language, but until then you have to choose between accuracy and performance.
-
Best way to deal with excessive decimal results in calculator
To solve the problem while JavaScript waits on its own BigDecimal API, you can use something like bignumber.js to perform your calculations.
-
How can i prove that 0.1 + 0.2 = 0.3 is there like a function or ANYTHING i can do to bypass this error which occurs in most programming languages
TC39 is now advancing Built-in decimal datatype in JavaScript.
- GitHub - tc39/proposal-decimal: Built-in decimal datatype in JavaScript
- JavaScript Decimal Proposal
What are some alternatives?
glibc - Unofficial mirror of sourceware glibc repository. Updated daily.
proposal-array-unique - ECMAScript proposal for Deduplicating method of Array
s2geometry - Computational geometry and spatial indexing on the sphere
eslint-plugin-big-number-rules - Enforce (or automatically fix) finance-safe calculations using BigNumber or similar libraries.
gcc
proposal-relative-indexing-method - A TC39 proposal to add an .at() method to all the basic indexable classes (Array, String, TypedArray)