This commit is contained in:
Miloslav Ciz 2022-07-05 15:26:04 +02:00
parent 2993dadb56
commit ff1da66b9c
16 changed files with 117 additions and 11 deletions

View file

@ -20,7 +20,7 @@ Some properties of and facts about this number follow:
- As it is one of the most commonly used numbers in programming, computers sometimes deal with it in special ways, for example in [assembly](assembly.md) languages there are often special instructions for comparing to 0 (e.g. `NEZ`, not equals zero) which can save memory and also be faster. So as a programmer you may optimize your program by trying to use zeros if possible.
- In [C](c.md) 0 represents the [false](false.md) value, a function returning 0 many times signifies an [error](error.md) during the execution of that function. However 0 also sometimes means success, e.g. as a return value from the main function.
**Dividing by zero is not defined**, it is a forbidden operation mainly because it breaks equations (allowing dividing by zero would also allow us to make basically any equation hold, even those that normally don't). In programming dividing by zero typically causes an error, crash of a program or an [exception](exception.md). When operating with [limits](limit.md) however, we can handle divisions by zero in a special way (find out what value an [expression](expression.md) approaches if we get infinitely close to dividing by 0).
**Dividing by zero is not defined**, it is a forbidden operation mainly because it breaks equations (allowing dividing by zero would also allow us to make basically any equation hold, even those that normally don't). In programming dividing by zero typically causes an error, crash of a program or an [exception](exception.md). In some programming languages [floating point](float.md) division by zero results in [infinity](infinity.md). When operating with [limits](limit.md), we can handle divisions by zero in a special way (find out what value an [expression](expression.md) approaches if we get infinitely close to dividing by 0).
## See Also