-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathh.cpp
More file actions
68 lines (56 loc) · 1.05 KB
/
h.cpp
File metadata and controls
68 lines (56 loc) · 1.05 KB
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
#include "h.h"
#include <cmath>
#define PI 3.14159265
double Complex::re() const
{
return this->re;
}
double Complex::im() const
{
return this->im;
}
double Complex::R() const
{
return sqrt(this->re * this->re + this->im * this->im);
}
double Complex::Phi() const
{
double t = atan2(re, im) * 180 / PI;
return ;
}
Complex Complex::y(const Complex& z)
{
return operator+(operator*(z,Complex(2, 0)),Complex::sin(operator-(z, Complex(0, 1))));
}
Complex Complex::sin(const Complex& z)
{
return Complex();
}
Complex Complex::cos(const Complex& z)
{
return Complex();
}
Complex Complex::ch(const Complex& z)
{
double result = 1;
double member = 1;
for (int i = 1; abs(member) >= 0,0001; i++)
{
member *= z * z;
member /= 2 * i * (2 * i - 1);
result += member;
}
return result;
}
Complex Complex::sh(const Complex& z)
{
return Complex();
}
Complex Complex::exp(const Complex& z)
{
return Complex();
}
Complex Complex::pow(const Complex& z1, const Complex& z2)
{
return Complex();
}