diff options
| author | root <root@alpha.trunkmasters.com> | 2026-06-04 16:24:49 -0500 |
|---|---|---|
| committer | root <root@alpha.trunkmasters.com> | 2026-06-04 16:24:49 -0500 |
| commit | a3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7 (patch) | |
| tree | 0c52bbae1c242fbc296bd650fcd1167685f81492 /dev-haskell/math-functions | |
| parent | bfd9c39e4712ebdb442d4ca0673061faed1e70e1 (diff) | |
| download | baldeagleos-repo-a3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7.tar.gz baldeagleos-repo-a3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7.tar.xz baldeagleos-repo-a3ceca1b4c0d9bdb550dc23f06ffbb5a8e033bc7.zip | |
Adding metadata
Diffstat (limited to 'dev-haskell/math-functions')
5 files changed, 0 insertions, 215 deletions
diff --git a/dev-haskell/math-functions/Manifest b/dev-haskell/math-functions/Manifest deleted file mode 100644 index 17ed2533d34e..000000000000 --- a/dev-haskell/math-functions/Manifest +++ /dev/null @@ -1,2 +0,0 @@ -DIST math-functions-0.3.3.0.tar.gz 424169 BLAKE2B 8b53c657fb5eba8d3ab54d5ba29f7d316e8c2f4803d0587a1071fd9b6c0cf0d8a17c4dadc903280faf028622207ab84db5fb628c8826af0e615524ef45b625c5 SHA512 f6ac6f9fb604207c11d7888fa375a52b544732dd8e811c3b9bf74237bbc0dc83839eb83c11c5ef0dd88666cff4919d4e06236e14d84da7065b4dc75717ceafad -DIST math-functions-0.3.4.2.tar.gz 429223 BLAKE2B 63d305c524c6ab40c415828375a8c2491911693fdf7a1462b9e4d9055a26e1570fb4e80eee8dd617852c96dfc802b6e6a8e2d7bc822d9bf62c00241e5cf43dd7 SHA512 cb29901294463edbba37e97445bb9ed039bdc43815c9bbd9b9bb92b87393e6e891f5840d337c6c06c7e30d26107d32a59c39ac51436be43dba00d0e2411a9053 diff --git a/dev-haskell/math-functions/files/math-functions-0.3.4.2-fix-test-suite.patch b/dev-haskell/math-functions/files/math-functions-0.3.4.2-fix-test-suite.patch deleted file mode 100644 index 5dd2d9c622f7..000000000000 --- a/dev-haskell/math-functions/files/math-functions-0.3.4.2-fix-test-suite.patch +++ /dev/null @@ -1,118 +0,0 @@ -From 7e5deed1cb3fafdd6eb035b3713ae2f46b67014a Mon Sep 17 00:00:00 2001 -From: Alexey Khudyakov <alexey.skladnoy@gmail.com> -Date: Thu, 8 Jun 2023 13:26:11 +0300 -Bug: https://github.com/haskell/math-functions/pull/75 -Signed-off-by: hololeap <hololeap@protonmail.com> -Subject: [PATCH] Fix test suite - -QC as of 2.14.3. became much better at generating test cases and started -reliably failing Kahan summation - -This was fixed by tweaking badvec to be just very bad. Not outrageously -bad. ---- - tests/Tests/Sum.hs | 72 +++++++++++++++++++++++++++------------------- - 1 file changed, 43 insertions(+), 29 deletions(-) - -diff --git a/tests/Tests/Sum.hs b/tests/Tests/Sum.hs -index 08eaf1e..1fcb2e9 100644 ---- a/tests/Tests/Sum.hs -+++ b/tests/Tests/Sum.hs -@@ -4,54 +4,68 @@ module Tests.Sum (tests) where - - import Control.Applicative ((<$>)) - import Numeric.Sum as Sum -+import Numeric.MathFunctions.Comparison - import Prelude hiding (sum) - import Test.Tasty (TestTree, testGroup) --import Test.Tasty.QuickCheck (testProperty) -+import Test.Tasty.QuickCheck - import Test.QuickCheck (Arbitrary(..)) - import qualified Prelude - --t_sum :: ([Double] -> Double) -> [Double] -> Bool --t_sum f xs = f xs == trueSum xs -- --t_sum_error :: ([Double] -> Double) -> [Double] -> Bool --t_sum_error f xs = abs (ts - f xs) <= abs (ts - Prelude.sum xs) -- where ts = trueSum xs -- --t_sum_shifted :: ([Double] -> Double) -> [Double] -> Bool -+-- Test that summation result is same as exact sum. That should pass -+-- if we're effectively working with quad precision -+t_sum :: ([Double] -> Double) -> [Double] -> Property -+t_sum f xs -+ = counterexample ("APPROX = " ++ show approx) -+ $ counterexample ("EXACT = " ++ show exact) -+ $ counterexample ("DELTA = " ++ show (approx - exact)) -+ $ counterexample ("ULPS = " ++ show (ulpDistance approx exact)) -+ $ approx == exact -+ where -+ approx = f xs -+ exact = trueSum xs -+ -+-- Test that summation has smaller error than naive summation or no -+-- worse than given number of ulps. If we're close enough to exact -+-- answer naive may get ahead -+t_sum_error :: ([Double] -> Double) -> [Double] -> Property -+t_sum_error f xs -+ = counterexample ("APPROX = " ++ show approx) -+ $ counterexample ("NAIVE = " ++ show naive) -+ $ counterexample ("EXACT = " ++ show exact) -+ $ counterexample ("A-EXACT = " ++ show (approx - exact)) -+ $ counterexample ("N-EXACT = " ++ show (naive - exact)) -+ $ counterexample ("ULPS[A] = " ++ show (ulpDistance approx exact)) -+ $ counterexample ("ULPS[N] = " ++ show (ulpDistance naive exact)) -+ $ abs (exact - approx) <= abs (exact - naive) -+ where -+ naive = Prelude.sum xs -+ approx = f xs -+ exact = trueSum xs -+ -+t_sum_shifted :: ([Double] -> Double) -> [Double] -> Property - t_sum_shifted f = t_sum_error f . zipWith (+) badvec - - trueSum :: (Fractional b, Real a) => [a] -> b - trueSum xs = fromRational . Prelude.sum . map toRational $ xs - - badvec :: [Double] --badvec = cycle [1,1e16,-1e16] -+badvec = cycle [1, 1e14, -1e14] - - tests :: TestTree --tests = testGroup "Summation" [ -- testGroup "ID" [ -- -- plain summation loses precision quickly -- -- testProperty "t_sum" $ t_sum (sum id) -- -- -- tautological tests: -- -- testProperty "t_sum_error" $ t_sum_error (sum id) -- -- testProperty "t_sum_shifted" $ t_sum_shifted (sum id) -- ] -- , testGroup "Kahan" [ -- -- tests that cannot pass: -- -- testProprty "t_sum" $ t_sum (sum kahan) -- -- testProperty "t_sum_error" $ t_sum_error (sum kahan) -- -- -- kahan summation only beats normal summation with large values -+tests = testGroup "Summation" -+ [ testGroup "Kahan" [ -+ -- Kahan summation only beats naive summation when truly -+ -- catastrophic cancellation occurs - testProperty "t_sum_shifted" $ t_sum_shifted (sum kahan) - ] - , testGroup "KBN" [ -- testProperty "t_sum" $ t_sum (sum kbn) -- , testProperty "t_sum_error" $ t_sum_error (sum kbn) -+ testProperty "t_sum" $ t_sum (sum kbn) -+ , testProperty "t_sum_error" $ t_sum_error (sum kbn) - , testProperty "t_sum_shifted" $ t_sum_shifted (sum kbn) - ] - , testGroup "KB2" [ -- testProperty "t_sum" $ t_sum (sum kb2) -- , testProperty "t_sum_error" $ t_sum_error (sum kb2) -+ testProperty "t_sum" $ t_sum (sum kb2) -+ , testProperty "t_sum_error" $ t_sum_error (sum kb2) - , testProperty "t_sum_shifted" $ t_sum_shifted (sum kb2) - ] - ] diff --git a/dev-haskell/math-functions/math-functions-0.3.3.0.ebuild b/dev-haskell/math-functions/math-functions-0.3.3.0.ebuild deleted file mode 100644 index d21fd63eca43..000000000000 --- a/dev-haskell/math-functions/math-functions-0.3.3.0.ebuild +++ /dev/null @@ -1,40 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# ebuild generated by hackport 0.6.1.9999 -#hackport: flags: +system-erf,+system-expm1 - -CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite" -inherit haskell-cabal - -DESCRIPTION="Special functions and Chebyshev polynomials" -HOMEPAGE="https://github.com/haskell/math-functions" -SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz" - -LICENSE="BSD-2" -SLOT="0/${PV}" -KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" -IUSE="" - -RDEPEND=">=dev-haskell/data-default-class-0.1.2.0:=[profile?] - dev-haskell/primitive:=[profile?] - >=dev-haskell/vector-0.7:=[profile?] - >=dev-haskell/vector-th-unbox-0.2.1.6:=[profile?] - >=dev-lang/ghc-7.4.1:= -" -DEPEND="${RDEPEND} - >=dev-haskell/cabal-1.10 - test? ( dev-haskell/erf - >=dev-haskell/quickcheck-2.7 - >=dev-haskell/tasty-1.2 - >=dev-haskell/tasty-hunit-0.10 - >=dev-haskell/tasty-quickcheck-0.10 ) -" - -src_configure() { - haskell-cabal_src_configure \ - --flag=system-erf \ - --flag=system-expm1 -} diff --git a/dev-haskell/math-functions/math-functions-0.3.4.2.ebuild b/dev-haskell/math-functions/math-functions-0.3.4.2.ebuild deleted file mode 100644 index cb3dfe1b5008..000000000000 --- a/dev-haskell/math-functions/math-functions-0.3.4.2.ebuild +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright 1999-2023 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -EAPI=8 - -# ebuild generated by hackport 0.6.7.9999 -#hackport: flags: +system-erf,+system-expm1 - -CABAL_FEATURES="lib profile haddock hoogle hscolour test-suite" -inherit haskell-cabal - -DESCRIPTION="Collection of tools for numeric computations" -HOMEPAGE="https://github.com/bos/math-functions" -SRC_URI="https://hackage.haskell.org/package/${P}/${P}.tar.gz" - -LICENSE="BSD-2" -SLOT="0/${PV}" -KEYWORDS="~amd64 ~arm64 ~ppc64 ~riscv ~x86" - -PATCHES=( - "${FILESDIR}/${PN}-0.3.4.2-fix-test-suite.patch" -) - -RDEPEND=">=dev-haskell/data-default-class-0.1.2.0:=[profile?] - dev-haskell/primitive:=[profile?] - >=dev-haskell/vector-0.11:=[profile?] - >=dev-lang/ghc-8.4.3:= -" -DEPEND="${RDEPEND} - >=dev-haskell/cabal-2.2.0.1 - test? ( dev-haskell/erf - >=dev-haskell/quickcheck-2.7 - >=dev-haskell/tasty-1.2 - >=dev-haskell/tasty-hunit-0.10 - >=dev-haskell/tasty-quickcheck-0.10 - dev-haskell/vector-th-unbox ) -" - -src_configure() { - haskell-cabal_src_configure \ - --flag=system-erf \ - --flag=system-expm1 -} diff --git a/dev-haskell/math-functions/metadata.xml b/dev-haskell/math-functions/metadata.xml deleted file mode 100644 index 6e48d98c7be5..000000000000 --- a/dev-haskell/math-functions/metadata.xml +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> -<pkgmetadata> - <maintainer type="project"> - <email>haskell@gentoo.org</email> - <name>Gentoo Haskell</name> - </maintainer> - <upstream> - <remote-id type="hackage">math-functions</remote-id> - <remote-id type="github">bos/math-functions</remote-id> - </upstream> -</pkgmetadata> |
