fdlibm is integrated with scilab on linux and Windows (32,64) and gives correct results 52/4552/2 apef
Shashank Sahni [Thu, 21 Jul 2011 08:07:30 +0000 (13:07 +0530)]
Change-Id: I028083d7332265d5f4af4f855eaa35b7acdfbd38

scilab/configure.ac
scilab/modules/elementary_functions/Makefile.am
scilab/modules/elementary_functions/src/c/fdlibm/Makefile.am
scilab/modules/elementary_functions/src/c/fdlibm/fdlibm.h
scilab/modules/elementary_functions/src/c/fdlibm/fdlibm.vcxproj

index f89a221..95e7fe9 100644 (file)
@@ -19,8 +19,6 @@ AC_INIT([Scilab],[5],[http://bugzilla.scilab.org/])
 AC_PREREQ(2.62)
 AC_CONFIG_MACRO_DIR([m4/])
 
-AC_PROG_RANLIB
-
 SCI_BUILDDIR="`pwd`"
 SCI_SRCDIR="$srcdir"
 SCI_SRCDIR_FULL="`cd $SCI_SRCDIR && pwd`"
index e6b4013..1bc7c35 100644 (file)
@@ -421,7 +421,7 @@ libscielementary_functions_algo_la_CFLAGS = $(libscielementary_functions_la_CFLA
 CHECK_SRC= $(ELEMENTARIES_FUNCTIONS_C_SOURCES) $(GATEWAY_C_SOURCES)
 INCLUDE_FLAGS = $(libscielementary_functions_la_CFLAGS)
 
-libscielementary_functions_la_LIBADD = libdummy-elementary_functions.la libscielementary_functions-algo.la
+libscielementary_functions_la_LIBADD = libdummy-elementary_functions.la libscielementary_functions-algo.la $(srcdir)/src/c/fdlibm/libfdlibm.la
 
 # Commented because it is one of the first module to be compiled
 #libdummy-elementary_functions.la   $(top_builddir)/modules/polynomials/libscipolynomials.la $(top_builddir)/libs/blas/libsciblas.la $(top_builddir)/modules/sparse/libscisparse.la $(top_builddir)/modules/string/libscistring.la $(top_builddir)/libs/MALLOC/libscimalloc.la $(top_builddir)/modules/output_stream/libscioutput_stream.la $(top_builddir)/libs/lapack/libscilapack.la $(top_builddir)/modules/integer/libsciinteger.la  $(top_builddir)/modules/cacsd/libscicacsd.la
index 62d869b..097b960 100644 (file)
@@ -19,5 +19,5 @@ libfdlibm_la_SOURCES= k_standard.c k_rem_pio2.c \
         s_log1p.c s_logb.c s_matherr.c s_modf.c s_nextafter.c \
         s_rint.c s_scalbn.c s_signgam.c s_significand.c s_sin.c \
         s_tan.c s_tanh.c
-libfdlibm_la_CFLAGS= -D_IEEE_LIBM
+libfdlibm_la_CFLAGS= -D_IEEE_LIBM -fno-strict-aliasing
 include_HEADERS=fdlibm.h
index bb97766..1d80282 100644 (file)
@@ -26,7 +26,7 @@
 
 #if defined(i386) || defined(i486) || \
        defined(intel) || defined(x86) || defined(i86pc) || \
-       defined(__alpha) || defined(__osf__)
+       defined(__alpha) || defined(__osf__) || defined(__x86_64__)
 #define __LITTLE_ENDIAN
 #endif
 
index 7e1a891..692877b 100644 (file)
@@ -82,7 +82,7 @@
       <AdditionalOptions>/Oi- %(AdditionalOptions)</AdditionalOptions>
       <Optimization>Disabled</Optimization>
       <AdditionalIncludeDirectories>.</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;__STDC__;_DEBUG;_WINDOWS;_USRDLL;FDLIBM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;__STDC__;_IEEE_LIBM;__LITTLE_ENDIAN;_DEBUG;_WINDOWS;_USRDLL;FDLIBM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
     <ClCompile>
       <Optimization>Disabled</Optimization>
       <AdditionalIncludeDirectories>.</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;__STDC__;_DEBUG;_WINDOWS;_USRDLL;FDLIBM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;__STDC__;_IEEE_LIBM;__LITTLE_ENDIAN;_DEBUG;_WINDOWS;_USRDLL;FDLIBM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>Default</BasicRuntimeChecks>
       <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
       <AdditionalIncludeDirectories>.</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;__STDC__;NDEBUG;_WINDOWS;_USRDLL;FDLIBM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;__STDC__;_IEEE_LIBM;__LITTLE_ENDIAN;NDEBUG;_WINDOWS;_USRDLL;FDLIBM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
       <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
       <WholeProgramOptimization>false</WholeProgramOptimization>
       <AdditionalIncludeDirectories>.</AdditionalIncludeDirectories>
-      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;__STDC__;NDEBUG;_WINDOWS;_USRDLL;FDLIBM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>_CRT_SECURE_NO_DEPRECATE;__STDC__;_IEEE_LIBM;__LITTLE_ENDIAN;NDEBUG;_WINDOWS;_USRDLL;FDLIBM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <StringPooling>true</StringPooling>
       <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
       <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>