13 #include "cln/rational.h"
15 #include "cln/integer.h"
18 #include "cln/sfloat.h"
20 #include "cln/ffloat.h"
22 #include "cln/dfloat.h"
24 #include "cln/lfloat.h"
30 ALL_cl_LF_OPERATIONS_SAME_PRECISION()
32 const cl_R operator* (const cl_R& x, const cl_R& y)
34 if (eq(x,0)) { return 0; } // 0 * y = exakte 0
35 elif (eq(y,0)) { return 0; } // x * 0 = exakte 0
41 , /* I */ return mul(x,y);
42 , /* RT */ return mul(x,y);
43 , /* SF */ return mul(cl_I_to_SF(x),y);
44 , /* FF */ return mul(cl_I_to_FF(x),y);
45 , /* DF */ return mul(cl_I_to_DF(x),y);
46 , /* LF */ return cl_LF_I_mul(y,x);
50 , /* I */ return mul(x,y);
51 , /* RT */ return mul(x,y);
52 , /* SF */ return mul(cl_RA_to_SF(x),y);
53 , /* FF */ return mul(cl_RA_to_FF(x),y);
54 , /* DF */ return mul(cl_RA_to_DF(x),y);
55 , /* LF */ return cl_LF_RA_mul(y,x);
59 , /* I */ return mul(x,cl_I_to_SF(y));
60 , /* RT */ return mul(x,cl_RA_to_SF(y));
61 , /* SF */ return mul(x,y);
62 , /* FF */ return cl_FF_to_SF(mul(cl_SF_to_FF(x),y));
63 , /* DF */ return cl_DF_to_SF(mul(cl_SF_to_DF(x),y));
64 , /* LF */ return cl_LF_to_SF(mul(cl_SF_to_LF(x,LFlen0(y)),y));
68 , /* I */ return mul(x,cl_I_to_FF(y));
69 , /* RT */ return mul(x,cl_RA_to_FF(y));
70 , /* SF */ return cl_FF_to_SF(mul(x,cl_SF_to_FF(y)));
71 , /* FF */ return mul(x,y);
72 , /* DF */ return cl_DF_to_FF(mul(cl_FF_to_DF(x),y));
73 , /* LF */ return cl_LF_to_FF(mul(cl_FF_to_LF(x,LFlen0(y)),y));
77 , /* I */ return mul(x,cl_I_to_DF(y));
78 , /* RT */ return mul(x,cl_RA_to_DF(y));
79 , /* SF */ return cl_DF_to_SF(mul(x,cl_SF_to_DF(y)));
80 , /* FF */ return cl_DF_to_FF(mul(x,cl_FF_to_DF(y)));
81 , /* DF */ return mul(x,y);
82 , /* LF */ return cl_LF_to_DF(mul(cl_DF_to_LF(x,LFlen0(y)),y));
86 , /* I */ return cl_LF_I_mul(x,y);
87 , /* RT */ return cl_LF_RA_mul(x,y);
88 , /* SF */ return cl_LF_to_SF(mul(x,cl_SF_to_LF(y,LFlen0(x))));
89 , /* FF */ return cl_LF_to_FF(mul(x,cl_FF_to_LF(y,LFlen0(x))));
90 , /* DF */ return cl_LF_to_DF(mul(x,cl_DF_to_LF(y,LFlen0(x))));
91 , /* LF */ return mul(x,y);