Skip to content
Snippets Groups Projects
Select Git revision
  • c58daf3ab98dda807ecc6c46036939f71162519a
  • 2023 default protected
2 results

003-guile2.0.patch

Blame
  • 003-guile2.0.patch 13.30 KiB
    Description: Increase precision of floating point tests
     guile-2.0 has increased the precision of the floating point maths returns,
     so the test suite needs to allow for the correct values to be returned
     with higher precision. Thanks to Dave Pigott <dave.pigott@linaro.org>
     Also adapt the configure script to build against guile-2.0 - patch from
     Hilo Bengen <bengen@debian.org>.
     .
     libmatheval (1.1.11+dfsg-1.1) unstable; urgency=low
     .
       * Non-maintainer upload.
       * Migrate to guile-2.0 - patch from Hilo Bengen,
         extended to support higher precision of return values
         by guile-2.0. (Closes: #746013)
    Author: Neil Williams <codehelp@debian.org>
    Bug-Debian: https://bugs.debian.org/746013
    
    ---
    
    --- libmatheval-1.1.11+dfsg.orig/configure.in
    +++ libmatheval-1.1.11+dfsg/configure.in
    @@ -60,10 +60,11 @@ dnl Checks for library functions.
     AC_CHECK_FUNCS([bzero memset], [break])
     
     dnl Additional Guile feature checks.
    +CFLAGS="$CFLAGS $GUILE_CFLAGS"
     AC_CHECK_TYPE([scm_t_bits], [AC_DEFINE([HAVE_SCM_T_BITS], [1], [Define to 1 if you have the `scm_t_bits' type.])], [], [#include <libguile.h>])
    -AC_CHECK_LIB([guile], [scm_c_define_gsubr], [AC_DEFINE([HAVE_SCM_C_DEFINE_GSUBR], [1], [Define to 1 if you have the `scm_c_define_gsubr' function.])], [], [$GUILE_LDFLAGS])
    -AC_CHECK_LIB([guile], [scm_make_gsubr], [AC_DEFINE([HAVE_SCM_MAKE_GSUBR], [1], [Define to 1 if you have the `scm_make_gsubr' function.])], [], [$GUILE_LDFLAGS])
    -AC_CHECK_LIB([guile], [scm_num2dbl], [AC_DEFINE([HAVE_SCM_NUM2DBL], [1], [Define to 1 if you have the `scm_num2dbl' function.])], [], [$GUILE_LDFLAGS])
    +AC_CHECK_LIB([guile-2.0], [scm_c_define_gsubr], [AC_DEFINE([HAVE_SCM_C_DEFINE_GSUBR], [1], [Define to 1 if you have the `scm_c_define_gsubr' function.])], [], [$GUILE_LDFLAGS])
    +AC_CHECK_LIB([guile-2.0], [scm_make_gsubr], [AC_DEFINE([HAVE_SCM_MAKE_GSUBR], [1], [Define to 1 if you have the `scm_make_gsubr' function.])], [], [$GUILE_LDFLAGS])
    +AC_CHECK_LIB([guile-2.0], [scm_num2dbl], [AC_DEFINE([HAVE_SCM_NUM2DBL], [1], [Define to 1 if you have the `scm_num2dbl' function.])], [], [$GUILE_LDFLAGS])
     
     AC_CONFIG_FILES([Makefile doc/Makefile lib/Makefile])
     AC_OUTPUT(libmatheval.pc)
    --- libmatheval-1.1.11+dfsg.orig/tests/basics.at
    +++ libmatheval-1.1.11+dfsg/tests/basics.at
    @@ -62,7 +62,7 @@ AT_DATA([basics.scm],
     (display (evaluator-evaluate-x f 0))
     ]])
     
    -AT_CHECK([matheval.sh basics.scm], [ignore], [10.0], [ignore])
    +AT_CHECK([matheval.sh basics.scm], [ignore], [10.000000000000002], [ignore])
     
     AT_DATA([basics.scm],
     [[
    @@ -70,7 +70,7 @@ AT_DATA([basics.scm],
     (display (evaluator-evaluate-x f 0.7))
     ]])
     
    -AT_CHECK([matheval.sh basics.scm], [ignore], [0.220966666722528], [ignore])
    +AT_CHECK([matheval.sh basics.scm], [ignore], [0.22096666672252796], [ignore])
     
     AT_DATA([basics.scm],
     [[
    @@ -78,7 +78,7 @@ AT_DATA([basics.scm],
     (display (evaluator-evaluate-x-y f 0.4 -0.7))
     ]])
     
    -AT_CHECK([matheval.sh basics.scm], [ignore], [-1.14962406520749], [ignore])
    +AT_CHECK([matheval.sh basics.scm], [ignore], [-1.1496240652074883], [ignore])
     
     AT_DATA([basics.scm],
     [[
    @@ -86,7 +86,7 @@ AT_DATA([basics.scm],
     (display (evaluator-evaluate-x-y-z f 11.2 0.41 -0.66))
     ]])
     
    -AT_CHECK([matheval.sh basics.scm], [ignore], [3.99876152571934], [ignore])
    +AT_CHECK([matheval.sh basics.scm], [ignore], [3.9987615257193383], [ignore])