]> www.ginac.de Git - cln.git/blobdiff - src/float/transcendental/cl_F_catalanconst_var.cc
Finalize CLN 1.3.7 release.
[cln.git] / src / float / transcendental / cl_F_catalanconst_var.cc
index 733bc2ea7d189a89a9c5981129e9211d23bddac3..04d6966526346c40700d28332efd0a58db35c5bd 100644 (file)
@@ -1,33 +1,51 @@
 // cl_F_catalanconst.
 
 // General includes.
-#include "cl_sysdep.h"
-
-CL_PROVIDE(cl_F_catalanconst_var)
+#include "base/cl_sysdep.h"
 
 // Specification.
-#include "cl_F_tran.h"
+#include "float/transcendental/cl_F_tran.h"
 
 
 // Implementation.
 
-#include "cl_DS.h"
-#include "cl_LF.h"
-#include "cl_LF_impl.h"
-#include "cl_F.h"
+#include "base/digitseq/cl_DS.h"
+#include "float/lfloat/cl_LF.h"
+#include "float/lfloat/cl_LF_impl.h"
+#include "float/cl_F.h"
 
-// Mantisse der Catalanschen Konstante :
-  static const uintD catalanconst_mantisse [64/intDsize] =
-    #include "cl_F_catalanconst_var.h"
+namespace cln {
 
-cl_LF cl_LF_catalanconst = encode_LF_array(0,0,catalanconst_mantisse,64/intDsize);
+cl_LF& cl_LF_catalanconst()
+{
+       // Mantisse der Catalanschen Konstante :
+       static const uintD catalanconst_mantisse [64/intDsize] =
+       #include "cl_F_catalanconst_var.h"
+       static cl_LF val = encode_LF_array(0,0,catalanconst_mantisse,64/intDsize);
+       return val;
+}
 
-// Problem: If someone changes cl_free_hook, the destructor of this
+// Problem: If someone changes free_hook, the destructor of this
 // will call the new hook, passing it some pointer obtained by the old
-// cl_malloc_hook. ??
+// malloc_hook. ??
+
+const cl_SF& cl_SF_catalanconst()
+{
+       static const cl_SF val = cl_LF_to_SF(cl_LF_catalanconst());
+       return val;
+}
+
+const cl_DF& cl_DF_catalanconst()
+{
+       static const cl_DF val = cl_LF_to_DF(cl_LF_catalanconst());
+       return val;
+}
+
+const cl_FF& cl_FF_catalanconst()
+{
+       static const cl_FF val = cl_LF_to_FF(cl_LF_catalanconst());
+       return val;
+}
 
-const cl_SF cl_SF_catalanconst = cl_LF_to_SF(cl_LF_catalanconst);
-const cl_FF cl_FF_catalanconst = cl_LF_to_FF(cl_LF_catalanconst);
-const cl_DF cl_DF_catalanconst = cl_LF_to_DF(cl_LF_catalanconst);
+}  // namespace cln
 
-CL_PROVIDE_END(cl_F_catalanconst_var)