LILIB (20151213) | 2015-12-13 20:00 |
- #include <iostream>
- #include "lilib.h"
- using namespace std;
- int main(){
- lilib::setPrecision(100);
- cout << "Long precision is " << lilib::getPrecision() << "." << endl;
- cout << endl;
- LongInterval x;
- x = 1;
- cout << "x = " << x << endl;
- x /= 3;
- cout << "x = " << x << endl;
- x *= 3;
- cout << "x = " << x << endl;
- cout << endl;
- int m = 3, n = 2, i, j;
- LongIntervalMatrix a(m, n), b, c;
- for(i = 0; i < m; i++){
- for(j = 0; j < n; j++){
- a[i][j] = n * i + j;
- }
- }
- b = trans(a);
- c = a * b;
- cout << "a = " << endl << a << endl;
- cout << "b = " << endl << b << endl;
- cout << "c = " << endl << c << endl;
- return 0;
- }
Long precision is 105. x = < 1.000000, 0.000000> x = < 3.333333e-1, 2.537942e-116> x = < 1.000000, 7.613826e-116> a = < 0.000000, 0.000000> < 1.000000, 0.000000> < 2.000000, 0.000000> < 3.000000, 0.000000> < 4.000000, 0.000000> < 5.000000, 0.000000> b = < 0.000000, 0.000000> < 2.000000, 0.000000> < 4.000000, 0.000000> < 1.000000, 0.000000> < 3.000000, 0.000000> < 5.000000, 0.000000> c = < 1.000000, 0.000000> < 3.000000, 0.000000> < 5.000000, 0.000000> < 3.000000, 0.000000> < 1.300000e1, 0.000000> < 2.300000e1, 0.000000> < 5.000000, 0.000000> < 2.300000e1, 0.000000> < 4.100000e1, 0.000000>