Subject: port-alpha/6634: divide by zero gives strange results on alpha
To: None <>
From: Tim Rightnour <>
List: netbsd-bugs
Date: 12/22/1998 07:32:09
>Number:         6634
>Category:       port-alpha
>Synopsis:       divide by zero gives strange results on alpha
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Dec 22 07:05:04 1998
>Originator:     Tim Rightnour
Tim Rightnour  -
Free Multi-Platform Operating System:
NetBSD Mailing lists on the web:
>Release:        1.3.2i386/1.3Ialpha<NetBSD-current source date>
System: NetBSD polaris 1.3.2 NetBSD 1.3.2 (POLARIS) #1: Fri Nov 6 07:41:34 MST 1998 root@:/usr/src/sys/arch/i386/compile/POLARIS i386

Ran a test program on i386 and alpha, to divide by zero, and spit out the
results, hoping to find out why perl dumps core when dividing by zero on
alpha, and found:

[/home/garbled] polaris# ./float
i: Inf
j: Inf

giauzar# ./float 
i: Inf
j: 340282346638528859811704183484516925440.000000

#include <stdio.h>

main() {

double i;
float j;

i = 12.0 / 0;
printf("i: %f\n", i);
j = 12.0 / 0;
printf("j: %f\n", j);

Not sure.. is this even a bug?  Is "Inf" being promoted incorrectly?