Skip to content

Commit

Permalink
fix doctest
Browse files Browse the repository at this point in the history
  • Loading branch information
fkastner committed Sep 10, 2021
1 parent 443f3a1 commit 977c660
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions README.md
Expand Up @@ -32,27 +32,27 @@ julia>] add NiceNumbers
```julia
julia> using NiceNumbers

julia> n = NiceNumber(2,3,5);
julia> n = NiceNumber(2,3,5)
Nice number:
2 + 3 5
2+35

julia> n^2
Nice number:
49 + 12 5
49+125

julia> m = NiceNumber(3//5)
Nice number:
3//5

julia> n+m, n-m, n*m, n/m
(13//5 + 3 5, 7//5 + 3 5, 6//5 + 9//5 5, 10//3 + 5 5)
(13//5+35, 7//5+35, 6//5+9//55, 10//3+55)

julia> sqrt(m)
Nice number:
1//5 15
1//515

julia> sqrt(n)
ERROR: That's not nice anymore!
ERROR: sqrt(2+3⋅√5) is not nice anymore!
[...]
```

Expand All @@ -65,7 +65,7 @@ julia> n = norm([4,12,3] * √2)

julia> @nice m = norm([4,12,3] * 2)
Nice number:
13 2
132

julia> n == m
true
Expand Down
2 changes: 1 addition & 1 deletion docs/src/index.md
Expand Up @@ -43,7 +43,7 @@ Nice number:
1//5⋅√15
julia> sqrt(n)
ERROR: That's not nice anymore!
ERROR: sqrt(2+3⋅√5) is not nice anymore!
[...]
```

Expand Down

0 comments on commit 977c660

Please sign in to comment.