diff options
author | Ivan Kozik <ivan@ludios.org> | 2016-09-22 13:42:03 +0000 |
---|---|---|
committer | Andrea Leopardi <an.leopardi@gmail.com> | 2016-09-22 15:42:03 +0200 |
commit | 21c35e89e55187611cd1e79e6f46135cef579274 (patch) | |
tree | 9475817a393a1e2041013c5bf78181280301107b | |
parent | 50a6b8722bac91c4f7239c708ad311463ee83d7a (diff) | |
download | elixir-21c35e89e55187611cd1e79e6f46135cef579274.tar.gz |
Fix precision note in the "Operators" reference page (#5243)
-rw-r--r-- | lib/elixir/pages/Operators.md | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/elixir/pages/Operators.md b/lib/elixir/pages/Operators.md index ad1ccaaac..40f0387ad 100644 --- a/lib/elixir/pages/Operators.md +++ b/lib/elixir/pages/Operators.md @@ -67,7 +67,7 @@ The reason we can compare different data types is pragmatism. Sorting algorithms number < atom < reference < function < port < pid < tuple < map < list < bitstring ``` -When comparing two numbers of different types (a number is either an integer or a float), a conversion to the type with lesser precision will always occur, unless the comparison operator used is either `===` or `!==`. A float will be considered more precise than an integer, unless the float is greater/less than +/-9007199254740992.0, at which point all the significant figures of the float are to the left of the decimal point. This behavior exists so that the comparison of large numbers remains transitive. +When comparing two numbers of different types (a number is either an integer or a float), a conversion to the type with greater precision will always occur, unless the comparison operator used is either `===` or `!==`. A float will be considered more precise than an integer, unless the float is greater/less than +/-9007199254740992.0, at which point all the significant figures of the float are to the left of the decimal point. This behavior exists so that the comparison of large numbers remains transitive. The collection types are compared using the following rules: |