UNPKG

747 Btext/coffeescriptView Raw
1test_clock = ->
2 run_test [
3
4 "clock(exp(i pi/3))",
5 "(-1)^(1/3)",
6
7 "clock(exp(-i pi/3))",
8 #"-(-1)^(2/3)",
9 "1/(-1)^(1/3)",
10
11 "rect(clock(3+4*i))", # needs sin(arctan(x)) and cos(arctan(x))
12 "3+4*i",
13
14 "clock((-108+108*(-1)^(1/2)*3^(1/2))^(1/3))",
15 "6*(-1)^(2/9)",
16
17 # TODO
18 # the changes to abs/mag of Jan 2017
19 # make it so a ends up as absolute value
20 # (-1)^(1/5)*abs(a)
21 # Rather, clock should somehow recognize
22 # that this is already very close to clock
23 # form and just replace the exponential with
24 # the power of -1
25 # Note that this was working before the Jan 2017
26 # changes because abs/mag were blissfully
27 # transforming abs(any_variable) -> any_variable
28 #"clock(exp(1/5*i*pi)*a)",
29 #"(-1)^(1/5)*a",
30
31 ]