Subject: port-alpha/6634: divide by zero gives strange results on alpha
To: None <gnats-bugs@gnats.netbsd.org>
From: Tim Rightnour <root@polaris.garbled.net>
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
>Last-Modified:
>Originator:     Tim Rightnour
>Organization:
Tim Rightnour  -  root@garbled.net
Free Multi-Platform Operating System: http://www.netbsd.org
NetBSD Mailing lists on the web: http://mail-index.netbsd.org/mlist
>Release:        1.3.2i386/1.3Ialpha<NetBSD-current source date>
>Environment:
	
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


>Description:
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:

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

(alpha)
giauzar# ./float 
i: Inf
j: 340282346638528859811704183484516925440.000000

	
>How-To-Repeat:
#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);

}
	
>Fix:
Not sure.. is this even a bug?  Is "Inf" being promoted incorrectly?
	
>Audit-Trail:
>Unformatted: