Subject: +Infinity D_Float on VAX?
To: NetBSD/vax Mailing List <port-vax@netbsd.org>
From: Brian D Chase <bdc@world.std.com>
List: port-vax
Date: 03/29/1999 00:25:18
Finally got the problems resolved with Povray running under NetBSD/vax
over the weekend.  A friend of mine trudged through the povray code and
found the problem to be in a test against the HUGE_VAL define from
<math.h> which gets its value from the __infinity symbol in libc.a or more
specifically from /usr/src/lib/libc/arch/vax/gen/infinity.c

I've checked all the other architectures listed under
/usr/src/lib/libc/arch, and it looks like just about all of them use

  const char __infinity[] = { 0, 0, 0, 0, 0, 0, (char)0xf0, 0x7f };

or an appropriate equivalent for the endianess of the architecture in
question.  The VAX file identifies this as the 387 format for +Infinity,
the other architectures seem to indicate that this is the IEEE format for
+Infinity.  It's not at all correct for the VAX.  In fact based on the
floating point spec for the VAX formats this byte pattern will evaluate to
'0' becuase it sets the exponent and sign bit to, and '0' is definitely
not what we want.

I don't see any info in my perusing the VAX Arch Ref Manual about what
value to set for use as +Infinity.  My best guess would be to set the
D_Float to have a positive sign bit, the maximum exponent value, and the
maximum fractional value. I'm not entirely sure if that's the right
approach, but I think it may work out.  Just wondering if anyone knows the
proper way to set +Infinity for a VAX D_float.

-brian.
---
Brian "JARAI" Chase | http://world.std.com/~bdc/ | VAXZilla LIVES!!!