Usenet comp.os.linux.alpha (1997-2013)
 help / color / mirror / Atom feed
* Alpha/Linux Numerics Please...
@ 2000-02-27  5:00 reg
  2000-02-28  5:00 ` Joern Amundsen
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: reg @ 2000-02-27  5:00 UTC (permalink / raw)


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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-03-06  5:00 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-02-27  5:00 Alpha/Linux Numerics Please reg
2000-02-28  5:00 ` Joern Amundsen
2000-02-28  5:00 ` Andrei A. Dergatchev
2000-03-02  5:00 ` Ryan C. Price
2000-03-02  5:00   ` Greg Lindahl
2000-03-06  5:00     ` Ryan C. Price
2000-03-02  5:00   ` Timo Biesenbach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox