public inbox for gsl-discuss@sourceware.org
 help / color / mirror / Atom feed
From: "Gabriel Andres Goenaga Jimenez" <gabrielgoenaga@hotmail.com>
To: gsl-discuss@sources.redhat.com
Subject: Problems with long double version two...
Date: Tue, 12 Nov 2002 10:30:00 -0000	[thread overview]
Message-ID: <F179r8pkpLkTgbLYluL000001d3@hotmail.com> (raw)

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

             reply	other threads:[~2002-11-12 18:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-12 10:30 Gabriel Andres Goenaga Jimenez [this message]
2002-11-12 11:38 ` Jeff Spirko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F179r8pkpLkTgbLYluL000001d3@hotmail.com \
    --to=gabrielgoenaga@hotmail.com \
    --cc=gsl-discuss@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).