|
|
|
![]() |
|
Strumenti |
![]() |
#1 |
Senior Member
Iscritto dal: Sep 2002
Città: vinci-spicchio
Messaggi: 530
|
Gestire numeri interi grandi in c/c++
Ho un problema riguardante la grestione delle operazioni con numeri grandi in c++, dovendo fare un programma di crittografia basato su numeri primi abbastanza grandi capita che debba fare operazioni del tipo 90^150, 90 elevato alla 150, il c++ mi restituisce un numero approssimato mentre a me mi servono tutti i numeri senza approsimazioni, mi chiedevo se sesiste un metodo o una libreria per fare ciò.
__________________
Intel Pentium DualCore E2140 1,60 GHz , Asus P5LD2 R2.0,Sapphire x600xt 128Mb,hauppauge winTV,2x256Mb Ddr2 Vitesta 533Mhz,western digital caviar 160gb, seagate 20gb 5400giri, maxtor 40gb 7200giri, dvd+-rw gigabyte(BTC) 4x,Samsung writemaster dvd duallayer 18x , edimax wireless<-->router D-link G604T. |
![]() |
![]() |
![]() |
#2 | |
Senior Member
Iscritto dal: Nov 2002
Città: Singularity
Messaggi: 894
|
Re: Gestire numeri interi grandi in c/c++
Quote:
http://orion.math.iastate.edu/cbergm...o/bignums.html Sembra che la libreria più semplice da usare sia NTL. La trovi qui: http://www.shoup.net/ntl/index.html
__________________
echo 'main(k){float r,i,j,x,y=-15;while(puts(""),y++<16)for(x=-39;x++<40;putchar(" .:-;!/>"[k&7])) for(k=0,r=x/20,i=y/8;j=r*r-i*i+.1, i=2*r*i+.6,j*j+i*i<11&&k++<111;r=j);}'&>jul.c;gcc -o jul jul.c;./jul |Only Connect| "To understand is to perceive patterns" Isaiah Berlin "People often speak of their faith, but act according to their instincts." Nietzsche - Bayesian Empirimancer - wizardry |
|
![]() |
![]() |
![]() |
#3 | |
Member
Iscritto dal: Dec 2004
Città: Alessandria
Messaggi: 97
|
Re: Gestire numeri interi grandi in c/c++
Quote:
__________________
Se fosse cane...bau Se fosse gatto...miao Se fosse tardi...ciao |
|
![]() |
![]() |
![]() |
Strumenti | |
|
|
Tutti gli orari sono GMT +1. Ora sono le: 07:58.