summaryrefslogtreecommitdiff
path: root/main/mapc_pt1_main.cc
blob: ded8d541c5eceb6242f04534fbcadd191e64d03c (plain)
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
#include <cassert>
#include <cstdlib>
#include <fstream>
#include <iostream>

#include <fpconversion.h>
#include <kpoint1d.h>

using namespace std;

//int main(const int argc, const char* argv[])
int main()
{
//  ofstream of(argv[1]);
  
  long i, j;
  
  long        pxp[] = { 2 };
  bigrational pxc[] = { 1, 0, - bigrational(1, 4) };
//  long        pxp[] = { 1 };
//  bigrational pxc[] = { 1, - bigrational(1, 2) };
  K_RATPOLY   PX(1, pxp, 3, pxc);
  cerr << " PX = " << endl << flush;
  cerr << PX << endl << flush;
  
  long        pyp[] = { 2 };
  bigrational pyc[] = { 1, 0, - bigrational(1, 9) };
//  long        pyp[] = { 1 };
//  bigrational pyc[] = { 1, - bigrational(1, 3) };
  K_RATPOLY   PY(1, pyp, 3, pyc);
  cerr << " PY = " << endl << flush;
  cerr << PY << endl << flush;
  
  ROOT1 rx(PX, - bigrational(1, 4), 1);
  cerr << " rx = " << rx << endl << flush;
  
  ROOT1 ry(PY, - bigrational(1, 9), 1);
  cerr << " ry = " << ry << endl << flush;

  K_POINT1D x(rx);
  cerr << " x = " << x << endl << flush;
  
  K_POINT1D y(ry);
//  K_POINT1D y(bigrational(3));
  cerr << " y = " << y << endl << flush;
  
  K_POINT1D z = x / y;
  cerr << " z = " << z << endl << flush;

//  long        pwp[] = { 3 };
//  bigrational pwc[] = { 0, 1, 2, 0 };
//  K_RATPOLY   PW(1, pwp, 4, pwc);
//  cerr << " PW = " << endl << flush;
//  cerr << PW << endl << flush;
//  
//  PW.reduce_deg();
//  cerr << " PW = " << endl << flush;
//  cerr << PW << endl << flush;
//  
//  K_RATPOLY PT = PW.rm_x_factor();
//  cerr << " PT = " << endl << flush;
//  cerr << PT << endl << flush;
  
  return 0;
}