diff options
author | 2021-05-23 11:37:06 -0400 | |
---|---|---|
committer | 2021-05-23 11:37:06 -0400 | |
commit | d16df7914c486cab6e6758c8788a21eddf7a6452 (patch) | |
tree | 5f365d3e78f7e5f02b8724a045ec454e237f48a0 | |
parent | Merge pull request #1607 from python-discord/vcokltfre/chore/modmail-tag-update (diff) |
fix: Remove the extra 'as' in floats.md
-rw-r--r-- | bot/resources/tags/floats.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bot/resources/tags/floats.md b/bot/resources/tags/floats.md index 7129b91bb..03fcd7268 100644 --- a/bot/resources/tags/floats.md +++ b/bot/resources/tags/floats.md @@ -5,7 +5,7 @@ You may have noticed that when doing arithmetic with floats in Python you someti 0.30000000000000004 ``` **Why this happens** -Internally your computer stores floats as as binary fractions. Many decimal values cannot be stored as exact binary fractions, which means an approximation has to be used. +Internally your computer stores floats as binary fractions. Many decimal values cannot be stored as exact binary fractions, which means an approximation has to be used. **How you can avoid this** You can use [math.isclose](https://docs.python.org/3/library/math.html#math.isclose) to check if two floats are close, or to get an exact decimal representation, you can use the [decimal](https://docs.python.org/3/library/decimal.html) or [fractions](https://docs.python.org/3/library/fractions.html) module. Here are some examples: |