🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #52285

long doubles w/ gcc2.2.2 on a Sun SLC

#52285
From: Mark Nockleby
Date: Thu, 10 Dec 1992 05:32
23 lines
1904 bytes
I'd like to know how to use "long doubles". I'm using gcc (v2.2.2) on a
Sun Sparcstation SLC which is running under the SunOs (v4.1.1) operating
system. 

I've tried to substitute "long doubles" for "doubles" however this
by itself doesn't do anything.  (I have a program that computes
radial wave functions for the hydrogen atom by a power series and it
is sensitive to the precission of the floating point numbers at high
quantum number.  For instance if I replace "doubles" with "floats"
I generate lots and lots of noise.)  The gcc manual says that I must
#define the expression LONG_DOUBLE_TYPE_SIZE to be the size in bits
of the type "long double."  (Apparently the default size is the same
as the default size of "doubles," which I believe is 64 bits).
However, I'm not sure what this expression should be set to as I'm
not sure what the highest precision a Sun SLC is capable of.
I also don't know if I need to include any sort of special 
compiler options in my make file.

(According to K&R, the functions in <math.h> input and output doubles.
I'm NOT particularly worried about getting exp() and sqrt() to use
long doubles.  The noise in my program is caused by repeated 
multiplications and adding and subtracting lots of large numbers.)
Technical Details
Message-ID: <1g6kp0INNgu9@darkstar.UCSC.EDU>
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!hal.com!darkstar.UCSC.EDU!noc

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,54a44a5d97dca80d,start
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1992-12-09 21:39:01 PST
Path: arc1-ca.pugleaf.net!sparky!uunet!olivea!hal.com!darkstar.UCSC.EDU!noc
From: noc@maxwell.ucsc.edu (Mark Nockleby)
Newsgroups: gnu.gcc.help
Subject: long doubles w/ gcc2.2.2 on a Sun SLC
Summary: I need help with long doubles w/ gcc.
Keywords: long doubles double float gcc Sun SunOs SLC
Message-ID: <1g6kp0INNgu9@darkstar.UCSC.EDU>
Date: 10 Dec 92 05:32:16 GMT
Organization: University of California, Santa Cruz
Lines: 23
NNTP-Posting-Host: maxwell.ucsc.edu