This is the mail archive of the
gsl-discuss@sources.redhat.com
mailing list for the GSL project.
Problems with long double version two...
- From: "Gabriel Andres Goenaga Jimenez" <gabrielgoenaga at hotmail dot com>
- To: gsl-discuss at sources dot redhat dot com
- Date: Tue, 12 Nov 2002 18:08:11 +0000
- Subject: Problems with long double version two...
- Bcc:
I'm tryin the following test program, for long double data type. I'm
working in a Pentium II, redhat linux 7.3, and compiling with gcc as follow:
gcc -o test test.c
When I run the program, the results from long double variables present
problems. I have tried the same program in a SUN, SUN alfa, silicon
graphycs architecture and with gcc, CC, cc, g++ compilers and the results
are the same.
I tried it in DOS with Borland c++ 3.0 compiler and the results were
corrects. But I need the corrects results in linux. Can anybody help me
please? I need to work with numbers in the range of long double (1e-4932 to
1e+4932)
What is the problem? The compiler, the architecture, or printf function
definition?
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
double a,b;
long double c,d;
a=1e308;
b=1e-308;
c=1e350;
d=1e-350;
printf("\nEl valor de a es %le ",a);
printf("\nEl valor de b es %le ",b);
printf("\nEl valor de c es %Le ",c);
printf("\nEl valor de d es %Le ",d);
}
Thanks,
Gabriel Goenaga Jimenez
Graduate Student
Physics Department
University of Puerto Rico
_________________________________________________________________
Charla con tus amigos en línea mediante MSN Messenger:
http://messenger.microsoft.com/es