Subject: lib/7829: Infinity incorrect (arm32)
To: None <>
From: Richard Earnshaw <>
List: netbsd-bugs
Date: 06/21/1999 12:23:49
>Number:         7829
>Category:       lib
>Synopsis:       Infinity incorrect (arm32)
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    lib-bug-people (Library Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jun 21 12:05:01 1999
>Originator:     Richard Earnshaw
>Release:        NetBSD-current or earlier<NetBSD-current source date>
System: NetBSD shark1 1.4D NetBSD 1.4D (SHARK) #40: Fri Jun 18 17:14:00 BST 1999 rearnsha@shark1:/usr/src/sys/arch/arm32/compile/SHARK arm32

	The arm32 setting of infinity is incorrect, causing HUGE_VAL to be not
	very huge at all :-(


	Compile and run the following program, it should print "Inf, Inf",
	but doesn't.

	#include <math.h>
	union{int x[2]; double d;} p;

	  p.x[0] = 0x7ff00000;
	  p.x[1] = 0;
	  printf("%f, %f\n", HUGE_VAL, p.d);


	Correct setting (in lib/libc/arch/arm32/gen/infinity.c) should be

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