Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jul 1997 12:32:27 +0900 (JST)
From:      mutoh@info.nara-k.ac.jp
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   ports/4093: ports Oleo problem
Message-ID:  <199707150332.MAA03462@mmove.info.nara-k.ac.jp>
Resent-Message-ID: <199707150340.UAA02118@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707150332.MAA03462>