From owner-freebsd-ports Mon Jul 14 20:40:09 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id UAA02133 for ports-outgoing; Mon, 14 Jul 1997 20:40:09 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id UAA02118; Mon, 14 Jul 1997 20:40:05 -0700 (PDT) Resent-Date: Mon, 14 Jul 1997 20:40:05 -0700 (PDT) Resent-Message-Id: <199707150340.UAA02118@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-ports Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, mutoh@info.nara-k.ac.jp Received: from mmove.info.nara-k.ac.jp (mmove.info.nara-k.ac.jp [202.24.246.110]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id UAA02000 for ; Mon, 14 Jul 1997 20:37:14 -0700 (PDT) Received: (from mutoh@localhost) by mmove.info.nara-k.ac.jp (8.8.5/8.8.5) id MAA03462; Tue, 15 Jul 1997 12:32:27 +0900 (JST) Message-Id: <199707150332.MAA03462@mmove.info.nara-k.ac.jp> Date: Tue, 15 Jul 1997 12:32:27 +0900 (JST) From: mutoh@info.nara-k.ac.jp Reply-To: mutoh@info.nara-k.ac.jp To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: ports/4093: ports Oleo problem Sender: owner-ports@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 4093 >Category: ports >Synopsis: [oleo] Calculating 1/1 becomes infinity. >Confidential: no >Severity: critical >Priority: medium >Responsible: freebsd-ports >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 14 20:40:03 PDT 1997 >Last-Modified: >Originator: Takeshi MUTOH >Organization: Nara National College of Technology, Dept. of Information Engineering >Release: FreeBSD 2.2-current >Environment: FreeBSD mmove 2.2.1-RELEASE FreeBSD 2.2.1-RELEASE #0: Fri Jul 11 11:23:17 JST 1997 mutoh@mmove.info.nara-k.ac.jp:/usr/src/sys/compile/PAO i386 >Description: In FreeBSD, "1./0." becomes infinity without calling function, but it becomes "1" with calling function. Using oleo's function divide, the value "#INFINITY" becomes "1". So 1./1. in a cell under oleo becomes be equal to "#INFINITY". >How-To-Repeat: Please input "1/1" in a cell. It becomes "#INFINITY". >Fix: Please apply following patch. *** io-utils.c.org Tue Jul 15 08:26:11 1997 --- io-utils.c Tue Jul 15 08:27:25 1997 *************** *** 57,70 **** char iname[] = "#INFINITY"; char mname[] = "#MINUS_INFINITY"; - static double - divide (a, b) - double a; - double b; - { - return a / b; - } - static RETSIGTYPE ignore_sig (sig) int sig; --- 57,62 ---- *************** *** 86,96 **** #endif { (void)signal (SIGFPE, ignore_sig); ! __plinf = divide (1., 0.); (void)signal (SIGFPE, ignore_sig); ! __neinf = divide (-1., 0.); (void)signal (SIGFPE, ignore_sig); ! __nan = __plinf + __neinf; } --- 78,88 ---- #endif { (void)signal (SIGFPE, ignore_sig); ! __plinf = 1./0.; (void)signal (SIGFPE, ignore_sig); ! __neinf = -1./0.; (void)signal (SIGFPE, ignore_sig); ! __nan = 0./0.; } >Audit-Trail: >Unformatted: