We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b27a099 commit bdf1c9cCopy full SHA for bdf1c9c
src/roots.jl
@@ -1,5 +1,8 @@
1
function to_root(io::IO, root, val)
2
- root == 1 && return val
+ if root == 1
3
+ write(io, string(val))
4
+ return
5
+ end
6
if root == 3
7
print(io, '∛')
8
elseif root == 4
test/runtests.jl
@@ -25,3 +25,5 @@ latexstring = "\\bf{boldface} \\it{italic} \\bb{blackboard} \\cal{calligraphic}
25
@test to_root(3,"542") == "∛5̅4̅2̅"
26
@test to_root(4,"542") == "∜5̅4̅2̅"
27
@test to_root(17,"542") == "¹⁷√5̅4̅2̅"
28
+@test to_root(1, "1") == "1"
29
+@test to_root(1, "-1") == "-1"
0 commit comments