Hello community, here is the log from the commit of package ghc-ieee754 for openSUSE:Factory checked in at 2016-07-21 08:10:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-ieee754 (Old) and /work/SRC/openSUSE:Factory/.ghc-ieee754.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-ieee754" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-ieee754/ghc-ieee754.changes 2015-11-26 17:02:34.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.ghc-ieee754.new/ghc-ieee754.changes 2016-07-21 08:10:47.000000000 +0200 @@ -1,0 +2,5 @@ +Sun Jul 10 17:07:52 UTC 2016 - [email protected] + +- Update to version 0.7.8 revision 0 with cabal2obs. + +------------------------------------------------------------------- Old: ---- ieee754-0.7.6.tar.gz New: ---- ieee754-0.7.8.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-ieee754.spec ++++++ --- /var/tmp/diff_new_pack.yzlRia/_old 2016-07-21 08:10:48.000000000 +0200 +++ /var/tmp/diff_new_pack.yzlRia/_new 2016-07-21 08:10:48.000000000 +0200 @@ -1,7 +1,7 @@ # # spec file for package ghc-ieee754 # -# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -15,39 +15,35 @@ # Please submit bugfixes or comments via http://bugs.opensuse.org/ # -%global pkg_name ieee754 -Name: ghc-ieee754 -Version: 0.7.6 +%global pkg_name ieee754 +Name: ghc-%{pkg_name} +Version: 0.7.8 Release: 0 Summary: Utilities for dealing with IEEE floating point numbers -Group: System/Libraries - License: BSD-3-Clause +Group: System/Libraries Url: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build - BuildRequires: ghc-Cabal-devel BuildRequires: ghc-rpm-macros +BuildRoot: %{_tmppath}/%{name}-%{version}-build %description Utilities for dealing with IEEE floating point numbers, ported from the Tango math library; approximate and exact equality comparisons for general types. - %package devel Summary: Haskell %{pkg_name} library development files Group: Development/Libraries/Other +Requires: %{name} = %{version}-%{release} Requires: ghc-compiler = %{ghc_version} Requires(post): ghc-compiler = %{ghc_version} Requires(postun): ghc-compiler = %{ghc_version} -Requires: %{name} = %{version}-%{release} %description devel This package provides the Haskell %{pkg_name} library development files. - %prep %setup -q -n %{pkg_name}-%{version} @@ -63,19 +59,15 @@ %post devel %ghc_pkg_recache - %postun devel %ghc_pkg_recache - %files -f %{name}.files %defattr(-,root,root,-) %doc LICENSE - %files devel -f %{name}-devel.files %defattr(-,root,root,-) -%doc LICENSE.Tango - +%doc LICENSE.Tango NEWS %changelog ++++++ ieee754-0.7.6.tar.gz -> ieee754-0.7.8.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ieee754-0.7.6/NEWS new/ieee754-0.7.8/NEWS --- old/ieee754-0.7.6/NEWS 2015-01-26 16:26:22.000000000 +0100 +++ new/ieee754-0.7.8/NEWS 2016-01-08 01:18:06.000000000 +0100 @@ -1,3 +1,16 @@ +Changes in 0.7.8: + +* Alain O'Dea fixed broken illumos build. + +* Simplified endianness detection in C code. + + +Changes in 0.7.7: + +* Johan Kiviniemi added tests for minNormal, maxFinite, epsilon, + maxNaNPayload. + + Changes in 0.7.6: * Fix broken windows build. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ieee754-0.7.6/cbits/feqrel_source.c new/ieee754-0.7.8/cbits/feqrel_source.c --- old/ieee754-0.7.6/cbits/feqrel_source.c 2015-01-26 16:26:22.000000000 +0100 +++ new/ieee754-0.7.8/cbits/feqrel_source.c 2016-01-08 01:18:06.000000000 +0100 @@ -1,34 +1,41 @@ /* adapted from Tango version 0.99.9, BSD Licensed */ -/* Endianness detection modified from http://esr.ibiblio.org/?p=5095 and + +/* Define WORDS_BIGENDIAN on big-endian platforms; otherwise, assume + * little-endian. + * + * Endianness detection modified from http://esr.ibiblio.org/?p=5095 and * https://gist.github.com/panzi/6856583 . * - * We are assuming that the endianness is the same for integers and floats; - * this is true for modern systems but false in a few historical machines and - * some old ARM processors; see + * In the subsequent code we rely on endianness being the same for integers + * and floats; this is true for modern systems but false in a few historical + * machines and some old ARM processors; see * http://en.wikipedia.org/wiki/Endianness#Floating-point_and_endianness . */ - -/* - __BIG_ENDIAN__ and __LITTLE_ENDIAN__ are defined in some gcc versions - only, probably depending on the architecture. Try to use endian.h if - the gcc way fails - endian.h also does not seem to be available on all - platforms. -*/ - -/* Assume Windows is little endian (http://stackoverflow.com/a/6449581 ) */ -#if (defined(_WIN16) || defined(_WIN32) || defined(_WIN64)) && !defined(__LITTLE_ENDIAN__) -# define __LITTLE_ENDIAN__ -#endif - -#ifdef __BIG_ENDIAN__ +#if defined(__BYTE_ORDER__) +/* (1) Try to use the GCC/Clang __BYTE_ORDER__ defines */ +# if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# elif __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ +# undef WORDS_BIGENDIAN +# else +# error byte order not supported +# endif +/* (2) Otherwise, try the __BIG_ENDIAN__ and __LITTLE_ENDIAN__ defines */ +#elif defined(__BIG_ENDIAN__) # define WORDS_BIGENDIAN 1 +#elif defined(__LITTLE_ENDIAN__) +# undef WORDS_BIGENDIAN #else -# ifdef __LITTLE_ENDIAN__ +/* (3) As a last resort, try platform-specific fallbacks: */ +# if defined(_WIN16) || defined(_WIN32) || defined(_WIN64) +/* (a) Assume Windows is little endian (http://stackoverflow.com/a/6449581 ) */ # undef WORDS_BIGENDIAN # else -# if defined(__OpenBSD__) || defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) +/* (b) Otherwise, use endian.h */ +# if (defined(__DragonFly__) || defined(__FreeBSD__) || defined(__NetBSD__) \ + || defined(__OpenBSD__)) # include <sys/endian.h> # else # include <endian.h> @@ -38,10 +45,10 @@ # elif __BYTE_ORDER == __LITTLE_ENDIAN # undef WORDS_BIGENDIAN # else -# error "unable to determine endianess!" -# endif /* __BYTE_ORDER */ -# endif /* __LITTLE_ENDIAN__ */ -#endif /* __BIG_ENDIAN__ */ +# error platform not supported: unable to determine endianess +# endif +# endif +#endif /* REAL_EXPMASK is a ushort mask to select the exponent portion (without sign) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ieee754-0.7.6/ieee754.cabal new/ieee754-0.7.8/ieee754.cabal --- old/ieee754-0.7.6/ieee754.cabal 2015-01-26 16:26:22.000000000 +0100 +++ new/ieee754-0.7.8/ieee754.cabal 2016-01-08 01:18:06.000000000 +0100 @@ -1,5 +1,5 @@ name: ieee754 -version: 0.7.6 +version: 0.7.8 homepage: http://github.com/patperry/hs-ieee754 synopsis: Utilities for dealing with IEEE floating point numbers description: @@ -9,7 +9,7 @@ category: Math license: BSD3 license-file: LICENSE -copyright: (c) 2011. Patrick Perry <[email protected]> +copyright: (c) 2011-2016. Patrick Perry <[email protected]> author: Patrick Perry maintainer: Patrick Perry <[email protected]> cabal-version: >= 1.2.0 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/ieee754-0.7.6/tests/Tests.hs new/ieee754-0.7.8/tests/Tests.hs --- old/ieee754-0.7.6/tests/Tests.hs 2015-01-26 16:26:22.000000000 +0100 +++ new/ieee754-0.7.8/tests/Tests.hs 2016-01-08 01:18:06.000000000 +0100 @@ -168,6 +168,36 @@ test_infinity_F1 = isInfinite (infinity :: F) @?= True test_infinity_F2 = infinity > (0 :: F) @?= True + +test_minNormal = testGroup "minNormal" + [ testCase "D" (go (minNormal :: D)) + , testCase "F" (go (minNormal :: F)) + ] + where + go n = let (e,_) = floatRange (undefined `asTypeOf` n) + in n @?= encodeFloat 1 (e-1) + + +test_maxFinite = testGroup "maxFinite" + [ testCase "D" (go (maxFinite :: D)) + , testCase "F" (go (maxFinite :: F)) + ] + where + go n = let r = floatRadix (undefined `asTypeOf` n) + d = floatDigits (undefined `asTypeOf` n) + (_,e) = floatRange (undefined `asTypeOf` n) + in n @?= encodeFloat (r^d-1) (e-d) + + +test_epsilon = testGroup "epsilon" + [ testCase "D" (go (epsilon :: D)) + , testCase "F" (go (epsilon :: F)) + ] + where + go n = let d = floatDigits (undefined `asTypeOf` n) + in n @?= encodeFloat 1 (1-d) + + -- succIEEE and predIEEE tests ported from tango/math/IEEE.d test_succIEEE = testGroup "succIEEE" [ testCase "nan D" test_succIEEE_nan_D @@ -561,6 +591,16 @@ maxPayload = maxNaNPayload (undefined :: F) +test_maxNaNPayload = testGroup "maxNaNPayload" + [ testCase "D" (go (undefined :: D)) + , testCase "F" (go (undefined :: F)) + ] + where + go n = let b = floatRadix (undefined `asTypeOf` n) + d = floatDigits (undefined `asTypeOf` n) + in maxNaNPayload n @?= fromIntegral (b^(d-2)-1) + + test_nanPayload = testGroup "nanPayload" [ testCase "D1" test_nanPayload_D1 , testCase "D2" test_nanPayload_D2 @@ -641,6 +681,9 @@ test_IEEE = testGroup "IEEE" [ test_infinity + , test_minNormal + , test_maxFinite + , test_epsilon , test_copySign , test_succIEEE , test_predIEEE @@ -652,6 +695,7 @@ , test_minNaN , test_nan , test_nanWithPayload + , test_maxNaNPayload , test_nanPayload ]
