]> www.ginac.de Git - cln.git/blob - src/rational/elem/cl_RA_from_I_posI.cc
bcecc7e7c170e60d293ae66a084d647d3cdc6955
[cln.git] / src / rational / elem / cl_RA_from_I_posI.cc
1 // I_I_to_RA().
2
3 // General includes.
4 #include "cl_sysdep.h"
5
6 // Specification.
7 #include "cl_RA.h"
8
9
10 // Implementation.
11
12 #include "cl_I.h"
13
14 const cl_RA I_I_to_RA (const cl_I& a, const cl_I& b)
15 {
16 // Methode:
17 // falls b=1, a als Ergebnis, sonst der echte Bruch a/b.
18         if (eq(b,1))
19                 return a;
20         else
21                 return allocate_ratio(a,b);
22 }