summaryrefslogtreecommitdiff
path: root/set.c
diff options
context:
space:
mode:
authorhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>1999-06-09 18:03:33 +0000
committerhanrot <hanrot@280ebfd0-de03-0410-8827-d642c229c3f4>1999-06-09 18:03:33 +0000
commit0cf5fc5ea4b5ed46b454d3bf3adc620d9fff2d32 (patch)
tree62d12a119f5dfc15abe2f6d298617e174a0a06af /set.c
parent8d21dd7188076894a6f65e510797c8c6928e474f (diff)
downloadmpfr-0cf5fc5ea4b5ed46b454d3bf3adc620d9fff2d32.tar.gz
Initial revision
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'set.c')
-rw-r--r--set.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/set.c b/set.c
new file mode 100644
index 000000000..aa99ac9c8
--- /dev/null
+++ b/set.c
@@ -0,0 +1,11 @@
+#include "gmp.h"
+#include "gmp-impl.h"
+#include "mpfr.h"
+
+void mpfr_set(a, b, rnd_mode)
+mpfr_ptr a; mpfr_srcptr b; unsigned char rnd_mode;
+{
+ mpfr_round_raw(MANT(a), b->_mp_d, rnd_mode, b->_mp_size, PREC(a));
+ EXP(a) = EXP(b);
+ if (SIGN(a) != SIGN(b)) CHANGE_SIGN(a);
+}