· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
GMP


GNU Multiple Precision Arithmetic Library

Numerical instability·Î °í¹ÎÇÏ°í °è½Ã´Ù¸é GMP¸¦ ½áº¸¼¼¿ä.

¿¹Á¦


#include <gmp.h>

int main()
{
   mpf_t fac;
   int i;

   mpf_init(fac);
   mpf_set_d(fac,(double) 1);

   for (i=1;i<40;i++) {
     mpf_mul_ui(fac, fac, (unsigned long) i);
   }

   gmp_printf("%.*Ff\n",40,fac);
}

ID
Password
Join
You have an ability to sense and know higher truth.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2008-11-08 20:19:49
Processing time 0.0047 sec