Annotation of OpenXM/src/mpfr/bfsize/bfsize.c, Revision 1.1
1.1 ! takayama 1: #include <stdio.h>
! 2: #include "gmp.h"
! 3: #include "gmp-impl.h"
! 4: #include "mpfr.h"
! 5:
! 6: int main(void) {
! 7: mpfr_t x;
! 8: int m,n,i;
! 9: mpfr_init2(x,0xff);
! 10: mpfr_set_d(x,3.14159,MPFR_RNDD);
! 11: mpfr_out_str(stdout,2,0,x,MPFR_RNDD);
! 12: printf("\n");
! 13: printf("Dump of mpfr_t x: ");
! 14: n = sizeof(mpfr_t);
! 15: m = sizeof(mp_limb_t);
! 16: for (i=0; i<n; i++) {
! 17: if (i % m == 0) printf("|");
! 18: printf("%02x ",((unsigned char *)(&x))[i]);
! 19: }
! 20: printf("\n");
! 21: printf("sizeof(mpfr_t)=%d\n",(int) (sizeof(mpfr_t)));
! 22:
! 23: printf("sizeof(mp_limb_t)=%d\n",(int) (sizeof(mp_limb_t)));
! 24: printf("sizeof(unsigned long)=%d\n",(int) (sizeof(unsigned long)));
! 25:
! 26: printf("GMP_NUMB_BITS=%d\n",GMP_NUMB_BITS);
! 27: return(0);
! 28: }
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>