· 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 will soon meet a person who will play an important role in your life.


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.0033 sec