packages feed

hmatrix 0.5.2.0 → 0.5.2.1

raw patch · 6 files changed

+26/−9 lines, 6 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Numeric.GSL.Special.Exp: exprel_n_CF_e :: Double -> Double -> (Double, Double)

Files

configure.hs view
@@ -46,12 +46,18 @@ check libs fmks = (ExitSuccess ==) `fmap` system (testprog libs fmks)  -- simple test for GSL-testGSL = "echo \"#include <gsl/gsl_sf_gamma.h>\nint main(){gsl_sf_gamma(5);}\""+gsl = "echo \"#include <gsl/gsl_sf_gamma.h>\nint main(){gsl_sf_gamma(5);}\""            ++" > /tmp/dummy.c; gcc /tmp/dummy.c -o /tmp/dummy -lgsl -lgslcblas"            ++ " > /dev/null 2> /dev/null" -checkGSL = (ExitSuccess ==) `fmap` system (testGSL)+-- test for gsl >= 1.12+gsl112 = "echo \"#include <gsl/gsl_sf_exp.h>\nint main(){gsl_sf_exprel_n_CF_e(1,1,0);}\""+           ++" > /tmp/dummy.c; gcc /tmp/dummy.c -o /tmp/dummy -lgsl -lgslcblas"+           ++ " > /dev/null 2> /dev/null" ++checkCommand c = (ExitSuccess ==) `fmap` system c+ -- test different configurations until the first one works try _ _ [] = return Nothing try b f (opt:rest) = do@@ -88,7 +94,7 @@     case r of         Nothing -> do             putStrLn " FAIL"-            g <- checkGSL+            g  <- checkCommand gsl             if g                 then putStrLn " *** Sorry, I can't link LAPACK."                 else putStrLn " *** Sorry, I can't link GSL."@@ -98,4 +104,9 @@             writeFile "hmatrix.buildinfo" ("buildable: False\n")         Just ops -> do             putStrLn " OK"-            writeFile "hmatrix.buildinfo" ("extra-libraries: " ++ ops++"\n")+            g <- checkCommand gsl112+            writeFile "hmatrix.buildinfo" $ "extra-libraries: " +++                ops ++ "\n" +++                if g+                    then ""+                    else "cc-options: -DGSL110\n"
hmatrix.cabal view
@@ -1,5 +1,5 @@ Name:               hmatrix-Version:            0.5.2.0+Version:            0.5.2.1 License:            GPL License-file:       LICENSE Author:             Alberto Ruiz
lib/Numeric/GSL/Special/Exp.hs view
@@ -29,7 +29,7 @@ , exprel_2 , exprel_n_e , exprel_n-, exprel_n_CF_e+-- , exprel_n_CF_e , exp_err_e , exp_err_e10_e , exp_mult_err_e
lib/Numeric/GSL/Special/autoall.sh view
@@ -21,6 +21,7 @@ ./auto.hs erf ./auto.hs exp rep ', exp\n' ', Numeric.GSL.Special.Exp.exp\n' Exp.hs+rep ', exprel_n_CF_e' '-- , exprel_n_CF_e' Exp.hs ./auto.hs expint ./auto.hs fermi_dirac ./auto.hs gamma
lib/Numeric/GSL/gsl-aux.c view
@@ -390,7 +390,11 @@     // Minimizer nmsimplex, without derivatives     switch(method) {         case 0 : {T = gsl_multimin_fminimizer_nmsimplex; break; }+#ifdef GSL110+        case 1 : {T = gsl_multimin_fminimizer_nmsimplex; break; }+#else         case 1 : {T = gsl_multimin_fminimizer_nmsimplex2; break; }+#endif         default: ERROR(BAD_CODE);     }     s = gsl_multimin_fminimizer_alloc (T, my_func.n);
lib/Numeric/LinearAlgebra/Tests.hs view
@@ -109,9 +109,10 @@  --------------------------------------------------------------------- -minimizationTest = TestList [ utest "minimization conjugatefr" (minim1 f df [5,7] ~~ [1,2])-                            , utest "minimization nmsimplex2"       (minim2 f [5,7] == 24)-                            ]+minimizationTest = TestList+    [ utest "minimization conjugatefr" (minim1 f df [5,7] ~~ [1,2])+    , utest "minimization nmsimplex2"  (minim2 f [5,7] `elem` [24,25])+    ]     where f [x,y] = 10*(x-1)^2 + 20*(y-2)^2 + 30           df [x,y] = [20*(x-1), 40*(y-2)]           minim1 g dg ini = fst $ minimizeD ConjugateFR 1E-3 30 1E-2 1E-4 g dg ini