[C con Clase] Saludos!!!!

Yolmer Rosales yolmer.rosales en gmail.com
Dom Abr 20 22:18:03 CEST 2014


Prueba con esto

http://www.ginac.de/CLN/cln.html#Introduction

CLN is a library for computations with all kinds of numbers. It has a rich
set of number classes:

   - Integers (with unlimited precision),
   - Rational numbers,
   - Floating-point numbers:
      - Short float,
      - Single float,
      - Double float,
      - Long float (with unlimited precision),
   - Complex numbers,
   - Modular integers (integers modulo a fixed integer),
   - Univariate polynomials.

The subtypes of the complex numbers among these are exactly the types of
numbers known to the Common Lisp language. Therefore CLN can be used for
Common Lisp implementations, giving ‘CLN’ another meaning: it becomes an
abbreviation of “Common Lisp Numbers”.

The CLN package implements

   - Elementary functions (+, -, *, /, sqrt, comparisons, ...),
   - Logical functions (logical and, or, not, ...),
   - Transcendental functions (exponential, logarithmic, trigonometric,
   hyperbolic functions and their inverse functions).

CLN is a C++ library. Using C++ as an implementation language provides


El 20 de abril de 2014, 14:58, Enrique Esparza Alegría <
espaleg en ciencias.unam.mx> escribió:

> Soy un estudiante y tengo un problema con el siguiente programa en C++
>
>
>
> #include<stdio.h>
> #include<conio.h>
> #include<stdlib.h>
> #include<math.h>
> main()
> {
> float i,b,P,F,fact;
> int N,V;
> FILE *archivo;
> archivo=fopen("Estadistica de Poisson.csv", "w");
> printf("Dame el numero de datos.\nN=");
> scanf("%d",&N);
> fprintf(archivo,"Cuentas/Segundo,Factorial,Probabilidad\n");
> printf("Dame el valor promedio P=\n");
> scanf("%f",&P);
> for (i=1;i<=N;i++)
> {
> printf("Dame el valor V=\n");
> scanf("%d",&V);
> fact=1;
> for (b=1;b<=V;b++)
> {
> fact=b*fact;
> }
> F=pow(P,V)/(fact*pow(2.718281828,P));
> printf("%d,%f,%f\n",V,fact,F);
> fprintf(archivo,"%d,%f,%f\n",V,fact,F);
> }
> getch();
> }
>
> Mi problema es que no puedo utilizar el programa debido a que requiero el
> factorial de un numero grande (factorial de 50) y debido a su tamaño no
> puede ser almacenado por ser muy grande.
> También me gustaría saber como almaceno números igualmente pequeños
> (10^-65)
>
> espero puedan ayudarme con mi problema
> Muchas gracias y saludos!
>
> _______________________________________________
> Lista de correo Cconclase Cconclase en listas.conclase.net
> http://listas.conclase.net/mailman/listinfo/cconclase_listas.conclase.net
> Bajas: http://listas.conclase.net/index.php?gid=2&mnu=FAQ
>
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://listas.conclase.net/pipermail/cconclase_listas.conclase.net/attachments/20140420/acd97468/attachment.html>


Más información sobre la lista de distribución Cconclase