From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,6d134459fc7a7fcb,start X-Google-Attributes: gidfa528,public X-Google-Thread: 1014db,6d134459fc7a7fcb,start X-Google-Attributes: gid1014db,public From: "Mickael GASTINEAU" Subject: print long double on Tru64 Unix5.0 Date: 2000/07/12 Message-ID: <8kig92$mhi$1@news6.isdnet.net>#1/1 X-Deja-AN: 645594554 X-Trace: news6.isdnet.net 963429474 23090 213.195.12.66 (12 Jul 2000 19:17:54 GMT) NNTP-Posting-Date: 12 Jul 2000 19:17:54 GMT Newsgroups: comp.lang.c,comp.unix.tru64 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3612.1700 X-Complaints-To: abuse@isdnet.net I have some trouble to print long double data on Tru64 Unix5.0A with the system call printf(3). After the 16th digit, it always print 0 for the digits. But long double has about 33 significant digits on Tru64Unix5.0A. I use the format "Le" (or LE) to specify the long double. The compiler is Compaq C (6.1) included in Tru64 Unix5.0A. I try to investigate with ladebug. Ladebug displays corretly the long double number. #include #include #include #include int main() { printf("sizeof(long double):%d\n",sizeof(long double)); printf("LDBL_DIG:%d\n",LDBL_DIG); printf("max long double=%.31Le\n",LDBL_MAX); printf("pi=%.31Le\n",atan2l(-1.0E0L,0.E0L)); } I compile my source with the command : cc ldbl.c -o ldbl -lm The output is : sizeof(long double):16 LDBL_DIG:33 max long double=1.1897314953572318000000000000000e+4932 pi=-1.5707963267948966000000000000000e+00 Mickael,