mirror of
https://src.fedoraproject.org/rpms/sagemath.git
synced 2025-04-22 11:45:56 -04:00
Initial import (#877651).
This commit is contained in:
parent
257b1142ac
commit
86f823b2b0
41 changed files with 13000 additions and 0 deletions
65
sagemath-libmpc.patch
Normal file
65
sagemath-libmpc.patch
Normal file
|
@ -0,0 +1,65 @@
|
|||
diff -up sage-5.8/spkg/build/sage-5.8/c_lib/SConstruct.orig sage-5.8/spkg/build/sage-5.8/c_lib/SConstruct
|
||||
--- sage-5.8/spkg/build/sage-5.8/c_lib/SConstruct.orig 2013-02-23 12:42:08.694809731 -0300
|
||||
+++ sage-5.8/spkg/build/sage-5.8/c_lib/SConstruct 2013-02-23 12:43:00.412811711 -0300
|
||||
@@ -145,7 +145,7 @@ soname = libname + "." + major
|
||||
shlink_flags += [ '-Wl,-Bsymbolic', '-Wl,-soname=%s' % soname ]
|
||||
|
||||
lib = env.SharedLibrary( "csage", [ "src/" + x for x in srcFiles ],
|
||||
- LIBS=['ntl', 'pari', 'gmp', 'python$PYV'],
|
||||
+ LIBS=['ntl', 'pari', 'gmp', 'mpfr', 'python$PYV'],
|
||||
LIBPATH=['@@libdir@@','@@libdir@@/python$PYV/config/'],
|
||||
SHLIBSUFFIX=shlib_suffix,
|
||||
SHLINKFLAGS=shlink_flags,
|
||||
diff -up sage-5.8/spkg/build/sage-5.8/c_lib/src/stdsage.c.orig sage-5.8/spkg/build/sage-5.8/c_lib/src/stdsage.c
|
||||
--- sage-5.8/spkg/build/sage-5.8/c_lib/src/stdsage.c.orig 2013-02-23 12:42:18.286810098 -0300
|
||||
+++ sage-5.8/spkg/build/sage-5.8/c_lib/src/stdsage.c 2013-02-23 12:43:15.062812272 -0300
|
||||
@@ -58,3 +58,49 @@ void init_csage_module() {
|
||||
init_csage();
|
||||
#endif
|
||||
}
|
||||
+
|
||||
+#include <mpc.h>
|
||||
+
|
||||
+int
|
||||
+mpc_div_2ui (mpc_ptr a, mpc_srcptr b, unsigned long int c, mpc_rnd_t rnd)
|
||||
+{
|
||||
+ int inex_re, inex_im;
|
||||
+
|
||||
+ inex_re = mpfr_div_2ui (mpc_realref(a), mpc_realref(b), c, MPC_RND_RE(rnd));
|
||||
+ inex_im = mpfr_div_2ui (mpc_imagref(a), mpc_imagref(b), c, MPC_RND_IM(rnd));
|
||||
+
|
||||
+ return MPC_INEX(inex_re, inex_im);
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+mpc_div_2si (mpc_ptr a, mpc_srcptr b, long int c, mpc_rnd_t rnd)
|
||||
+{
|
||||
+ int inex_re, inex_im;
|
||||
+
|
||||
+ inex_re = mpfr_div_2si (mpc_realref(a), mpc_realref(b), c, MPC_RND_RE(rnd));
|
||||
+ inex_im = mpfr_div_2si (mpc_imagref(a), mpc_imagref(b), c, MPC_RND_IM(rnd));
|
||||
+
|
||||
+ return MPC_INEX(inex_re, inex_im);
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+mpc_mul_2ui (mpc_ptr a, mpc_srcptr b, unsigned long int c, mpc_rnd_t rnd)
|
||||
+{
|
||||
+ int inex_re, inex_im;
|
||||
+
|
||||
+ inex_re = mpfr_mul_2ui (mpc_realref(a), mpc_realref(b), c, MPC_RND_RE(rnd));
|
||||
+ inex_im = mpfr_mul_2ui (mpc_imagref(a), mpc_imagref(b), c, MPC_RND_IM(rnd));
|
||||
+
|
||||
+ return MPC_INEX(inex_re, inex_im);
|
||||
+}
|
||||
+
|
||||
+int
|
||||
+mpc_mul_2si (mpc_ptr a, mpc_srcptr b, long int c, mpc_rnd_t rnd)
|
||||
+{
|
||||
+ int inex_re, inex_im;
|
||||
+
|
||||
+ inex_re = mpfr_mul_2si (mpc_realref(a), mpc_realref(b), c, MPC_RND_RE(rnd));
|
||||
+ inex_im = mpfr_mul_2si (mpc_imagref(a), mpc_imagref(b), c, MPC_RND_IM(rnd));
|
||||
+
|
||||
+ return MPC_INEX(inex_re, inex_im);
|
||||
+}
|
Loading…
Add table
Add a link
Reference in a new issue