- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
Latest commit
62 lines (62 loc) · 1.45 KB
/
Copy pathmain.cpp
File metadata and controls
62 lines (62 loc) · 1.45 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
#include<iostream>
#include<string>
#include<algorithm>
#include"int128.h"
usingnamespacejaro;
usingnamespacestd;
using ll=longlong;
ostream& operator <<(ostream& lhs,int128 rhs){
int128 ZERO{0ULL,0ULL};
string s;
while(jaro::less(ZERO,rhs)){
//cerr<<rhs.highbit<<" "<<rhs.lowbit<<endl;
s+='0'+modulo(rhs,10);
rhs=divide(rhs,10);
}
reverse(s.begin(),s.end());
return lhs<<s;
}
intmain(){
// Mat translation;
// translation.mat.resize(4,vector<Poly>(4));
// Poly ONE{vector<Mono>{Mono{1}}};
// translation[0][0]=ONE;
// translation[1][1]=ONE;
// translation[2][2]=ONE;
// translation[3][3]=ONE;
// Poly X{{{1,{{"x",1}}}}};
// Poly Y{{{1,{{"y",1}}}}};
// Poly Z{{{1,{{"z",1}}}}};
// translation[0][3]=X;
// translation[1][3]=Y;
// translation[2][3]=Z;
// Mat yaw;
// yaw.mat.resize(4,vector<Poly>(4));
// Poly ThetaC{{{1,{{"cos(yaw)",1}}}}};
// Poly ThetaS{{{1,{{"sin(yaw)",1}}}}};
// /*
// * (x+zi)(cos+isin)=(xcos-zsin)+(zcos+xsin)i
// */
// yaw[0][0]=ThetaC;
// yaw[0][2]=-ThetaS;
// yaw[1][1]=ONE;
// yaw[2][0]=ThetaS;
// yaw[2][2]=ThetaC;
// yaw[3][3]=ONE;
// Mat pitch;
// pitch.mat.resize(4,vector<Poly>(4));
// Poly PhiC{{{1,{{"cos(pitch)",1}}}}};
// Poly PhiS{{{1,{{"sin(pitch)",1}}}}};
// /*
// * (y+iz)(cos+isin)=(ycos-zsin)+(zcos+ysin)i
// */
// pitch[0][0]=ONE;
// pitch[1][1]=PhiC;
// pitch[1][2]=PhiS;
// pitch[2][1]=PhiS;
// pitch[2][2]=PhiC;
// pitch[3][3]=ONE;
// cerr<<pitch*yaw*translation;
// return 0;
cout<<multiply_raw(1ULL<<60,1ULL<<9);
}