From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,313213915b4878b4,start X-Google-Attributes: gid111c93,public From: reg@orion.dwf.com () Subject: Alpha/Linux Numerics Please... Date: 2000/02/27 Message-ID: <89c7hl$3g2$1@sloth.swcp.com>#1/1 X-Deja-AN: 590606821 Organization: R.W.Clemens, Consulting Newsgroups: comp.os.linux.alpha I understood this once, but cant find my notes. Could someone verify or correct the following. Pointing to me where it is discussed would be even better... This has to do with porting some codes that run on the Sun and Linux/Intel to Linux/Alpha. It should be relatively simple (for these codes) but never is. --- Sun's and most other 'real' machines (those that dont run Windows) are BIGENDIAN. PC's are LITTLEENDIAN. The ALPHA can be set to be either, but when running LINUX is LITTLEENDIAN. ---- OK, Fortran, be it DEC(Compaq) Fortran or g77 The choice in Fortran is to make everything look like the Sun/PC (ignoring endian problems), viz integer 4bytes real 4bytes double 8bytes That is these DONT double on the Alpha. --- As far as I can tell, there is nothing like the sun '-r8' switch on either the fort (Dec/Compaq Fortran) or g77 compilers to default to 64 bit floats, and 128bit doubles. --- I am assuming that the C model has int 4bytes long 8bytes pointer 8bytes float 4bytes double 8bytes These can be found with a sizeof () so should be ok. --- I SUSPECT that there is a way to get to 128bit (16byte) 'long double' arithmetic in both C and Fortran, but the simple guess of 'long double' with gcc still produced an 8 bit size. Any thoughts here? -- Reg.Clemens reg@dwf.com