-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlib.ua
72 lines (60 loc) · 1.33 KB
/
lib.ua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Note: All inverse functions are accessed using °
# Also: All angles are in radians
# Trigonometric
# sine
Sin ← ∿
# cosine
Cos ← ¯∿-η
# tangent
Tan ← setinv÷1:°∠
# cosecant
Csc ← ÷:1Sin
# secant
Sec ← ÷:1Cos
# cotangent
Cot ← setinv÷1°∠
# Hyperbolic
# hyperbolic sine
Sinh ← ⍜(×i)Sin
# hyperbolic cosine
Cosh ← Cosׯi
# hyperbolic tangent
Tanh ← ⍜(×i)Tan
# hyperbolic cosecant
Csch ← ¯⍜(ׯi)Csc
# hyperbolic secant
Sech ← Secׯi
# hyperbolic cotangent
Coth ← ¯⍜(ׯi)Cot
# Historical
# chord
Crd ← ⍜(÷2)Sin
# versine
VerSin ← -:1Cos
# coversine
CoverSin ← -:1Sin
# haversine
HaverSin ← ÷2VerSin
# ex-secant
ExSec ← -1Sec
# ex-cosecant
ExCsc ← -1Csc
# Other
# sine cardinal (sampling function)
Sinc ← ⟨1|÷⟜Sin⟩ =0.
# normalized sine cardinal
NSinc ← Sinc×π
# hyperbolic sine cardinal
Sinhc ← ⟨1|÷⟜Sinh⟩ =0.
# cardinal tangent
Tanc ← ⟨1|÷⟜Tan⟩ = 0.
# Complex Number
# argument (angle of complex number relative to positive real axis),
# also its inverse is Cis
Arg ← ∠°ℂ
# construct complex unit vector from angle (cosθ + isinθ or e^iθ),
# also its inverse is Arg
Cis ← ℂ°∠
# construct complex number from its angle and magnitude (re^iθ),
# also its inverse splits it into Arg and magnitude
Polar ← setinv×⟜⌵ Cis