include trigonometric function values for a step size of pi/6
This commit is contained in:
parent
c085482492
commit
ea018ab15e
1 changed files with 7 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
from collections import OrderedDict
|
||||||
from functools import reduce
|
from functools import reduce
|
||||||
|
|
||||||
from sympy import latex, simplify
|
from sympy import latex, simplify
|
||||||
|
@ -14,8 +15,12 @@ def as_csv(*values):
|
||||||
return reduce(lambda a, b: a + ";" + b, values)
|
return reduce(lambda a, b: a + ";" + b, values)
|
||||||
|
|
||||||
|
|
||||||
xs = map(simplify,
|
def deduplicate(iterable):
|
||||||
[i * pi / 4 for i in range(-16, 16)])
|
return list(OrderedDict.fromkeys(iterable))
|
||||||
|
|
||||||
|
|
||||||
|
xs = sorted(deduplicate(map(simplify,
|
||||||
|
[i * pi / 4 for i in range(-16, 16)] + [i * pi / 6 for i in range(-24, 24)])))
|
||||||
|
|
||||||
for x in xs:
|
for x in xs:
|
||||||
for f in [sin, cos, tan]:
|
for f in [sin, cos, tan]:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue