3 #include "flower-test.hh"
7 #define EXP_PRINT(a) #a << ": " << (a) << "\n"
18 cout
<< r
<< " " << s
<< " " << q
<< "\n";
19 cout
<< r
+ q
<< " " << (s
* q
+ s
) << " " << (q
/ r
) << "\n";
21 cout
<< "inf * r" << i
* r
<< "inf * inf " << i
* i
<< "inf + r" << i
+ r
;
22 cout
<< EXP_PRINT(-i
);
23 cout
<< EXP_PRINT(i
>? -i
) << EXP_PRINT(i
>? r
);
24 cout
<< EXP_PRINT(i
<? r
) ;
26 cout
<< EXP_PRINT(one
/Rational (4));
27 cout
<< EXP_PRINT(one
+ one
/Rational (4));
31 cout
<< EXP_PRINT(nul
);
32 nul
-= Rational (2) * kwart
;
33 cout
<< EXP_PRINT(nul
);
35 cout
<< EXP_PRINT(Rational (1,128) + Rational (1919,128));