[net.unix] Floating point numbers on the Pyramid

phaedrus@eneevax.UUCP (Pravin Kumar) (06/26/85)

Could someone tell me how the Pyramid 90x does floating point numbers?
Somebody told me it was the IEEE floating point std.  Is this true?  If
it is, could someone direct me to a paper (or tell me) what this std
looks like.

Thanks,

-- 
			Pravin Kumar

Don't bother me! I'm on an emergency third rail power trip.

ARPA:   phaedrus!eneevax@maryland
UUCP:   {seismo,allegra,brl-bmd}!umcp-cs!eneevax!phaedrus

vijay@topaz.ARPA (P. Vijay) (06/27/85)

	Could someone tell me how the Pyramid 90x
	does floating point numbers? Somebody told
	me it was the IEEE floating point std.  Is
	this true?  If it is, could someone direct
	me to a paper (or tell me) what this std
	looks like.

  If you mean the representation of floating point numbers in Pyramid-90x
hardware, it is as follows:

single precision:

  31 30    23 22		    0
  .  ........ .......................
  S     E    		 F

S - Represents sign bit. One represents negative and 0 represents positive.

E - These 8 bits represent a biased exponent.  The bias is 2**7 - 1 = 127.

F - This represents a 23 bit fraction.  There is an implied 1 beyond the
most significant bit (bit 22) of the fraction.  In other words, the fraction
is assumed to be a 24-bit normalized fraction and the most significant bit,
which is always 1 due to normalization, is not represented.  The binary
point is assumed to be between the implied bit and bit 22 (MSB) of the
fraction.  The value represented by a floating point number is given by:

	a. If 0 <= E <= 255 then
		value = (-1)**S * 2**(E-127) * (1.F)
	     [positive or negative normalized single precision real numbers]
	b. If E = 0 and F = 0 then
		value = (-1)**S * 0
	     [positive or negative zero]


double precision:

 63 62       52 51			                           0
  . ........... ....................................................
  S      E				F

S - sign bit 
E - 11 bit biased exponent.   Bias is 2**10 - 1 = 1023 
F - 52 bit fraction with a 1 implied beyond bit 51.  The binary point is
assumed between the implied bit and bit 51.

	a. If 0 <= E <= 2047 then
		value = (-1)**S * 2**(E-1023) * (1.F)
	     [positive or negative normalized double precision real numbers]
	b. If E = 0 and F = 0 then
		value = (-1)**S * 0
	     [positive or negative zero]

      I think this is IEE representation, but I am not quite sure about
it.

      All floating point results are computed to within half a unit in
the last place of the destination format.  All computations are performed
as if correct to infinite precision, then rounded.

						--Vijay--

clewis@mnetor.UUCP (Chris Lewis) (06/28/85)

As another question, now we're on the topic - has anybody got

	double a;
	a = va_args(ap, double);

to work on a Pyramid?
-- 
Chris Lewis,
UUCP: {allegra, linus, ihnp4}!utzoo!mnetor!clewis
BELL: (416)-475-8980 ext. 321

sambo@ukma.UUCP (Inventor of micro-S) (06/28/85)

In article <2405@topaz.ARPA> vijay@topaz.ARPA (P. Vijay) writes:
>	Could someone tell me how the Pyramid 90x
>	does floating point numbers? Somebody told
>	me it was the IEEE floating point std.

Everything you mentioned is specified by the IEEE standard.  (Actually, I
suppose you misquoted whatever source you used for the meanings of the single
and double precision formats - when e = 0 or 255 for single and 0 or 2047 for
double, the numbers are interpreted differently, so the formula you stated
applies only for the range 0 < e < 255 for single, and 0 < e < 2047 for
double.)  If the Pyramid conforms to the IEEE standard, then it must also
be able to simulate single-precision arithmetic (even if the numbers are
all double-precision); it must have four rounding modes; it must be able to
detect five different kinds of exceptions (invalid operation, division by zero,
overflow, underflow, and inexact), possibly providing a way of doing exception
handling; it must implement floating-point operations (including the basic
arithmetic operations) in the manner specified; and it must have at least two
different kinds of NaNs (Not a Number) and both a positive and negative
infinity.

I'm not sure to what address you should write to get a copy of the standard,
though I'm sure you can find out by contacting Richard Karpinski at:
   Dick Karpinski    Manager of Unix Services, UCSF Computer Center
   UUCP: ...!ucbvax!ucsfcgl!cca.ucsf!dick   (415) 666-4529 (12-7)
   BITNET: dick@ucsfcca   Compuserve: 70215,1277  Telemail: RKarpinski
   USPS: U-76 UCSF, San Francisco, CA 94143
I have a copy of the IEEE P754 Draft 10.1 of the standard in front of me,
which I have been told has been adopted as the official standard.
-----------------------------------------
Samuel A. Figueroa, Dept. of CS, Univ. of KY, Lexington, KY  40506-0027
ARPA: ukma!sambo<@ANL-MCS>, or sambo%ukma.uucp@anl-mcs.arpa,
      or even anlams!ukma!sambo@ucbvax.arpa
UUCP: {ucbvax,unmvax,boulder,oddjob}!anlams!ukma!sambo,
      or cbosgd!ukma!sambo

	"Micro-S is great, if only people would start using it."