blob: 961c5d33db302281eda4b4603e2c27b885bae34a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include <stdio.h>
#include "gmp.h"
#include "gmp-impl.h"
#include "mpfr.h"
void
#if __STDC__
mpfr_div_2exp(mpfr_ptr y, mpfr_srcptr x, unsigned long int n, unsigned char rnd_mode)
#else
mpfr_div_2exp(y, x, n, rnd_mode)
mpfr_ptr y;
mpfr_srcptr x;
unsigned long int n;
unsigned char rnd_mode;
#endif
{
/* Important particular case */
if (y != x) mpfr_set(y, x, rnd_mode);
EXP(y) -= n;
return;
}
|