diff -Naur cln.orig/include/cln/dfloat.h cln/include/cln/dfloat.h --- cln.orig/include/cln/dfloat.h 2004-11-23 22:57:11.000000000 +0100 +++ cln/include/cln/dfloat.h 2004-11-24 00:08:11.000000000 +0100 @@ -47,18 +47,38 @@ // Liefert zu zwei Double-Float x und y : (+ x y), ein DF. extern const cl_DF operator+ (const cl_DF& x, const cl_DF& y); +// The C++ compiler may be confused about the following: +inline const cl_DF operator+ (const cl_DF& x, const double y) + { return x + cl_DF(y); } +inline const cl_DF operator+ (const double x, const cl_DF& y) + { return cl_DF(x) + y; } // Liefert zu zwei Double-Float x und y : (- x y), ein DF. extern const cl_DF operator- (const cl_DF& x, const cl_DF& y); +// The C++ compiler may be confused about the following: +inline const cl_DF operator- (const cl_DF& x, const double y) + { return x - cl_DF(y); } +inline const cl_DF operator- (const double x, const cl_DF& y) + { return cl_DF(x) - y; } // Liefert zu zwei Double-Float x und y : (* x y), ein DF. extern const cl_DF operator* (const cl_DF& x, const cl_DF& y); +// The C++ compiler may be confused about the following: +inline const cl_DF operator* (const cl_DF& x, const double y) + { return x * cl_DF(y); } +inline const cl_DF operator* (const double x, const cl_DF& y) + { return cl_DF(x) * y; } // Liefert zu einem Double-Float x : (* x x), ein DF. inline const cl_DF square (const cl_DF& x) { return x*x; } // Liefert zu zwei Double-Float x und y : (/ x y), ein DF. extern const cl_DF operator/ (const cl_DF& x, const cl_DF& y); +// The C++ compiler may be confused about the following: +inline const cl_DF operator/ (const cl_DF& x, const double y) + { return x / cl_DF(y); } +inline const cl_DF operator/ (const double x, const cl_DF& y) + { return cl_DF(x) / y; } // Liefert zu einem Double-Float x>=0 : (sqrt x), ein DF. extern const cl_DF sqrt (const cl_DF& x); diff -Naur cln.orig/include/cln/ffloat.h cln/include/cln/ffloat.h --- cln.orig/include/cln/ffloat.h 2004-11-23 22:57:11.000000000 +0100 +++ cln/include/cln/ffloat.h 2004-11-22 23:46:30.000000000 +0100 @@ -47,18 +47,38 @@ // Liefert zu zwei Single-Float x und y : (+ x y), ein FF. extern const cl_FF operator+ (const cl_FF& x, const cl_FF& y); +// The C++ compiler may be confused about the following: +inline const cl_FF operator+ (const cl_FF& x, const float y) + { return x + cl_FF(y); } +inline const cl_FF operator+ (const float x, const cl_FF& y) + { return cl_FF(x) + y; } // Liefert zu zwei Single-Float x und y : (- x y), ein FF. extern const cl_FF operator- (const cl_FF& x, const cl_FF& y); +// The C++ compiler may be confused about the following: +inline const cl_FF operator- (const cl_FF& x, const float y) + { return x - cl_FF(y); } +inline const cl_FF operator- (const float x, const cl_FF& y) + { return cl_FF(x) - y; } // Liefert zu zwei Single-Float x und y : (* x y), ein FF. extern const cl_FF operator* (const cl_FF& x, const cl_FF& y); +// The C++ compiler may be confused about the following: +inline const cl_FF operator* (const cl_FF& x, const float y) + { return x * cl_FF(y); } +inline const cl_FF operator* (const float x, const cl_FF& y) + { return cl_FF(x) * y; } // Liefert zu einem Single-Float x : (* x x), ein FF. inline const cl_FF square (const cl_FF& x) { return x*x; } // Liefert zu zwei Single-Float x und y : (/ x y), ein FF. extern const cl_FF operator/ (const cl_FF& x, const cl_FF& y); +// The C++ compiler may be confused about the following: +inline const cl_FF operator/ (const cl_FF& x, const float y) + { return x / cl_FF(y); } +inline const cl_FF operator/ (const float x, const cl_FF& y) + { return cl_FF(x) / y; } // Liefert zu einem Single-Float x>=0 : (sqrt x), ein FF. extern const cl_FF sqrt (const cl_FF& x);