many edits
This commit is contained in:
@@ -570,16 +570,7 @@ In `Julia`, there is a richer set of error types. The value `0/0` will in fact n
|
||||
|
||||
|
||||
```{julia}
|
||||
sqrt(-1)
|
||||
```
|
||||
|
||||
For integer or real-valued inputs, the `sqrt` function expects non-negative values, so that the output will always be a real number.
|
||||
|
||||
|
||||
There are other types of errors. Overflow is a common one on most calculators. The value of $1000!$ is actually *very* large (over 2500 digits large). On the Google calculator it returns `Infinity`, a slight stretch. For `factorial(1000)` `Julia` returns an `OverflowError`. This means that the answer is too large to be represented as a regular integer.
|
||||
|
||||
|
||||
```{julia}
|
||||
#| error: true
|
||||
factorial(1000)
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user