This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: expf bug on 3.0 branch


Benjamin Kosnik <bkoz@redhat.com> writes:

| Gaby, can you please look at this?

I've just launched a bootstrap (on an i686-pc-linux) with this patch.
Please, could interested parties test it on affected plateforms?

Thanks,

-- Gaby

Index: ChangeLog
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/ChangeLog,v
retrieving revision 1.452.2.124
diff -p -r1.452.2.124 ChangeLog
*** ChangeLog	2001/07/02 23:31:27	1.452.2.124
--- ChangeLog	2001/07/06 21:58:15
***************
*** 1,3 ****
--- 1,10 ----
+ 2001-07-06  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
+ 
+ 	* libmath/Makefile.am (EXTRA_DIST): Remove atan2f.c and expf.c
+ 	* libmath/Makefile.in: Regenerate.
+ 	* libmath/expf.c: Remove.
+ 	* libmath/atan2f.c: Likewise.
+ 
  2001-07-02  Loren J. Rittle  <ljrittle@acm.org>
  
  	* acinclude.m4 (GLIBCPP_ENABLE_THREADS): Protect variable from shell
Index: libmath/Makefile.am
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/libmath/Makefile.am,v
retrieving revision 1.11.2.1
diff -p -r1.11.2.1 Makefile.am
*** Makefile.am	2001/06/24 13:02:53	1.11.2.1
--- Makefile.am	2001/07/06 21:58:15
*************** EXTRA_LONG_DOUBLE_yes = \
*** 31,37 ****
  	hypotl.c signbitl.c
  
  EXTRA_DIST = \
! 	hypot.c hypotf.c atan2f.c expf.c \
  	$(EXTRA_LONG_DOUBLE_yes) 
  
  libmath_la_LIBADD = \
--- 31,37 ----
  	hypotl.c signbitl.c
  
  EXTRA_DIST = \
! 	hypot.c hypotf.c \
  	$(EXTRA_LONG_DOUBLE_yes) 
  
  libmath_la_LIBADD = \
Index: libmath/Makefile.in
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/libmath/Makefile.in,v
retrieving revision 1.37.2.5
diff -p -r1.37.2.5 Makefile.in
*** Makefile.in	2001/06/25 21:03:07	1.37.2.5
--- Makefile.in	2001/07/06 21:58:15
*************** mkinstalldirs = $(SHELL) $(toplevel_srcd
*** 117,134 ****
  
  noinst_LTLIBRARIES = libmath.la
  
! EXTRA_LONG_DOUBLE_yes = \
! 	hypotl.c signbitl.c
  
  
! EXTRA_DIST = \
! 	hypot.c hypotf.c atan2f.c expf.c \
! 	$(EXTRA_LONG_DOUBLE_yes) 
  
  
! libmath_la_LIBADD = \
! 	@LIBMATHOBJS@ \
! 	$(EXTRA_LONG_DOUBLE_$(USE_COMPLEX_LONG_DOUBLE)) 
  
  
  libmath_la_DEPENDENCIES = $(libmath_la_LIBADD)
--- 117,129 ----
  
  noinst_LTLIBRARIES = libmath.la
  
! EXTRA_LONG_DOUBLE_yes =  	hypotl.c signbitl.c
  
  
! EXTRA_DIST =  	hypot.c hypotf.c 	$(EXTRA_LONG_DOUBLE_yes) 
  
  
! libmath_la_LIBADD =  	@LIBMATHOBJS@ 	$(EXTRA_LONG_DOUBLE_$(USE_COMPLEX_LONG_DOUBLE)) 
  
  
  libmath_la_DEPENDENCIES = $(libmath_la_LIBADD)
*************** LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES
*** 146,154 ****
  LIBIO_INCLUDES = @LIBIO_INCLUDES@
  CSHADOW_INCLUDES = @CSHADOW_INCLUDES@
  
! INCLUDES = \
! 	-I$(GLIBCPP_INCLUDE_DIR) -I$(top_builddir)/include  \
! 	$(TOPLEVEL_INCLUDES) 
  
  CONFIG_HEADER = ../config.h
  CONFIG_CLEAN_FILES = 
--- 141,147 ----
  LIBIO_INCLUDES = @LIBIO_INCLUDES@
  CSHADOW_INCLUDES = @CSHADOW_INCLUDES@
  
! INCLUDES =  	-I$(GLIBCPP_INCLUDE_DIR) -I$(top_builddir)/include  	$(TOPLEVEL_INCLUDES) 
  
  CONFIG_HEADER = ../config.h
  CONFIG_CLEAN_FILES = 
Index: libmath/atan2f.c
===================================================================
RCS file: atan2f.c
diff -N atan2f.c
*** /sourceware/cvs-tmp/cvs3dzbuZ	Fri Jul  6 14:58:16 2001
--- /dev/null	Tue May  5 13:32:27 1998
***************
*** 1,39 ****
- /* Compute arc tangent.  */
- 
- /* Copyright (C) 1997-1999 Free Software Foundation, Inc.
- 
-    This file is part of the GNU ISO C++ Library.  This library is free
-    software; you can redistribute it and/or modify it under the
-    terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2, or (at your option)
-    any later version.
- 
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
- 
-    You should have received a copy of the GNU General Public License along
-    with this library; see the file COPYING.  If not, write to the Free
-    Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-    USA.
- 
-    As a special exception, you may use this file as part of a free software
-    library without restriction.  Specifically, if other files instantiate
-    templates or use macros or inline functions from this file, or you compile
-    this file and link it with other files to produce an executable, this
-    file does not by itself cause the resulting executable to be covered by
-    the GNU General Public License.  This exception does not however
-    invalidate any other reasons why the executable file might be covered by
-    the GNU General Public License.  */
- 
- 
- #include <math.h>
- #include "mathconf.h"
- 
- float
- atan2f (float x, float y)
- {
-   /* We use the double version.  */
-   return atan2 (x, y);
- }
--- 0 ----
Index: libmath/expf.c
===================================================================
RCS file: expf.c
diff -N expf.c
*** /sourceware/cvs-tmp/cvsqaBw5E	Fri Jul  6 14:58:16 2001
--- /dev/null	Tue May  5 13:32:27 1998
***************
*** 1,39 ****
- /* Compute exponential function.  */
- 
- /* Copyright (C) 1997-1999 Free Software Foundation, Inc.
- 
-    This file is part of the GNU ISO C++ Library.  This library is free
-    software; you can redistribute it and/or modify it under the
-    terms of the GNU General Public License as published by the
-    Free Software Foundation; either version 2, or (at your option)
-    any later version.
- 
-    This library is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
- 
-    You should have received a copy of the GNU General Public License along
-    with this library; see the file COPYING.  If not, write to the Free
-    Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
-    USA.
- 
-    As a special exception, you may use this file as part of a free software
-    library without restriction.  Specifically, if other files instantiate
-    templates or use macros or inline functions from this file, or you compile
-    this file and link it with other files to produce an executable, this
-    file does not by itself cause the resulting executable to be covered by
-    the GNU General Public License.  This exception does not however
-    invalidate any other reasons why the executable file might be covered by
-    the GNU General Public License.  */
- 
- 
- #include <math.h>
- #include "mathconf.h"
- 
- float
- expf (float x)
- {
-   /* We use the double version.  */
-   return exp (x);
- }
--- 0 ----
Index: libmath/stubs.c
===================================================================
RCS file: /cvs/gcc/gcc/libstdc++-v3/libmath/stubs.c,v
retrieving revision 1.5.2.1
diff -p -r1.5.2.1 stubs.c
*** stubs.c	2001/06/24 13:02:53	1.5.2.1
--- stubs.c	2001/07/06 21:58:15
***************
*** 30,35 ****
--- 30,43 ----
  #include <math.h>
  #include <bits/c++config.h>
  
+ #ifndef _GLIBCPP_HAVE_ATAN2F
+ float
+ atan2f(float x, float y)
+ {
+   return (float) atan2(x, y);
+ }
+ #endif
+ 
  #if !defined(_GLIBCPP_HAVE_COSF) && !defined(_GLIBCPP_HAVE___BUILTIN_COSF)
  float
  cosf(float x)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]